<div dir="ltr">Hi Walter<div><br></div><div>Just a small hint: There exists two FDW which could be of interest here: The file_fdw [1] (which is part of the Additional Supplied Modules) and file_fixed_length_record_fdw .</div>
<div>I assume your're interested more in the file_fixed_length_record_fdw since OSM nodes are of fixed length.<br></div><div>Be aware that AFAIK there is no precompiled binary distribution of that.</div><div><br></div>
<div>Yours, Stefan</div><div><br></div><div>[1] <a href="http://wiki.postgresql.org/wiki/Foreign_data_wrappers#file_fdw">http://wiki.postgresql.org/wiki/Foreign_data_wrappers#file_fdw</a></div><div>[2] <a href="http://wiki.postgresql.org/wiki/Foreign_data_wrappers#file_fixed_length_record_fdw">http://wiki.postgresql.org/wiki/Foreign_data_wrappers#file_fixed_length_record_fdw</a></div>
<div>[3] <a href="https://github.com/adunstan/file_fixed_length_record_fdw">https://github.com/adunstan/file_fixed_length_record_fdw</a></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/11/10 Walter Nordmann <span dir="ltr"><<a href="mailto:pille3@hotmail.com" target="_blank">pille3@hotmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jochen123 wrote<br>
> ...<br>
<div class="im">> This is probably slightly easier to do than the postgresql fdw, but, of<br>
> course, not as general.<br>
<br>
</div>It's no problem for me to do it with postgresql. I'v done that before whilst<br>
working with the osmosis/snapshot-schema. i could "dump" osm-objects (nodes,<br>
ways and relations) directly from my database using some simple<br>
pl/pgsql-functions.<br>
<br>
something like /select wno_asosm('R',1111111);/ dumped the relation with all<br>
ways and all nodes to an osm-file. Even relations as members. But now i'm<br>
missing the nodes :(<br>
<br>
First step: try to read the flatfile with /persistent_cache_nodes_get/ from<br>
osm2pgsql and fetch some nodes.<br>
next: convert flatfile to csv and use postgresql /file_fdw/ as a simple<br>
data wrapper<br>
last step: write own wrapper? may be i don't have to.<br>
<div class="im"><br>
regards<br>
walter<br>
<br>
<br>
<br>
<br>
<br>
-----<br>
[url=<a href="http://osm.wno-edv-service.de/residentials" target="_blank">http://osm.wno-edv-service.de/residentials</a>] Missing Residentials Map 1.17[/url] [url=<a href="http://osm.wno-edv-service.de/plz" target="_blank">http://osm.wno-edv-service.de/plz</a>] Postcode Map 2.0.2[/url]<br>
--<br>
</div>View this message in context: <a href="http://gis.19327.n5.nabble.com/osm2pgsql-access-flatfile-from-postgresql-via-foreign-data-wrapper-tp5784817p5784824.html" target="_blank">http://gis.19327.n5.nabble.com/osm2pgsql-access-flatfile-from-postgresql-via-foreign-data-wrapper-tp5784817p5784824.html</a><br>
<div class="im HOEnZb">Sent from the Developer Discussion mailing list archive at Nabble.com.<br>
<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/dev" target="_blank">https://lists.openstreetmap.org/listinfo/dev</a><br>
</div></div></blockquote></div><br></div>