1

I have geojson data that draws shapes similar to the following:

enter image description here

I wanted to know if there are any operations that can give me the geojson which represents the outline of these shapes represented by the red lines in the following image:

enter image description here

The coordinates do not have to match exactly what is represented by the red lines I only need the coordinates to wrap the outside boundaries of the shape.

  • What software are you using? It is better to convert geojson into shp etc then transform and get the transformed geojson.. – SIslam Aug 21 '15 at 19:25
  • 5
    Sounds like you want a convex hull. – crmackey Aug 21 '15 at 19:28
  • I'm a programmer, and I am looking for a known formula to apply to many of these kind of shapes. – xerxes Aug 21 '15 at 19:29
  • 1
    turf js has code for a convex hull from a set of points (vertices of a polygon) geoJSON example mapbox.com/mapbox.js/example/v1.0.0/turf – Mapperz Aug 21 '15 at 19:38
  • 1
    Here are code samples in multiple languages, pick your poison: en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/… – crmackey Aug 21 '15 at 20:02
1

Turf.js can create convex hull from geojsons. https://turfjs.org/docs/#convex

| improve this answer | |
0

You can try also: https://geoman.io/studio - which bases on the leaflet-draw plugin, having an option to direct saving these files as a .geojson extension.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.