MapServer / MapServer-import

3 stars 2 forks source link

assume map projection for layers without projections #947

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: pspencer@dmsolutions.ca Date: 2004/10/07 - 20:11

this would be a convenience enhancement.  In a map file that has a projection
defined at the map level, this projection can be used for any layers that don't
have projections defined.  The practical consequence of this would be the
eliminating the requirement to define mutliple projection objects in the map file.  

Currently if a layer has no projection object then it won't be reprojected if
the wms server is asked for that layer in different projection, resulting in no
image, or a distorted image.  This seems counter-intuitive to me since the
projection of the map as a whole (and hence the layers?) is defined and should
be useable for reprojection.
tbonfort commented 12 years ago

Author: dmorissette Date: 2004/10/08 - 18:31

<rant>The requirement for projections in WMS mapfiles is well documented and we
already produce a warning in GetCapabilities if a layer in the mapfile has no
projection defined. It seems that this is not enough and users still make that
common mistake. In the interest of reducing RTFM frustrations</rant> I guess it
could make sense to automatically do this for WMS.

In the case of the mapserv CGI and MapScript, I think this would mean a change
of behavior that could potentially confuse existing apps. Not setting a
projection on a given layer in a mapserver mapfile is a feature (not a bug) that
can be used by those who care about performance. For sure we would never
consider forcing projections on all layers as the map is loaded as this would
create unnecessary overhead for apps that don't need reprojection. The only
thing that could be acceptable would be an optional argument to the
$map->setProjection() call in MapScript that would request forcing projections
on all layers if it is set (and an equivalent thing for the mapserv CGI).

I'll CC Steve, Frank and Sean on this bug to see what they think.
tbonfort commented 12 years ago

Author: dmorissette Date: 2004/10/29 - 21:44

Working on this, since I got ne feedback on my previous comment, solution will
be specific to WMS and is described in bug 862 comment #6
tbonfort commented 12 years ago

Author: dmorissette Date: 2004/11/01 - 01:02

Fixed (will be in 4.4.0-beta2). 

The fix was implemented as described in bug 862 comment 6 and is specific to
WMS. I have created bug 1016 about required update to the WMS Server HOWTO.