As I got no feedback at all I'm not wure what to do now. I don't have commit access to the repo so I hoped that some one could review and commit my patch if he or she thinks it could be useful.

Peter


Am 25.06.2010 07:51, schrieb Peter Körner:
Hi all

i have missed two malloc's and forgot to free them, what is why it
always failed with osm extracts bigger then berlin :)

I attached a new version of the patch that now imports germany without a
problem. This has still not been tested on a planet nor with
changeset-files so it is maybe not yet ready for svn trunk but that
decision is not up to me ;)

Peter


Am 24.06.2010 00:02, schrieb Peter Körner:
Hi

I took Sven's hstore patch and added a new functionality.
It is now possible to request an arbitrary number of extra hstore
columns, that contains all tags that start with the column name.

eg: osm2pgsql --hstore-column "name:" --hstore-column "wikipedia:"

will add two new columns "name:" and "wikipedia:". When a node or a
way contains a name:de=Deutschland tag, the "name:"-column will contain
an hstore entry 'de'=>'Deutschland'.

If no name:-Tag is present, the column is set to NULL. That way one can
easily look for translated objects by toing a "name:" IS NOT NULL query.

What kind of Index would you suggest for such a IS NOT NULL query? A
conditional index on osm_id WHERE "name:" IS NOT NULL?


I wrote the relevant code into a single function and also relocated the
hstore code into a seperate function and documented both. Can someone
with more C experience please check the patch because I'm not sure I did
all pointer logic correct.

I did successfully test it on the berlin geofabrik extract and will try
to run a planet import during the next week (need to talk about that on
Maps-l ;).

The attached patch is against r21892 of the osm repo.

Special thanks to Sven who did the real hard work.
Peter



_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev


_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to