kiselev-dv / gazetteer

OSM ElasticSearch geocoder and addresses exporter
http://osm.me
Other
99 stars 21 forks source link

Output to CSV - Syntax #49

Closed linuzer closed 7 years ago

linuzer commented 7 years ago

Hi,

while working with the gazetteer (btw. great tool!) to extract addresses from OSM I found in the Readme the note, that it is possible to output also to CSV-format. Unfortunately I was not able to figure out how to do this. Could you give me please a little example?

Thanks a lot!

kiselev-dv commented 7 years ago

This is the basic example, it shows how to encode columns for csv handler:

--handlers out-csv out=file.csv.gz columns=osm-id,id

But it says nothing about columns itself. You can find column keys here:

The difference between AddrRowValueExctractorImpl and FeatureValueExctractorImpl is that one feature (building or poi or whatewer) may have more than one address. Columns in FeatureValueExctractorImpl are for the whole feature and AddrRowValueExctractorImpl for each address inside feature.

If feature contains more than one address, lets say 2 addresses, the output csv will has 2 rows, data from FeatureValueExctractorImpl will be the same, and data from AddrRowValueExctractorImpl will be specific.

Sorry for very late answer.

kiselev-dv commented 7 years ago

https://github.com/kiselev-dv/gazetteer/wiki/csv-output

linuzer commented 7 years ago

Thanks a lot for the clarification!