[OSM-dev] Osm2pgsql 'route' relations geometry building

Kai Krueger kakrueger at gmail.com
Tue Jan 28 18:14:47 UTC 2014


Hi,

I am not sure I fully understand what you are trying to do, but the part
of the code that seems most likely what you are looking for is the
function pgsql_out_relation (
https://github.com/openstreetmap/osm2pgsql/blob/master/output-pgsql.c#L693
). First I thought you might be able to use the lua tagtransform to do
this, but it doesn't actually pass the osm_ids (or geometry) into the
lua script.

If this is a general thing people want and need to do, perhaps one could
expand the lua interface to pass the necessary information in to do
these kind of processing steps too?

Kai

On 01/27/2014 02:16 PM, yvecai wrote:
> I'm looking for the code in OSm2pgsql responsible for 'route' relations
> pre-processing.
> 
> When a relation make a loop on itself (the same way appears twice in the
> relation, backward, then later forward) osm2pgsql does the same: the
> resulting linestring is complete. Certainly great for routing, this has
> some un-desired effects (at least for me) for rendering.
> For instance if using 'offset' parameter in mapnik, the forward part
> will be offset left, and the backward right, which I'd like to avoid in
> some cases.
> Could somebody points me to the relevant part of the code where I could
> check for duplicate way IDs passed to geos Linemerger ?
> 
> Yves, not so good in reading C
> 
> 




More information about the dev mailing list