User Tools

Site Tools


geosketch_data_extraction

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
geosketch_data_extraction [2022/12/05 07:23] jhagstrandgeosketch_data_extraction [2023/01/12 03:06] (current) – removed jhagstrand
Line 1: Line 1:
-====== Geosketch Data Extraction ====== 
- 
-Plunder loads its data from static js files. 
- 
-Those files are generated from the plunder database using the sql files in the 
-geosketch/sql folder. 
- 
-  psql -t -d voyc -U jhagstrand <deserts.sql >deserts.js 
-  psql -t -d voyc -U jhagstrand <mountains.sql >mountains.js 
-  psql -t -d voyc -U jhagstrand <plateaux.sql >plateaux.js 
-  psql -t -d voyc -U jhagstrand <plains.sql >plains.js 
-  psql -t -d voyc -U jhagstrand <swamps.sql >swamps.js 
-  psql -t -d voyc -U jhagstrand <tundras.sql >tundras.js 
-  psql -t -d voyc -U jhagstrand <foothills.sql >foothills.js 
-  psql -t -d voyc -U jhagstrand <valleys.sql >valleys.js 
-  psql -t -d voyc -U jhagstrand <rivers.sql >rivers.js 
-  psql -t -d voyc -U jhagstrand <lakes.sql >lakes.js 
-  psql -t -d voyc -U jhagstrand <empire.sql >empire.js 
-  psql -t -d voyc -U jhagstrand <treasure.sql >treasure.js 
- 
-Originally mountains were broken into three js files by scalerank. 
-  * high scalerank 1,2 
-  * medium scalerank 3,4 
-  * low scalerank 4,5 
- 
-And rivers were broken into six js files by scalerank, 1 thru 6. 
- 
- 
-OGR can be used to generate geojson files directly from shapefiles,  
-but we found it more convenient to use a sql database as an interim. 
- 
-Create one large geojson file from the shapefile. 
-  ogr2ogr -f GeoJSON georegions.js 10m_geography_regions_polys.shp 
- 
-Never figured out how to create multiple geojson files, one for each featurecla. 
-  ogr2ogr -f GeoJSON -clipsrcwhere "FeatureCla='foothills'" foothills.geojson 10m_geography_regions_polys.shp 
- 
-update plunder.plunder set featureclass = lower(featureclass); 
- 
- alkaline lake    |    40 
- basin            |     9 
- canal            |     4 
- coast            |    36 
- continent        |     7 
- delta            |    12 
- depression           2 
- desert              58 
- drangons-be-here |     1 
- empire             427 
- foothills        |     3 
- geoarea          |    44 
- gorge            |     3 
- island             295 
- island group       167 
- isthmus          |     4 
- lake               320 
- lake centerline  |   113 
- lowland          |     5 
- pen/cape            55 
- peninsula        |    11 
- plain            |    30 
- plateau          |    71 
- range/mtn        |   222 
- reservoir        |    52 
- river            |   361 
- treasure            67 
- tundra               4 
- valley               6 
- wetlands             3 
- 
-^ layer ^ featureclass ^ rowcount ^ 
- 
-terrain 
-  basin            |     9 
-  desert              58 
-  plain            |    30 
-  plateau          |    71 
-  tundra               4 
- 
-mountains 
-  range/mtn        |   222 
-  foothills        |     3 
- 
-lakes 
-  lake               320 
-  reservoir        |    52 
- 
-rivers 
-  river            |   361 
-  delta            |    12 
- 
-historical 
-  empire             427 
-  treasure            67I|Ija I 
- 
-^ layer ^ featureclass ^ rowcount ^ 
-| terrain    |        |            | 
-|  | basin            |          | 
-|  | desert              58      | 
-|  | plain            |    30      | 
-|  | plateau          |    71      | 
-|  | tundra                    | 
-| mountains                        | 
-|  | range/mtn        |   222      | 
-|  | foothills        |          | 
-| lakes                            | 
-|  | lake               320      | 
-|  | reservoir        |    52      | 
-| rivers                           | 
-|  | river            |   361      | 
-|  | delta            |    12      | 
-| historical                       | 
-|  | empire             427      | 
-|  | treasure            67      | 
  
geosketch_data_extraction.1670243027.txt.gz · Last modified: 2022/12/05 07:23 by jhagstrand

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki