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

1 Answer 1


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.
    – user30184
    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
    Aug 25, 2018 at 21:06
  • Maybe you can find some more hints in the OSM wiki about wiki.openstreetmap.org/wiki/Shapefiles
    – stephan75
    Aug 29, 2018 at 19:54

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.