[OSM-dev] Ways with 40k nodes, was: osmosis pgsql schema

Stefan de Konink stefan at konink.de
Fri Oct 31 15:19:06 GMT 2008


Matt Amos wrote:
> On Fri, Oct 31, 2008 at 2:53 PM, Stefan de Konink <stefan at konink.de> wrote:
>> Matt Amos wrote:
>>> quick question: if your schema used ordered relations instead of ways,
>>> do you have an unordered relation type as well?
>> That is a client rendering issue. The order is maintained as how it is
>> inserted with an explicit idx. If mapnik/geoserver doesn't care about order
>> and it is just a bunch of nodes all being campingplaces, it is just that.
> 
> would you represent a Y-shaped road as three relations, then? one for
> the left fork, one for the right stem as a way-relation, then another
> to group them together?

Yes, but with role='independent'. Otherwise the idx of the subtrees 
would create a pyramid shape.

>>>> The amount of tables is reduced, that means the amount of joins are
>>>> reduced. And the indices required for database searches are now more
>>>> efficient. Queries therefore get shorter, no need for a specific way
>>>> renderer.
>>> except when your relation doesn't relate linear features.
>> What do you mean with linear features? The relation still has the ability to
>> relate nodes or a relations. So I don't really see what you mean.
> 
> when you say "no need for a specific way renderer" - there is still a
> need, as (in your example) you wouldn't want to render a bunch of
> camping nodes as a linear feature. you'll also want to render
> buildings filled. in other words: there isn't a single, specific way
> renderer anyway because tag inspection is required.

For Mapserver I have created a ColumnsToPoints, ColumnsToLineString and 
ColumnsToPolygon. What is chosen depends on the tags used. So for 
example a road has a tag 'highway'. This would select it in 
ColumnsToLineString. On the other hand, if k=Area v=True|Yes|1 it will 
be selected when Polygons are required.

In the first version of the RelationOSM thing I created the same thing 
in the relationship code, when the api 0.5 was used. If the tag way=true 
was present, it would be rendered as <way><nds/></way>.


Stefan




More information about the dev mailing list