omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
719 stars 157 forks source link

route_members: only LineStrings & Points #101

Open tobwen opened 8 years ago

tobwen commented 8 years ago

Description I'm using the public_transport example mapping from git. Inside route_members, there are only linestrings and points, but not polygons.

Example For example way 134753516 is a platform with area=yes, so it's a polgyon: http://www.openstreetmap.org/way/134753516 It's inside route 2673744, but appears as LineString only.

Query

select id, osm_id, member, index, role, type,name, ST_GeometryType(geometry), ST_IsEmpty(geometry) AS empty FROM route_members WHERE osm_id=-2673744 and member=134753516;

Result

   id    |  osm_id  |  member   | index |   role   | type |   name    | st_geometrytype | empty
---------+----------+-----------+-------+----------+------+-----------+-----------------+-------
 2414156 | -2673744 | 134753516 |    40 | platform |    1 | Aplerbeck | ST_LineString   | f

Workaround Of course, I could run _ST_BuildArea(geometry) WHERE role='platform' AND STIsClosed(geometry) - but since there's polygon magic in imposm, why not use it?