[mapserver-users] using gdalinfo.exe

Frank Warmerdam warmerdam at pobox.com
Tue Apr 8 22:25:10 EDT 2008


Ken S. Elvehjem wrote:
>  
> Hi,
>  
> I'm currently generating a query from my software to access a MrSid file 
> that I have on my MapServer; here's the link:
>  
> http://206.183.188.202/cgi-bin/mapserv.exe?map=c:\ms4w\Apache\htdocs\SD\mccook-wms.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NAIP2006&STYLES=&SRS=EPSG:4269&BBOX=611300,4815500,613300,4817500&WIDTH=800&HEIGHT=800&FORMAT=image/jpeg 
> <http://206.183.188.202/cgi-bin/mapserv.exe?map=c:\ms4w\Apache\htdocs\SD\mccook-wms.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=NAIP2006&STYLES=&SRS=EPSG:4269&BBOX=611300,4815500,613300,4817500&WIDTH=800&HEIGHT=800&FORMAT=image/jpeg>
>  
> I'd like to be able to generate a URL that will get me the "gdalinfo" on 
> that file...  Here's what doesn't work:
>  
> http://206.183.188.202/cgi-bin/gdalinfo.exe?c:\ms4w\Apache\htdocs\SD\mccook\mccook2006.sid
>  
> Could someone point out A.) if I'm barking up the wrong tree 
> completetely, and if not, B.) what does that kind of query/URL need to 
> look like?

Ken,

I'm not aware of anyone doing anything quite like this.  gdalinfo isn't
setup to be used as a cgi, and doesn't return things html encoded or
with a content-type header.  And MapServer does not have an equivelent
functionality.

But, in theory, you could write a little gdalinfo script in php/perl/python
that would execute gdalinfo on a passed argument filename and then return
the result with a proper "Content-type: text/plain" header.

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