jonas-p / go-shp

Go library for reading and writing ESRI Shapefiles. Pure Golang implementation based on the ESRI Shapefile technical description.
MIT License
258 stars 68 forks source link

Dump Shape FIles into GeoJson #28

Closed gocluster closed 6 years ago

gocluster commented 6 years ago

Is there a way to use this package and convert the shp files into JSON? Thanks

fawick commented 6 years ago

No, there is not. That is not within the scope of this package.

I'd recommend using ogr2ogr for converting shape files to GeoJSON or a variety of other vector formats for geo-information.

However, if you insist on having something in Go, you can always use go-shp together with one of the many GeoJSON packages and perform the conversion yourself: https://github.com/paulmach/go.geojson https://github.com/kpawlik/geojson https://github.com/twpayne/go-geom