[osmosis-dev] Geometries for the relations table of pgsnapshot

Paweł Paprota ppawel at fastmail.fm
Thu Oct 25 09:42:11 BST 2012


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
> osmosis-dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/osmosis-dev
>




More information about the osmosis-dev mailing list