Negative values in extent

Miroslav Šulc miroslav.sulc at STARTNET.CZ
Tue Dec 14 09:31:54 EST 2004


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
----------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: miroslav.sulc.vcf
Type: text/x-vcard
Size: 387 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041214/e7bb1fa8/miroslav.sulc.vcf


More information about the mapserver-users mailing list