Missing Multi-polygon from extract

54 views
Skip to first unread message

Roger André

unread,
Feb 22, 2013, 8:19:19 PM2/22/13
to imp...@googlegroups.com
Hello,

I've been testing ImpOSM 2.5.0 with an extract of Washington State (in the U.S.) and am very impressed with the overall result.  However, I noticed that fairly prominent lake was missing from the resulting "osm" DB, so I started to dig a bit deeper.  I confirmed that the lake is present in the extract, here are it's details:

        <relation id="411923" version="13">
                <member type="way" ref="42114354" role="inner"/>
                <member type="way" ref="42114348" role="inner"/>
                <member type="way" ref="42114344" role="inner"/>
                <member type="way" ref="42114346" role="inner"/>
                <member type="way" ref="42115602" role="inner"/>
                <member type="way" ref="42117265" role="inner"/>
                <member type="way" ref="42125939" role="inner"/>
                <member type="way" ref="52374472" role="outer"/>
                <member type="way" ref="126149886" role="outer"/>
                <member type="way" ref="126149894" role="outer"/>
                <member type="way" ref="52434337" role="outer"/>
                <member type="way" ref="126263156" role="inner"/>
                <tag k="name" v="Moses Lake"/>
                <tag k="natural" v="water"/>
                <tag k="source" v="yahoo_wms"/>
                <tag k="type" v="multipolygon"/>
        </relation>

I then checked the DB table definition in geometryc_columns and saw this:

osm=# select * from geometry_columns where f_table_name like '%water%';
 f_table_catalog | f_table_schema |      f_table_name       | f_geometry_column | coord_dimension |  srid  |    type    
-----------------+----------------+-------------------------+-------------------+-----------------+--------+------------
                 | public         | osm_new_waterways       | geometry          |               2 | 900913 | LINESTRING
                 | public         | osm_new_waterareas      | geometry          |               2 | 900913 | GEOMETRY
                 | public         | osm_new_waterareas_gen1 | geometry          |               2 | 900913 | GEOMETRY
                 | public         | osm_new_waterareas_gen0 | geometry          |               2 | 900913 | GEOMETRY

The GEOMETRY type is new to me, but I assume that it is a valid type to store polygons/multi-polygons.

I followed the tutorial at http://imposm.org/docs/imposm/2.5.0/tutorial.html and had no problems with any of the steps listed there, but I'm curious if given the nature of this feature, should I have done something more to enable it to be parsed from the extract and created in the DB?

Many thanks for any clues you can provide.

Roger
--

Roger André

unread,
Mar 18, 2013, 7:34:33 PM3/18/13
to imp...@googlegroups.com
To close this - It turns out that this was the result of the record having bad topology.  If you run in the debug mode, you can see it in the output.

[2013-02-28 16:14:38,673] imposm.multipolygon - DEBUG - linestrings from relation 411923 do not form a ring
[2013-02-28 16:14:38,674] imposm.dbimporter - DEBUG - linestrings from relation 411923 do not form a ring

--
Reply all
Reply to author
Forward
0 new messages