Routes definitely have a relation to geometry. It is meaningful to ask what the length of a route is.
Statistically speaking, relations are multipolygons/boundaries, routes, restrictions, site and associatedStreet. For collection relations, there’s hardly any of them, generally they make sense as a GEOMETRYCOLLECTION, and many of them shouldn’t really be there as relations are not categories (http://wiki.openstreetmap.org/wiki/Relations/Relations_are_not_Categories) From: Кирилл Бестужев [mailto:[email protected]] Sent: Thursday, October 25, 2012 1:45 AM To: Paweł Paprota Cc: [email protected] Subject: Re: [osmosis-dev] Geometries for the relations table of pgsnapshot What's the use of converting ALL relations into geometries? Much of them have no relation to geometry - they are collections, routes and so on!!! Kirill 2012/10/25 Paweł Paprota <[email protected]> Hi Paul, I've been doing some similar work on aggregating way/node geometries and there are some questions that need to be answered when considering something like this: 1. What spatial type to store? OSM relations obviously can contain both ways and nodes so when you do a simple ST_Union/ST_Collect you will get a GEOMETRYCOLLECTION of LINESTRINGs and POINTs; GEOMETRYCOLLECTION is a bit problematic as it is not supported by many PostGIS ST_* functions. What I've done myself is I convert node points into closed linestrings with two points (X, X) thus when I aggregate node and way geometries I get a MULTILINESTRING which is much more useful than GEOMETRYCOLLECTION. 2. What to do about hierarchical relations (that is, relations that have other relations as members)? Should they be resolved down to nodes/ways? Paweł On 10/25/2012 02:37 AM, Paul Norman wrote: I keep a pgsnapshot database up to date on my home server for a local jxapi server and also for analysis. I have a linestring column built for the ways table, but there's no geometry for relations. I am wondering what would be involved with getting a geometry column built for the relations table. I expect this would slow down updates, but it would be invaluable to for analysis. I believe Ian Dees mentioned to me something about some work that had been done on this. Is there anything that I could do to help? I have minimal java knowledge and some postgis knowledge. _______________________________________________ osmosis-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/osmosis-dev _______________________________________________ osmosis-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/osmosis-dev
_______________________________________________ osmosis-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/osmosis-dev

