I am using osm2pgsql 0.92.0,in windows, to load the osm data from a pbf file into postgresql database. First time i have loaded the data without using "--extra-attributes" option, and i observed that the objects which have no tags attached to them are skipped. i.e., count of nodes in "planet_osm_nodes" slim table is greater than count of points in "planet_osm_point" database table. hstore column also don't have metadata like osm_user, osm_uid, osm_timestamp, osm_changeset etc. Second time i have loaded the same pbf file into another database with "--extra-attributes" option, and also i have added osm_user and osm_uid to default style file. Here I observed that all the nodes are loaded into database point table irrespective of whether a node has tags attached to it or not. i.e., count of nodes in slim table "planet_osm_nodes" is equal to count of points in database table "planet_osm_point". Table columns for the nodes which have no tags are null except osm_user and osm_uid columns. Remaining metadata like osm_timestamp, osm_changeset etc are stored in hstore column. So I supposed all the ways which have no tags attached to them also would get loaded same as nodes into "planet_osm_line" table irrespective of closed way or non-closed way. But observed that these ways are not loaded. Database tables "planet_osm_line" has the ways which have tags attached only, and osm_user and osm_uid columns got filled up and the remaining metadata is stored in hstore column for all. But this table doesn't have the ways which have no tags. Can anyone, who has clear understanding of slim tables and database tables as in the osm2pgsql schema, please tell me "--extra-attributes" only work with the nodes or it should work with ways as well? if the --extra-attributes option extract all the metadata and treat the nodes which have no tags as legible to put in "planet_osm_point" table then why the line table is missing the ways which have no tags? has anyone experienced the same? asked 03 May '18, 09:27 Phanindra |
I have to admit that I've never tried with adding extra columns in the style file, but if you have hstore enabled, the values will be added to the tags in hstore. The style file controls which OSM objects are imported at all, untagged ways will typically have to be a member of an imported relation type to be included. I don't believe that there is a direct way to include other untag ways (you could try with the * wildcard for the tag), or potentially use LUA transforms. answered 04 May '18, 10:26 SimonPoole ♦ |
Please format your question so that it is legible (paragraphs and so on). Thank you.
SimonPoole, I have formatted the question. I believe it is legible now. Thanks