Raster EXTENT on the fly {Scanned}

Siki Zoltan siki at AGT.BME.HU
Thu Jan 18 13:46:57 EST 2007


Hi, 

Did you try layer's getExtent?

-- from phpmapscript documentation

rectObj getExtent()
        Returns the layer's data extents. 
        If the layer's EXTENT member is set then this value is used, 
        otherwise this call opens/closes the layer to read the 
        extents. This is quick on shapefiles, but can be
        an expensive operation on some file formats or data sources.
        This function is safe to use on both opened or closed layers: it
        is not necessary to call open()/close() before/after calling it.

On Thu, 18 Jan 2007, Luca Casagrande wrote:

> Thanks for your answer!
> 
> The matter is that i am trying to found have to set $minx.$miny,$maxx,$maxy reading the 
> raster. I think that the only solution is to use gdalinfo and parse the output, but i don't
> know if this it's ok inside a php script.
> 
> What do you think about?
> 
> Thanks
> Luca
> 
> On Thu, 18 Jan 2007 10:08:50 +0100
> "Bart van den Eijnden (OSGIS)" <bartvde at osgis.nl> wrote:
> 
> > Ofcourse there is :-) :
> > 
> > $oMap->setExtent($minx, $miny, $maxx, $maxy);
> > 
> > Best regards,
> > Bart
> 
> > --------- Oorspronkelijk bericht --------
> > Van: Luca Casagrande <luca.casagrande at GMAIL.COM>
> > Naar: MAPSERVER-USERS at LISTS.UMN.EDU <MAPSERVER-USERS at LISTS.UMN.EDU>
> > Onderwerp: [UMN_MAPSERVER-USERS] Raster EXTENT on the fly
> > Datum: 18/01/07 07:08
> > 
> > > Hi to all!
> > > 
> > > I have a php app that display a list with some rasters; the user select on
> > of them and then submit the form to show it.
> > > Using mapscript, I can add the layer section to the mapfile used as
> > template, but i can't found a way to set the EXTENT.
> > > 
> > > Is there any way for doing this?
> > > 
> > > Thanks
> > > Luca
> 
> 
> 
> 



More information about the mapserver-users mailing list