Negative values in extent
Ed McNierney
ed at TOPOZONE.COM
Tue Dec 14 06:49:46 PST 2004
Miroslav -
Your EXTENT statement has a maximum Y value (-1046000) that is smaller than the minimum Y value (-1043200). Negative values are fine, but MINY must be less than MAXY.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
Phone: +1 978 251-4242 Fax: +1 978 251-1396
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Miroslav Šulc
Sent: Tuesday, December 14, 2004 9:32 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Negative values in extent
Hi,
I have upgraded to mapserver 4.4.0 and I am having problem with negative values in EXTENT in MAP file. I have maps in S-JTSK (Czech norm) and this is a system with negative values. Here is my EXTENT:
EXTENT -747200 -1043200 -747000 -1046000
These worked for me when I used the mapserver script. But I cannot make them work throught the php mapscript. Thought I finally "succeeded"
(they appear in the $map->extent till next method is called) to get the negative extent to the map object, I still get error that the map cannot be drawn.
Info: object(ms_rect_obj)#46 (5) { ["_handle_"]=> resource(361) of type
(Unknown) ["minx"]=> int(-747200) ["miny"]=> int(-1043200) ["maxx"]=>
int(-747000) ["maxy"]=> int(-1046000) }
*Warning*: [MapServer Error]: msDrawMap(): Unable to initialize image.
in
*/var/www/intranet.centaur.startnet.cz/htdocs/modules/maps/CMap.cls.php*
on line *106*
*Warning*: [MapServer Error]: msCalculateScale(): Invalid image extent, minx=-1.000000, miny=-1.000000, maxx=-1.000000, maxy=-1.000000. in
*/var/www/intranet.centaur.startnet.cz/htdocs/modules/maps/CMap.cls.php*
on line *106*
Here is my code (it's copied from the hello example):
$map = ms_newMapObj($this->m_Row['MapFilePath']);
$extent = ms_newRectObj();
$extent->minx = -747200;
$extent->miny = -1043200;
$extent->maxx = -747000;
$extent->maxy = -1046000;
$map->extent = $extent;
$image = $map->draw();
$map_file = $image->saveWebImage();
Does Mapserver support negative values in extent? If not, is there any workaround? I will appreciate any suggestion.
--
Miroslav Šulc, CEO
StartNet s.r.o.
----------------------------------------------------
Vrchlického 161/5, Praha 5, 150 00, Česká republika
----------------------------------------------------
ICQ: 60144073
web: www.startnet.cz, www.novavystavba.cz
----------------------------------------------------
mobil: +420 603 711 413
telefon: +420 257 225 602
----------------------------------------------------
More information about the MapServer-users
mailing list