[OSM-dev] osm2pgsql / postgis precision
Etienne Chové
chove at crans.org
Wed Jul 1 10:58:06 BST 2009
Hi,
Coordinates are rounded during initial import.
*Try to import (osm2pgsql -c -m -s)*
<osm version="0.6">
<node id="1" version="1" lat="0" lon="0"/>
<node id="2" version="1" lat="1.123456789" lon="2.123456789"/>
<way id="3">
<tag k="highway" v="primary"/>
<nd ref="1"/>
<nd ref="2"/>
</way>
</osm>
*and then to import (osm2pgsql -a -m -s)*
<osmChange version="0.6">
<create>
<way id="4">
<tag k="highway" v="primary"/>
<nd ref="1"/>
<nd ref="2"/>
</way>
</create>
</osmChange>
*you'll get two differerent ways*
gis=> SELECT osm_id, astext(way) from test_import_roads;
osm_id | astext
--------+-----------------------------------------------------
3 | LINESTRING(0 -7e-10,236382.12 125070.65)
4 | LINESTRING(0 -7e-10,236382.128473 125070.652348178)
The difference is not really significant but postgis says polygons are
olvelapping each other while they have just a common boundary.
Should I raise a bugreport ?
--
Etienne
More information about the dev
mailing list