Opened 14 years ago

Last modified 12 years ago

#3443 new defect

Dangers for unprojectable layers

Reported by: warmerdam Owned by: sdlime
Priority: normal Milestone: 6.0.2 release
Component: MapServer C Library Version: 6.0
Severity: normal Keywords:
Cc: mko, dmorissette, warmerdam

Description

A client is encountering a problem where a tileindex raster layer is in an lcc projection and map request is issued in lat/long. If the lat/long request is from the other side of the world the reprojection into lcc will fail and currently msProjectRect() substitutes a "whole world" region due to the failure of the reprojection, but does return MS_FAILURE.

Unfortunately, the MS_FAILURE is ignored by the tileindex machinery of mapraster.c, and all tiles are selected. In turn it seems that attempts to select an appropriate region on the source files by reprojecting the map region fails and so the whole tile image is loaded as a fallback. Then much pointless work is done trying to sample the whole (huge in our case) tile, and nothing gets rendered.

So the point is that our effort to continue despite failure of msProjectRect() is causing serious performance problems in some configurations. Attached is a small patch to give up with a debug message but no error for layers into which the map request cannot be reprojected.

It is not entirely clear to me how wise it would be to change the default behavior in this way, but I offer the patch for consideration and possible future use.

Attachments (2)

worldbounds.patch (949 bytes ) - added by warmerdam 14 years ago.
3443-ms542.patch (1.9 KB ) - added by mko 13 years ago.
Adapted patch throwing an exception in stead of debug message only.

Download all attachments as: .zip

Change History (6)

by warmerdam, 14 years ago

Attachment: worldbounds.patch added

by mko, 13 years ago

Attachment: 3443-ms542.patch added

Adapted patch throwing an exception in stead of debug message only.

comment:1 by mko, 13 years ago

Cc: mko added
Version: unspecifiedsvn-trunk (development)

comment:2 by sdlime, 13 years ago

Milestone: 6.0.2 release
Version: svn-trunk (development)6.0

comment:3 by sdlime, 13 years ago

Cc: dmorissette added

Adding Daniel. Any reason not to patch 6.0? I'll defer to the raster guru's...

Steve

comment:4 by dmorissette, 12 years ago

Cc: warmerdam added

Raster guru, that would be Frank... adding him to CC...

Note: See TracTickets for help on using tickets.