How to run GDAL (ogr2ogr) in Java to convert Shapefiles to GeoJSON
问题 I'm a beginner at programming and get pretty confused when trying to use external libraries. I have my maps in shapefiles that I convert to GeoJSON using the website Mapshaper.org, and only then can i read the map from my Java application. I want the user to be able to import a shapefile directly so I found out about GDAL ogr2ogr that has Java bindings, and can make this conversion with a single command such as: $ ogr2ogr -f GeoJSON -t_srs crs:84 [name].geojson [name].shp but I have no idea