[Tile-serving] [osm2pgsql] Polygons not properly created when a node is at 0.0, 0.0 (#158)
Paul Norman
notifications at github.com
Mon Jun 16 21:07:33 UTC 2014
This XML
```
<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="hand">
<node id="1" version="1" timestamp="2010-01-01T00:00:00Z" uid="1" user="user1" changeset="1" lat="0.0" lon="0.0"/>
<node id="2" version="1" timestamp="2010-01-01T00:00:00Z" uid="1" user="user1" changeset="1" lat="0.01" lon="0.0"/>
<node id="3" version="1" timestamp="2010-01-01T00:00:00Z" uid="1" user="user1" changeset="1" lat="0.01" lon="0.01"/>
<way id="1" version="1" timestamp="2010-01-01T00:00:00Z" uid="1" user="user1" changeset="1">
<nd ref="1"/>
<nd ref="2"/>
<nd ref="3"/>
<nd ref="1"/>
<tag k="building" v="yes"/>
</way>
<relation id="1" version="1" timestamp="2010-01-01T00:00:00Z" uid="1" user="user1" changeset="1">
<member type="way" ref="1" role="outer"/>
<tag k="type" v="multipolygon"/>
</relation>
</osm>
```
with the stylesheet ``node,way building text polygon`` does not result in any rows in planet_osm_polygon when imported with ``./osm2pgsql -S buildings.style test.osm``
If node 1 is changed to ``<node id="1" version="1" timestamp="2010-01-01T00:00:00Z" uid="1" user="user1" changeset="1" lat="0.001" lon="0.001"/>`` (note lat/lon) it then creates a polygon.
The polygon in the former case is ``LINESTRING(0 1113.19,1113.19 1113.19)`` and in the latter case is ``POLYGON((0 1113.19,1113.19 1113.19,111.32 111.32,0 1113.19))``
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/158
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20140616/228caa40/attachment.html>
More information about the Tile-serving
mailing list