On Jun 4, 2010, at 8:32 AM, Artem Pavlenko wrote:
>
>
> On 4 June 2010 16:05, Michal Migurski <[email protected]> wrote:
> On Jun 2, 2010, at 7:32 AM, Dane Springmeyer wrote:
>
> > My first guess would be that Mapnik is unable to reproject the osm data
> > into UTM because the osm layers extents are not valid for UTM.
>
> Out of curiosity, what does it mean that the OSM layers are invalid for UTM?
>
> I think Dane meant that you can't re-project the whole world using UTM.
> Transverse Mercator projections are only valid for a particular region (zone).
Yes, exactly, thanks for the way clearer language!
> If there's very long way spanning multiple UTM zones, re-projecting it wont
> produce anything sensible. I'm still not sure what's the best way to handle
> this in Mapnik, perhaps we can clip to the valid region (it's not going to be
> rectangular shape. though) before sending coordinates to proj4 or use
> something more robust than proj4. Any other ideas most welcome!
I've been wondering if we need to switch to clipping (the extents used to
determine layer intersection in feature_style_processor.cpp) by map extent
(rather than layer extent), while adding the ability to manually set the
MAX_EXTENT in the <Map /> section of an xml (in the target projection). This
method would open the door to bogus (and unprojectedable) extents being passed
to proj4 based on the map bbox, but hopefully most situations could be
prevented using a MAX_EXTENT variable, which could be auto-calculated from each
layer if not set (http://trac.mapnik.org/ticket/506).
I don't quite have the headspace to properly test this right now, but I pointed
Philip at this idea, as he mentioned he was going to look into this issue (from
the perspective of another proj4 problem), as per:
http://trac.mapnik.org/ticket/402#comment:18
Either way I think we need lots of tests against the current approach and any
new approach, before making a change.
See also open tickets at http://trac.mapnik.org/wiki/BoundsClipping
Dane
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users