National Map Viewer: Difference between revisions
From charlesreid1
No edit summary |
No edit summary |
||
| Line 32: | Line 32: | ||
ogr2ogr -f GeoJSON -t_srs crs:84 Elev_Contour.geojson Elev_Contour.shp | ogr2ogr -f GeoJSON -t_srs crs:84 Elev_Contour.geojson Elev_Contour.shp | ||
</pre> | </pre> | ||
[[Category:July 2016]] | |||
Revision as of 10:30, 28 July 2016
Shapefiles
Ultimate goal: http://setosa.io/blog/2014/08/10/woodcut-data-visualization/
Getting Shapefile Data
To download elevation data in shapefile format:
Zoom into the area you want
Check "US Topo" and click Find Products
Next to each item, there are four links - the third one is "Download"
Download the shapefile data and unzip it
Shapefiles to GeoJSON
We'll convert these shapefiles to something better for the web: GeoJSON
See http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
Install homebrew, then:
brew install gdal
This will install a utility called ogr2ogr, which we'll use to convert shapefiles to GeoJSON files.
ogr2ogr -f GeoJSON -t_srs crs:84 Elev_Contour.geojson Elev_Contour.shp