By Martin Ždila


2019-03-14 09:52:01 8 Comments

I am looking for preferably a Linux command line tool that would spit long polylines in my shapefile to shorter segments. Length limit can be defined by the length in meters or in max number of polyline points and doesn't need to be precise.

My problem is that I have a shapefile with contours spanning the whole country and it makes rendering map with Mapnik very slow.

1 comments

@Martin Ždila 2019-03-14 21:31:43

I've created a program in nodejs which does what I need. It splits linestrings longer than default 1000 points. Output is GeoJSON which can be converted back to shapefile with ogr2ogr -F 'ESRI Shapefile' result.shp split.geojson.

You can find it at https://github.com/FreemapSlovakia/shp-polyline-splitter.

Related Questions

Sponsored Content

2 Answered Questions

[SOLVED] Splitting polygons with line grid in QGIS?

1 Answered Questions

[SOLVED] Splitting large polygons

  • 2013-03-09 09:51:06
  • John Marshall
  • 1076 View
  • 4 Score
  • 1 Answer
  • Tags:   algorithm splitting

0 Answered Questions

Cleanly splitting polylines / reordering vertices in QGIS?

0 Answered Questions

Splitting polylines / multipart lines at intersections using ArcGIS Desktop?

0 Answered Questions

QGIS splitting features quickly

  • 2017-08-23 11:55:17
  • Abdullah Alaa
  • 86 View
  • 0 Score
  • 0 Answer
  • Tags:   qgis splitting

2 Answered Questions

[SOLVED] Splitting DXF layers into Shapefile layers in QGIS?

2 Answered Questions

[SOLVED] Splitting shapefile based on part of field in attribute table using ArcPy?

1 Answered Questions

[SOLVED] Splitting polylines in ramps?

2 Answered Questions

[SOLVED] Splitting Shapefiles

Sponsored Content