Hello, I am currently working on an application which would display a map and our position indoors. Not to go in precise details, we would like to display everything in meters from an fixed position (x,y) inside the building, so that we can get rid of latitude and longitude. To do so, I have my .osm files filled with latitudes and longitudes. I would like to create a new file (.osm or .csv) which would give for each node an (x,y) position. Am I obliged to use osmconvert or is there a quicker solution with java (like parsing the osm file and creating a new sml file) ? My problem is that I do not know how to only take the information latitude or longitude given the disposition of the osm file.... I hope I've been clear enough ... Can anyone help ?! asked 24 Sep '14, 14:57 laVial |
Unless you need very high optimisations (in which case you probably don't want to use an unconverted *.osm file anyway), I wouldn't bother modifying the input file, it looks like too many opportunities for confusion. Convert the coordinates at load time instead, if you really need to (I'm not sure I see the usecase). Use a library like proj4j (you didn't specify what language you were using), choose your projection (equirectangular will probably suit you best in this case), and translate all nodes. answered 24 Sep '14, 17:20 Vincent de P... ♦ |
Consult the documentation of osmconvert in the OSM wiki. It has a feature to export a CSV file e.g. with x and y coordinates of each OSM data element from an OSM xml source file. And: osmconvert is (next to osmfilter) a very fast tool, compared to osmosis ... answered 24 Sep '14, 17:16 stephan75 |