MorbZ / OsmPoisPbf

Extracts all POIs from an OpenStreetMap file (.pbf) and outputs these in a comma seperated file.
171 stars 51 forks source link

Change Request - add OSM_ID #1

Closed hoge6b01 closed 10 years ago

hoge6b01 commented 11 years ago

Hi Merten,

I'd really really like to thank you for your work. It's perfect and very quick! I am not a programmer so maybe it is a stupid question. Would it be possible to add the OSM_ID or more translations to the .csv file?

Maybe you can give me a hint how to add something like this?

Thank you very much and Best Regards, hoge6b01

MorbZ commented 11 years ago

Thank you for your appreciation. Actually I implemented the additional field for the OSM ID in another project which uses OsmPoisPbf as well. But I changed a lot of other things also so I won't upload it here. Perhaps when I have time I will add it to this project. Until then look at the Poi.java file and add another variable for the osm id, then change its method toCsv() to output the ID as well. After that you change the Scanner.java and add like poi.osm_id = node.getId(); to the handleNode() and handleWay() methods. I assume that's it but I didn't test it.

Best Regards, MorbZ

isc-rsingh commented 10 years ago

I have a need for the OSM ID field as well. I'll try to follow this guidance and make the enhancement.