Re: [mapserver-users] using gdalinfo.exe

2008-04-09 Thread Ken S. Elvehjem

Frank,

Thank you for the response.  Is there some other way to get some of  the 
gdal  info with a simple query?  I'm not stuck on using gdalinfo... it 
just seemed like a good idea.


What I need is the UTM Zone -- that's already specified (I guess) in the 
EPSG statement in the mapfile.  Can it be extracted from there over the web 
by way of a URL / query?


Ken


- Original Message - 
From: Frank Warmerdam [EMAIL PROTECTED]

To: Ken S. Elvehjem [EMAIL PROTECTED]
Cc: mapserver-users@lists.osgeo.org
Sent: Tuesday, April 08, 2008 9:25 PM
Subject: Re: [mapserver-users] using gdalinfo.exe



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.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=NAIP2006STYLES=SRS=EPSG:4269BBOX=611300,4815500,613300,4817500WIDTH=800HEIGHT=800FORMAT=image/jpeg 
http://206.183.188.202/cgi-bin/mapserv.exe?map=c:\ms4w\Apache\htdocs\SD\mccook-wms.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=NAIP2006STYLES=SRS=EPSG:4269BBOX=611300,4815500,613300,4817500WIDTH=800HEIGHT=800FORMAT=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, 
[EMAIL PROTECTED]

light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| President OSGeo, http://osgeo.org



___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] using gdalinfo.exe

2008-04-09 Thread Frank Warmerdam

Ken S. Elvehjem wrote:

Frank,

Thank you for the response.  Is there some other way to get some of  the 
gdal  info with a simple query?  I'm not stuck on using gdalinfo... it 
just seemed like a good idea.


What I need is the UTM Zone -- that's already specified (I guess) in the 
EPSG statement in the mapfile.  Can it be extracted from there over the 
web by way of a URL / query?


Ken,

There is no stock mechanism for this, but you could write a custom
mapscript application to pick this information out of the map file and
return it as a web service.  I would note though that MapServer does not
normally provide access to stuff like file bounds to mapscript so there
it is hard to provide very much information using mapscript itself.

You could try setting up the dataset as WCS accessable, and then the
WCS DescribeCoverage method would provide a variety of information about
the file.

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

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] using gdalinfo.exe

2008-04-08 Thread Ken S. Elvehjem

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.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=NAIP2006STYLES=SRS=EPSG:4269BBOX=611300,4815500,613300,4817500WIDTH=800HEIGHT=800FORMAT=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?

Many Thanks,

Ken S. Elvehjem


MapFile: 

MAP
  NAME MCCOOK
  STATUS ON

  IMAGETYPE JPEG
  SIZE 600 600

  PROJECTION
   init=epsg:26914
  END
 
  UNITS METERS
#[minx] [miny]  [maxx] [maxy] in meters
  EXTENT 610471 4810318 651740 4859698

  #-
  WEB
 TEMPLATE SD.html
 IMAGEPATH C:\ms4w\Apache\htdocs\tmp/
 IMAGEURL /tmp/
 
   METADATA
 wms_title   WMS McCOOK
 wms_onlineresource  http://206.183.188.202/cgi-bin/mapserv?;
   wms_srs EPSG:26914 EPSG:26914
 END

 
  END

  #-
  LAYER
NAME NAIP2006
TYPE RASTER
STATUS DEFAULT
DATA mccook/mccook2006.sid

 PROJECTION
   init=epsg:4269
 END

   METADATA
 wms_title   WMS McCOOK
 wms_onlineresource  http://206.183.188.202/cgi-bin/mapserv?;
   wms_srs EPSG:4269 EPSG:4326
 END

  END

END # Map File
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] using gdalinfo.exe

2008-04-08 Thread Frank Warmerdam

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.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=NAIP2006STYLES=SRS=EPSG:4269BBOX=611300,4815500,613300,4817500WIDTH=800HEIGHT=800FORMAT=image/jpeg 
http://206.183.188.202/cgi-bin/mapserv.exe?map=c:\ms4w\Apache\htdocs\SD\mccook-wms.mapSERVICE=WMSVERSION=1.1.1REQUEST=GetMapLAYERS=NAIP2006STYLES=SRS=EPSG:4269BBOX=611300,4815500,613300,4817500WIDTH=800HEIGHT=800FORMAT=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, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| President OSGeo, http://osgeo.org

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users