Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am starting a new GIS project in Java. Till now, I used JTS and geotools to load shape files - these data were then displayed on a swing interface. For this new project, I would like to use OSM data. I am wondering what is the most efficient way to start.

What I am dreaming on is a simple and light open source java viewer that would be able to load and display OSM data in both vector and raster format, and that I could extend for my project.

Does it exist?

share|improve this question
add comment

3 Answers

From what I can tell, Geotools can not handle OSM data natively, but you could add the data to Postgis. Geotools as well as other mapping api's should have the ability to interact with PostGIS. Another option is to set up Geoserver and add a wms layer to your app.

Finally one option is to use openmap and write your own layer. You may also be able to do this with Geotools.

share|improve this answer
    
thanks for these links. –  julien Sep 24 '10 at 9:14
1  
If you want to write an OSM datastore for GeoTools then you may want to start with docs.codehaus.org/display/GEOTDOC/… (I can't find a "new" one). Ask on the devel list for more help. –  iant Sep 24 '10 at 14:24
add comment

If you want to use a all-Java web mapping framework, you may want to take a look at Geomajas. It has a plug-in to display OpenStreetMap raster data. If you want to odisplay the vector data as well, then you first have to download that and store it in a database (Postgis is a good choice). This can then be accessed either using the Geotools or the Hibernate layer.

share|improve this answer
add comment

I assume that you are familiar with JOSM, the Java-based OSM editor. If not, you may want to check it out.

All code is licensed under GPL2 or GPL3.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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