[gdal-dev] Using VRT images with derived bands (pixel function)
armin.burger at gmx.net
Thu Feb 16 04:15:58 EST 2012
thanks a lot for the help.
So it is sufficient to add SetEnv GDAL_DRIVER_PATH ..., place the file with the pixel function there, and Mapserver can find pixel function referenced in the VRT file? What kind of compilation did you use? Create a shared library *.so or is the *.o object file sufficient?
-------- Original-Nachricht --------
> Datum: Thu, 16 Feb 2012 09:31:11 +0100
> Von: Yves Jacolin <yjacolin at free.fr>
> An: gdal-dev at lists.osgeo.org, armin.burger at gmx.net
> Betreff: Re: [gdal-dev] Using VRT images with derived bands (pixel function) with MapServer
> I am using such application stack: netcdf > vrt and pixel functions > GDAL
> We have a tiled layer inside PostGIS and we juste configure the layer like
> other tiled datasource:
> STATUS ON
> NAME "layer_idx"
> TYPE POLYGON
> CONNECTION "dbname=mydb host=localhost user=myUser password=mypassword"
> CONNECTIONTYPE postgis
> DATA "the_geom FROM myLayer USING srid=4326"
> "wms_srs" "EPSG:4326"
> "wms_timeextent" "2010-12-20/2010-12-26"
> "wms_timeitem" "datetime" #column in postgis table of type timestamp
> "wms_timedefault" "2010-12-24T00:00:00Z"
> "wms_enable_request" "*"
> If you want to use the vrt file directly it is also possible as easily as:
> DATA "vrt/myLayer.vrt"
> About register the plugin, in Apache config you have to use SetEnv this
> SetEnv GDAL_DRIVER_PATH directory/mapserver/misc
> SetEnv MS_MAPFILE directory/mapserver/mymapfile.map
> SetEnv MS_MAPFILE_PATTERN "^directory/mapserver/mymapfile.map"
> Le Mercredi 15 Février 2012 19:52:21 Armin Burger a écrit :
> > Dear all
> > I would be interested in using VRT images with "derived bands" as
> > described on the VRT image documentation page. This requires the
> > definition of a pixel function and the registration of this function in
> > the used application via "GDALAddDerivedBandPixelFunc".
> > The provided sample function is already towards what I'm looking for. I
> > would just need to adapt it accordingly (calculating band 1 as
> > combination of source band 1 and 3).
> > Since my main interest is to use such image definition in the context of
> > Mapserver, my question is if there could be a way to use this also from
> > Mapserver as application? If yes, where would I need to register the
> > function and how would I best make the function available to Mapserver
> > (maybe via an .o file that is created when compiling)? Maybe somewhere
> > inside mapgdal.c ?
> > Would such a pixel function be used also in case when not the full
> > resolution image (i.e. TIFF file referenced in the VRT file) is read but
> > one of the overviews from the .ovr file associated to the Tiff file?
> > Thanks in advance for any hints
> > Armin
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> Yves Jacolin
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
More information about the gdal-dev