Skip to content

Instantly share code, notes, and snippets.

@apollolm
Created October 8, 2015 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apollolm/9afd97bebb338b998876 to your computer and use it in GitHub Desktop.
Save apollolm/9afd97bebb338b998876 to your computer and use it in GitHub Desktop.
GRASS
@RyanWhitley To convert polygons to polylines in GRASS:
v.in.ogr dsn=<input>.shp out=chad
v.build.polylines in=chad out=chad2
v.out.ogr type=boundary in=chad2 dsn=grass_chad_lines.shp
Roger Andre
9:58 AM
@RyanWhitley Here's how you can do it to lines:
v.in.ogr dsn=AdminLine2.shp out=chad
v.clean tool=rmdupl in=chad out=chad2 <--new step to remove dupe segments
v.build.polylines in=chad2 out=chad3
v.out.ogr type=line in=chad3 dsn=grass_chad_lines.shp <-- note "type" is "line", not "boundary"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment