Re: [mapserver-users] Mapserver 1.1.0 WCS ENVI Binary File with accompanying ENVI header
Hello, I think the file issue is resolved. It turns out the server was actually passing me three (3) separate files in multipart MIME sequence. Your comment about that made me look closer at what was coming back via the web browser. Files come in this sequence: 1.) the WCS metadata 2.) the ENVI header (HDR) file 3.) the ENVI data (IMG) file I was being a bit thick I guess. I kept wondering why the web browser was trying to give me the same file 3 times on each GetCoverage request. A second issue related to this is how to get mapserver to *Name* the files properly. Each file sent by the mapserver is called 'wcs' with no file extension. This is why I thought I was getting the same file 3 times. Is there a mapfile variable that can be set up to set the file names and extensions if ENVI multiband format is selected as the FORMAT for GetCoverage? Thanks for pointing out the multi part MIME thing. You probably saved me days of debugging and unproductive spinning. Peter --- Peter, Hopefully Stefan Meissl will answer. If not, poke me and I'll try to figure it out. For some versions of WCS multi-part responses are supported as long as GDAL knows the files are associated. Either in a zip or multi-part mime. I'm a bit rusty on this now though. Best regards, Frank On Mon, Feb 4, 2013 at 3:55 PM, Peter Willis pwil...@aslenv.com wrote: Hello, I have set up a WCS server using mapserver. I can retrieve a Float32 ENVI 'img' BSQ file just fine and select specific bands. However, I DO NOT get an accompanying header (.HDR) file with the binary data download. how do I request an HDR file for my data? Is there some special map file secret to this? I thought of making a 'pseudo' GDAL driver that wraps gdal_translate and ZIP together but I'm hoping there is an easier fix. Thanks, Peter ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- ---+ ---+-- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush| Geospatial Software Developer ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Getting centroid coords
This seemed like a simple one but I am having problems. I am trying to get the X and Y of a centroid, and display it to console. I keep getting errors instead. Here is the code: $centroid=ms_newPointObj(); $oShape=$searchLayer-getShape($oResult); //$oShape is a result from a queryByAttributes which I know is returning valid results $centroid = $oShape-getCentroid(); print Centroid=. $centroid(x).,. $centroid(y); The error message from FireBug: Fatal error: Function name must be a string in C:\htdocs\php\streamprocessBak3.php on line 75 -How do I get the X and Y to print? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Getting centroid coords
Bistrais, Bob wrote: $centroid = $oShape-getCentroid(); from http://mapserver.org/mapscript/php/index.html#shapeobj : pointObj getCentroid() Returns a point object representing the centroid of the shape. Only available if php/mapscript is built with GEOS library. Here you get an point object print Centroid=. $centroid(x).,. $centroid(y); try print Centroid=.$centroid-x; Thomasch ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Getting centroid coords
Got it- use the wrong syntax. Instead of: $centroid(x)... Should have used: $centroid-x ... From: Bistrais, Bob Sent: Tuesday, February 05, 2013 3:29 PM To: mapserver-users@lists.osgeo.org Subject: Getting centroid coords This seemed like a simple one but I am having problems. I am trying to get the X and Y of a centroid, and display it to console. I keep getting errors instead. Here is the code: $centroid=ms_newPointObj(); $oShape=$searchLayer-getShape($oResult); //$oShape is a result from a queryByAttributes which I know is returning valid results $centroid = $oShape-getCentroid(); print Centroid=. $centroid(x).,. $centroid(y); The error message from FireBug: Fatal error: Function name must be a string in C:\htdocs\php\streamprocessBak3.php on line 75 -How do I get the X and Y to print? ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users