[OSM-dev] get node data from flatfile

Walter Nordmann wnordmann at gmx.de
Fri May 8 08:05:19 UTC 2015



On 07.05.2015 21:00, Paul Norman wrote:.
> If you're speaking of the OSM PBF format, the osm2pgsql schema is 
> ill-suited for this, as it doesn't have all the metadata needed.
That's right, i'll generate those missing attributes like version, 
timestamp, ... with dummy data, because we don't need them anyway. And 
it has not to be a pbf-file, simple .osm will do the job too.

> As Frederik mentioned, there's a bug. Make sure you're using 0.87.3 or 
> later, not 0.87.3-dev.

Yes, that is a very important info. I'm using 0.85 :(
>
>> At the end i would like to write my own pg/plsql-Function 
>> get_node(osm_id)
>> which gives me the geometry of that node (reading the flatfile of 
>> course).
> The right way to do this is probably to implement a foreign data 
> wrapper (FDW) as a PostgreSQL extension reading the flat-nodes file. 
> This would let it appear as a table and you could then JOIN to it and 
> interact with it as you normally would.
Great idea! I used FDW for another small project so it should not be too 
complex for me.

Regards
walter




More information about the dev mailing list