2

Is it possible to convert the OSM file to shapefile with GeoTools in Java?

1 Answer 1

2

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.

3
  • OpenJUMP reads OSM data by utilizing the JOSM library. That might be reusable somehow in other Java GIS projects.
    – user30184
    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.
    – Majd
    Commented Aug 25, 2018 at 21:06
  • Maybe you can find some more hints in the OSM wiki about wiki.openstreetmap.org/wiki/Shapefiles
    – stephan75
    Commented Aug 29, 2018 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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