layer->project defaulted to MS_TRUE.

Frank Warmerdam warmerdam at POBOX.COM
Thu Feb 9 23:59:02 EST 2006


Folks,

For http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1645 there was
a problem with getting NONSQUARE mode to work.

I tracked this down to the projection code not being invoked because
layer->project was MS_FALSE.  The nonsquare code depends on going
through the projection jacket functions, but by default we don't
consider using them if map->project is MS_FALSE.  This is the default
if there is no PROJECTION object set on the layer.

To deal with this, I modified InitLayer in mapfile.c to default
layer->project to MS_TRUE, even if no projection information is
available.

This seems to resolve the problem, and with no apparent negative side
effects.

I think the main purpose of layer->project is to prevent doing alot of
projections related work for each feature.  As things stand, it will
get reset to false in msDrawLayer() if the map and layer projections
do not differ.  This is the same as the logic used to be.  So I think
that will prevent doing alot of needless projection attempts still.

Anyways, I'm just writing so people know there has been some hackage
on this in 4.9, and to keep it in mind if things suddenly get weird.

I'm afraid to backport this into 4.8.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, 
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-dev mailing list