WxS Mapscirpt Question

Frank Warmerdam warmerdam at POBOX.COM
Mon Dec 4 18:02:22 EST 2006


Ben Tuttle wrote:
> Hi all-
> I am working on setting up a WCS with mapserver. It seems that when a
> request is made mapserveoften returns an image that is one line and
> sample smaller than the bounding box thus resulting in a image with a
> resolution different from the original data resolution (it seems that
> mpaserver forces all the requested lines and samples into the output
> file by resampling). I am trying to use mapscript (with php) to catch
> the request and calculate width and height to return the same
> resolution as the original data. So I am wondering if there is a way
> to get at the wcs_resolution info in the mapfile through mapscript?
> I've poked around the docs, but am wondering if perhaps I am
> overlooking something.

Ben,

I believe the layer object should have an element called "metadata"
that is a hash table object, support methods like get().

In python I think you would fetch the wcs_resolution something like:

   wcs_res_string = layer.metadata.get( "wcs_resolution", "" );

Hmm, the php code looks different.  It looks like it doesn't wrap
the hashTableObj the same way.  In php it seems you might do something
like:

   $wcs_res_string = $layer->getMetaData( "wcs_resolution" );

Apparently the PHP function returns "" if the entry does not exist.
I'm basing this on reading the mapserver/mapscript/php3/README file.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list