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!!! <div><br></div><div>Kirill<br><br><div class="gmail_quote">2012/10/25 Paweł Paprota <span dir="ltr"><<a href="mailto:ppawel@fastmail.fm" target="_blank">ppawel@fastmail.fm</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Paul,<br>
<br>
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:<br>
<br>
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.<br>

<br>
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.<br>

<br>
2. What to do about hierarchical relations (that is, relations that have other relations as members)? Should they be resolved down to nodes/ways?<span class="HOEnZb"><font color="#888888"><br>
<br>
Paweł</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 10/25/2012 02:37 AM, Paul Norman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I keep a pgsnapshot database up to date on my home server for a local jxapi<br>
server and also for analysis.<br>
<br>
I have a linestring column built for the ways table, but there's no geometry<br>
for relations.<br>
<br>
I am wondering what would be involved with getting a geometry column built<br>
for the relations table.<br>
<br>
I expect this would slow down updates, but it would be invaluable to for<br>
analysis.<br>
<br>
I believe Ian Dees mentioned to me something about some work that had been<br>
done on this.<br>
<br>
Is there anything that I could do to help? I have minimal java knowledge and<br>
some postgis knowledge.<br>
<br>
<br>
______________________________<u></u>_________________<br>
osmosis-dev mailing list<br>
<a href="mailto:osmosis-dev@openstreetmap.org" target="_blank">osmosis-dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/osmosis-dev" target="_blank">http://lists.openstreetmap.<u></u>org/listinfo/osmosis-dev</a><br>
<br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
osmosis-dev mailing list<br>
<a href="mailto:osmosis-dev@openstreetmap.org" target="_blank">osmosis-dev@openstreetmap.org</a><br>
<a href="http://lists.openstreetmap.org/listinfo/osmosis-dev" target="_blank">http://lists.openstreetmap.<u></u>org/listinfo/osmosis-dev</a><br>
</div></div></blockquote></div><br></div>