Ticket #998 (new enhancement)

Opened 4 years ago

Last modified 3 years ago

MapScript's prepareImage() doesn't support non-square pixels

Reported by: dmorissette Assigned to: sdlime
Priority: high Milestone: FUTURE
Component: MapScript Version: 4.3
Severity: minor Keywords:
Cc: sgillies@frii.com

Description

While working on bug 945, it was noted that MapScript's prepareImage (SWIG and
PHP) could not easily be made to support non-square pixels. This is a low
priority, but I'm filing this as an enhancement bug so that we don't forget.

Here is what I had written in bug 945:
> 
> Frank: I was not sure how to handle the MS_NONSQUARE thing inside
> msPrepareImage() since it requires that the caller should call
> msMapRestoreRealExtent() when he's done. With scripts calling
> $map->prepareimage() there is no way to guarantee that this would happen. To
> resolve the issue quickly, I simply added a allow_nonsquare boolean which is
> set to MS_FALSE from MapScript, and is set to MS_TRUE when called from 
> msDrawMap().
> Could you please review what I've done and tell us if it would be possible to
> allow mapscript to call prepareimage with nonsquare pixels and get rid of my
> allow_nonsquare hack?

Change History

10/26/04 21:44:01 changed by dmorissette

  • cc set to sgillies@frii.com.
  • milestone set to FUTURE.
Setting FUTURE target milestone. This is definitely not a priority for 4.4

04/12/05 14:33:32 changed by sgillies@frii.com

  • blocked set to 1310.

02/22/06 14:50:26 changed by akrherz@iastate.edu

Hi,

For what it is worth, it would be nice to see this feature supported.  Are there
any updates?

thanks,
  daryl

02/22/06 16:50:50 changed by sgillies@frii.com

Daryl, also check out bug 1645. Frank suggested a solution that doesn't seem to
be working for that reporter. I tried something similiar a few months ago also
without success. Nonsquare pixels is controlled by several parameters and I
haven't hit the right combination yet.

02/23/06 18:09:04 changed by sgillies@frii.com

Disregard comment #3. As long as layers have projections, the MS_NONSQUARE
config option is all that's needed.