[postgis-users] OSM post import questions
Imre Samu
pella.samu at gmail.com
Mon Nov 23 13:40:10 PST 2015
Hi Tom,
> osm_id field contains non-unique values as well as negative values
This is normal. Osm2pgsql optimised for rendering.
- The osm2pgsql program now spliting long ways after around 1 degree or
100km
https://github.com/openstreetmap/osm2pgsql/search?utf8=%E2%9C%93&q=Split+long+ways
- "--multi-geometry (-G) is necessary for most analysis as it prevents
MULTIPOLYGONs from being split into multiple POLYGONs ..."
https://github.com/openstreetmap/osm2pgsql/blob/master/docs/analysis.md
- negative values: relations
https://help.openstreetmap.org/questions/2259/is-there-a-reason-why-osm2pgsql-produces-negative-osm_id-values
The easy solution for a primary key : ALTER TABLE tablename ADD COLUMN
gid SERIAL UNIQUE;
(from https://github.com/openstreetmap/osm2pgsql/issues/446 )
Regards,
Imre
2015-11-23 20:23 GMT+01:00 Thomas Endres <endres.thomas at gmail.com>:
> Hi,
> I have a couple post-import questions regarding North America osm data -
> hoping someone can help.
> Using the following with Postgres 9.4.5 and PostGIS 2.2 on an ubuntu
> instance.
>
> osm2pgsql --create --slim --cache 14000 --number-processes 4 --hstore -d
> osm --flat-nodes /usr/local/osm/flat_nodes.bin --style
> /usr/local/osm/default.style --multi-geometry
> /tmp/north-america-latest.osm.pbf
>
> 1- I'm trying to add a primary key on a few tables (on the osm_id field)
> for use in QGIS. Problem is the planet_osm_line table for example errors
> as the osm_id field contains non-unique values as well as negative
> values.(?)
> Is the slim mode or flat-nodes causing me problems?
>
> 2- Should I have used the -l switch on import for epsg:4326 - I used
> nothing and assumed it would default to 900913?
>
> Thanks!
> -tom
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20151123/dc0467c4/attachment.html>
More information about the postgis-users
mailing list