CUSP Coastline: Difference between revisions
Jump to navigation
Jump to search
m (→See also) |
|||
Line 22: | Line 22: | ||
==== Combine line segments into continuous islands ==== | ==== Combine line segments into continuous islands ==== | ||
< | <source lang="bash"> | ||
# Import the Shapefile. The '-o' flag is used here to ignore NAD83 -> WGS84 datum mismatch | # Import the Shapefile. The '-o' flag is used here to ignore NAD83 -> WGS84 datum mismatch | ||
v.in.ogr dsn=CUSPLine.shp out=CUSP_coastline_extract_raw -o | v.in.ogr dsn=CUSPLine.shp out=CUSP_coastline_extract_raw -o | ||
Line 40: | Line 40: | ||
in=CUSP_coastline_extract_polyline \ | in=CUSP_coastline_extract_polyline \ | ||
out=CUSP_coastline_extract_polyline.shp | out=CUSP_coastline_extract_polyline.shp | ||
</ | </source> | ||
=== Lines to area === | === Lines to area === |
Revision as of 21:36, 12 November 2020
NOAA's CUSP: Continually Updated Shoreline
- "This data set was created to deliver continuous shoreline with frequent updates to support various GIS applications including coastal and marine spatial planning, tsunami and storm surge modeling, hazard delineation and mitigation, environmental studies and may assist in nautical chart updates."
Retrieving data
- Visit NOAA's CUSP data access site
- Zoom into your area of interest
- (since it's running OpenLayers you can do the nice shift+left-mouse-drag trick to quickly zoom into a box of interest)
- Along the top of the map is a tool bar, click on "Download" on the right end and then select CUSP
- You can now either select by rectangle, or by named region if you want a large area
- Draw a box on the map, it will then ask you if you want a Shapefile or KML
- Select Shapefile and the .zip data will be prepared for download
Import and cleanup
You can import the Shapefile or KML with v.in.ogr.
The data comes as many discrete line segments. It may be useful to combine those into individual polylines. Fortunately they all seem to touch so doing that is fairly simple with the v.build.polylines module. If in some areas they aren't exactly touching the v.clean module's snap tool can be used with a very small threshold value to fix that.
Combine line segments into continuous islands
# Import the Shapefile. The '-o' flag is used here to ignore NAD83 -> WGS84 datum mismatch
v.in.ogr dsn=CUSPLine.shp out=CUSP_coastline_extract_raw -o
# if needed: (wasn't for me)
# v.clean tool=snap threshold=0.000001
# n.b. there's a bug in GRASS v6.4; use GRASS v7 or apply bugfix of Jan. 5, 2013
v.build.polylines cats=first type=line --verbose \
in=CUSP_coastline_extract_raw out=CUSP_coastline_extract_polyline
# can keep, but values are only valid for the first segment
v.db.droptable -f CUSP_coastline_extract_polyline
# export shapefile
v.out.ogr format=ESRI_Shapefile \
in=CUSP_coastline_extract_polyline \
out=CUSP_coastline_extract_polyline.shp
Lines to area
If you want filled areas not lines you can use the following commands:
# convert lines to boundaries v.type from_type=line to_type=boundary # remove line segment category numbers from boundaries v.category option=del # create areas (adds centroids) v.category option=add type=area