Skip to content

Instantly share code, notes, and snippets.

@apollolm
Created October 8, 2015 17:37
Show Gist options
  • Select an option

  • Save apollolm/9afd97bebb338b998876 to your computer and use it in GitHub Desktop.

Select an option

Save apollolm/9afd97bebb338b998876 to your computer and use it in GitHub Desktop.

Revisions

  1. apollolm created this gist Oct 8, 2015.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    @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"