[Mapserver-users] have a dynamic map file?

Dylan Keon keon at nacse.org
Fri Mar 7 16:19:38 EST 2003


Chen,

I'm not sure if this can be done with the CGI version of MapServer, but 
it can definitely be done using one of the MapScript versions.  Here's a 
page with more information about PHP MapScript: 
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScript .  There are 
also Wiki pages for Perl and Python MapScript.

I'm currently working on a PHP MapScript application that does something 
similar to what you want to do.  Another application allows a user to 
perform various analyses on remotely sensed imagery.  That output can 
then be viewed by clicking a "map results" button.  When that button is 
clicked it passes the image filename and world file extension to my PHP 
app via the URL.  That information is then used to create a dynamic 
layer with the DATA parameter set to the new image, etc.

In your case, you could do something similar where the user selects the 
image they want to view and that information is passed to your waiting 
PHP (or Perl, etc) application.  If you need a single layer composed of 
several Landsat images, as part of your application you could make a 
call to gdaltindex (available as part of the GDAL distribution) to 
create a tiled index layer for the multiple images.  Then just set up 
the dynamic layer to use that index layer.

Hope that helps,
--Dylan


-- 
************************************************
  Dylan Keon
  GIS/Database Research Specialist
  Northwest Alliance for Computational
  Science and Engineering (NACSE)
  Oregon State University
  Corvallis, OR 97331
  keon at nacse.org        (541) 737-6608
************************************************


Chen Fu wrote:
> Sorry, I didn't tell my story clearly enough.
> 
> I'm working in a Satellite Station of China. We
> receive data of many remote sensing statellite like
> LandSat, SPOT, radarsat. The total number of quick
> view images will be enormous. and everyday we have
> hundreds new quickview images uploaded to the web for
> the people to browse. 
> 
> The user can pick out a perfect image from the images
> overlaped on the same area according to the cloud
> coverage or season. Sometimes the user would like to
> have an image of a large area which compose of several
> Landsat7 images. so candidate images should be listed
> beside the mapsever's client and once the user click
> on one of them, the new image is shown(or merged) with
> the other images selected before.
> 
> My solution should be dynamic online. the image source
> is updated everyday, so the static tiled layer
> solution seems not feasible. 
> 
> Any other good idea? :)
> 
> 
> 
> --- Ed McNierney <ed at topozone.com> ???:> Look at
> the TILEINDEX keyword, and read the Raster
> 
>>HOWTO documentation.  One MapServer layer can
>>contain many images.  I have a single MapServer
>>layer with over 50,000 images in it.
>>
>>	- Ed
>>
>>Ed McNierney
>>President and Chief Mapmaker
>>TopoZone.com / Maps a la carte, Inc.
>>73 Princeton Street, Suite 305
>>North Chelmsford, MA  01863
>>Phone: (978) 251-4242  Fax: (978) 251-1396
>>ed at topozone.com
>>
>>
>>-----Original Message-----
>>From: Chen Fu [mailto:novalet at yahoo.com.cn] 
>>Sent: Thursday, March 06, 2003 5:50 AM
>>To: mapserver-users at lists.gis.umn.edu
>>Subject: [Mapserver-users] have a dynamic map file?
>>
>>Hi! 
>>
>>I am using mapserver as server to browse satellite
>>image quickview (resampled image) . my question is
>>how
>>to have a dynamic map file.
>>
>>In demos of mapserver, we only select some layers
>>that
>>are already described in map file, and [layers] tell
>>cgi to show some and hide others.
>>
>>Because there is thousands of images, and in
>>mapserver
>>one image must be a layer, i must dynamic generate a
>>new map file to tell mapserver which tiff must be
>>catched to render. But i dont know how to do it yet.
>>Any guru can give me a hand?
>>
>>Thank you :)






More information about the mapserver-users mailing list