Ticket #947 (closed enhancement: fixed)

Opened 9 years ago

Last modified 9 years ago

assume map projection for layers without projections

Reported by: pspencer@… Owned by: mapserverbugs
Priority: high Milestone: 4.4 release
Component: WMS Server Version: 4.3
Severity: minor Keywords:
Cc: sgillies@…

Description

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.

Change History

Changed 9 years ago by dmorissette

  • cc warmerdam@…, sgillies@…, steve.lime@… added
  • status changed from new to assigned
<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.

Changed 9 years ago by dmorissette

  • dependson set to 862

Changed 9 years ago by dmorissette

  • milestone set to 4.4 release
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

Changed 9 years ago by dmorissette

  • status changed from assigned to closed
  • resolution set to fixed
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.
Note: See TracTickets for help on using tickets.