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'm working at OpenStreetMap project for android at the moment. I want to retrieve OSM data from my app(nodes, markers and paths) and convert it to shape file (.shp, .dbf and .shx). Later, I'll load it into ArcGIS editor. I've been investigating about it, and I have no clear idea if It's possible a direct conversion between this formats, or I have to step first on KML file and parse it in shape file.

I actually don't know how to retrieve the OSM data to save a osm file for being treated. I've been looking for a library or something like that but I have no lucky.

Can anyone give me a helping hand? Thanks in advance!

share|improve this question
    
What libraries are you using to on android? –  neogeomat Sep 27 '13 at 3:24

2 Answers 2

As such, the .osm format is a very simple format. It just contains the various nodes, and then the ways that are formed from these nodes. You could whip up some custom code which does this, quite easily.

Additionally, there are quite a few libraries/projects which can be used to convert from .osm format to shapefiles; Many of them have been linked on this page: https://wiki.openstreetmap.org/wiki/Shapefiles

share|improve this answer
    
I understand that the first step I have to take is create a XML or KML file for being treated and parsed lately to shape file. To make the xml/kml i Need to code a parser whom "transform" my map objects into tag language file, isn't it? Sorry for my ignorance, it's my first time working with parsers. –  Leonis May 16 '13 at 11:49
    
Well, it depends on what you have right now. –  Devdatta Tengshe May 17 '13 at 6:12

Do you have to use shapefiles? They're kind of the lowest common denominator of GIS interchange formats. They will do bad things to field names > 10 characters.

To get your OSM data, there are lots of ways of doing it. A quick introduction is: Downloading data - OpenStreetMap Wiki. OSM data will need to be processed a bit to turn it into useful data. Will the data be downloaded and processed on an Android device, or will it be done on a computer beforehand? If the latter, you might consider SpataLite through GDAL. It will automatically create polygons from OSM's simple line features (example here: openstreetmap - How to import polygons from OSM to QGIS? - Geographic Information Systems Stack Exchange). SpatiaLite is supported under Android by the Spatialite for Android project (tutorial).

share|improve this answer

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.