php Mapscript $Layer->getExtent returns strange BBOX
Andreas Albarello
andreas.albarello at TERRITORIUMONLINE.COM
Tue Sep 11 13:10:39 PDT 2007
Milo van der Linden wrote:
> $newLayer = ms_newLayerObj($map, $map->getLayerByName('original_layer'));
> $newLayer->set('data', '\'the geom from (select * from myLayer where
> F_id in (select F_id from anotherLayer where project_id=1)) as lppg
> USING UNIQUE F_id USING SRID=4326\'');
> //$newLayer->set('status', MS_ON);
> echo $newLayer->data;
> $rectObj = $newLayer->getExtent();
>
> var_dump($rectObj);
>
> The vardump returns:
> { ["_handle_"]=> resource(47) of type (Unknown) ["minx"]=>
> float(-25000000) ["miny"]=> float(-25000000) ["maxx"]=> float(25000000)
> ["maxy"]=> float(25000000) }
>
> But I need coordinates in lat/lon wgs84?
Milo,
the getExtent() call is not implemented for PostGIS layers and therefore
always returns +/-FLT_MAX, which is +/-25000000.
Best regards,
--
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development
Territorium Online srl/GmbH
Via Buozzi/Buozzistraße 12 - I 39100 Bolzano/Bozen
email: andreas.albarello at territoriumonline.com
web: www.territoriumonline.com
--------------------------------------------------------------------
More information about the MapServer-users
mailing list