[OSM-dev] Osm2pgsql: 2 linestrings in a way?

16 views
Skip to first unread message

yvecai

unread,
Mar 31, 2012, 4:59:09 AM3/31/12
to osm-dev List
Hi,
Is there a reason why a 'way' can contain more than one linestring in a
osm2pgsql import to postgis?

# select geometrytype(way) from planet_osm_line where osm_id = -2000800;
geometrytype
--------------
LINESTRING
LINESTRING
LINESTRING
LINESTRING
LINESTRING
(5 rows)

An additionnal question, is, what is the purpose of the -G option at import?

Yves


_______________________________________________
dev mailing list
d...@openstreetmap.org
http://lists.openstreetmap.org/listinfo/dev

Martin Koppenhoefer

unread,
Mar 31, 2012, 5:16:54 AM3/31/12
to yvecai, osm-dev List
Am 31. März 2012 10:59 schrieb yvecai <yve...@gmail.com>:
> Hi,
> Is there a reason why a 'way' can contain more than one linestring in a
> osm2pgsql import to postgis?
>
> # select geometrytype(way) from planet_osm_line where osm_id = -2000800;


negative IDs are from relations, so it is normal that there is more
than one linestring (e.g. in the case of a route-relation).

cheers,
Martin

Frederik Ramm

unread,
Mar 31, 2012, 5:36:19 AM3/31/12
to d...@openstreetmap.org
Hi,

On 03/31/2012 11:16 AM, Martin Koppenhoefer wrote:
> negative IDs are from relations, so it is normal that there is more
> than one linestring (e.g. in the case of a route-relation).

Normally a route relation would be combined into one linestring (unless
it exceeds a certain length); in this case, the relation is a route that
cannot be combined into one line:

http://www.openstreetmap.org/browse/relation/2000800

Bye
Frederik

--
Frederik Ramm ## eMail fred...@remote.org ## N49°00'09" E008°23'33"

Reply all
Reply to author
Forward
0 new messages