Problem with call to zoomRectangle() function in Python mapscript
Bill Hudspeth
bhudspeth at EDAC.UNM.EDU
Fri Aug 27 06:41:45 PDT 2004
I am experiencing an unknown problem with a call to the map object
zoomRectangle() function in Python mapscript. My code looks like this:
*************************************
self.nmMap = mapscript.mapObj()
self.img_width = self.nmMap.width
self.img_height = self.nmMap.height
self.prev_minx=45726.60 #utm coords
self.prev_miny=3400000.0 #utm coords
self.prev_maxx=785072.39 #utm coords
self.prev_maxy=4153198.0 #utm coords
self.down_x=240 #pixel coords
self.up_x=330 #pixel coords
self.down_y=145 #pixel coords
self.up_y=208 #pixel coords
prevExtent =mapscript.rectObj(float(self.prev_minx),
float(self.prev_miny), float(self.prev_maxx), float(self.prev_maxy))
zoomRect=mapscript.rectObj(min(float(self.down_x), float(self.up_x)),
min(float(self.down_y), float(self.up_y)), max(float(self.down_x),
float(self.up_x)), max(float(self.down_y), float(self.up_y)))
self.nmMap.zoomRectangle(zoomRect, int(self.img_width),
int(self.img_height), prevExtent, prevExtent)
**************************************
The error I am receiving is:
****************
General error message. Georeferenced coordinates miny <= maxy.
***********************
This message is a little cryptic - would appreciate any ideas on where
to go with it.
Thanks, Bill
More information about the MapServer-users
mailing list