Is it possible to convert the OSM file to shapefile with GeoTools in Java?
1 Answer
No, geotools concentrates on standards based geographical data. Openstreetmap decided to invent their own incompatible format. Therefore you must use a tool written specifically for openstreetmap to convert to an interoperable format before geotools can help. You might be able to use a java library that can read openstreetmap data to write a geotools datastore but no one has bothered to yet.
-
OpenJUMP reads OSM data by utilizing the JOSM library. That might be reusable somehow in other Java GIS projects. Commented Aug 25, 2018 at 19:48
-
I use geotools to read shapefile and I use Josm to read osm data and shape file too.– MajdCommented Aug 25, 2018 at 21:06
-
Maybe you can find some more hints in the OSM wiki about wiki.openstreetmap.org/wiki/Shapefiles Commented Aug 29, 2018 at 19:54