Discussion:
[Mapserver-users] have a dynamic map file?
Chen Fu
2003-03-06 10:50:18 UTC
Permalink
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 :)


_________________________________________________________
Do You Yahoo!?
"ÓÃÑÅ»¢ËÑË÷£¬ÕÒµœ¹ØÓÚ°Â˹¿šµÄÒ»ÇÐ"
http://cn.search.yahoo.com/search/cn?p=%b0%c2%cb%b9%bf%a8
Oliver Wesp
2003-03-06 11:28:15 UTC
Permalink
Hi,
you can define a static raster layer in your mapfile and if the user
selects one of the tiffs it's possible to change the DATA value of this
layer dynamically via CGI. The form variable should look like this:

<input type="hidden" name="map_LAYERNAME_data" value="path/to/tif">

That way you can display any of your tiffs without generating a new map
file. All you need is client side processing of the pathnames.

hope that helps.
Oliver

P.S. If you're using 3.7 you need to define DATAPATTERN in order to change
the datasource of a layer. There was a post a few days ago (02/27) from Jan
Hartmann which explains the use of DATAPATTERN.
Post by Chen Fu
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.
--
Dipl.-Geogr. Oliver Wesp
Gesellschaft für geografische Datenverarbeitung
Binger Strasse 49-51
D-55218 Ingelheim
fon: +49 6132 714818
fax: +49 6132 714828
http: <http://www.gdv.com>www.gdv.com
Chen Fu
2003-03-06 11:48:52 UTC
Permalink
Thank for your suggestion :)

But in fact, i try to display several images at the
same time for maybe the user like to have several
images nearby to describe a larger area. Maybe we can
leave ten layers (the largest number) for raster and
show only some of them according to the user's
selection.

But do we have a easy way to write some php or cgi to
generate new map? Or is there something like #include
in map file to link another file which i can store the
dynamic layers inside and regenerate it frequently?
Post by Oliver Wesp
Hi,
you can define a static raster layer in your mapfile
and if the user
selects one of the tiffs it's possible to change the
DATA value of this
layer dynamically via CGI. The form variable should
<input type="hidden" name="map_LAYERNAME_data"
value="path/to/tif">
That way you can display any of your tiffs without
generating a new map
file. All you need is client side processing of the
pathnames.
hope that helps.
Oliver
P.S. If you're using 3.7 you need to define
DATAPATTERN in order to change
the datasource of a layer. There was a post a few
days ago (02/27) from Jan
Hartmann which explains the use of DATAPATTERN.
At 18:50 06.03.2003 +0800, =?gb2312?q?Chen=20Fu?=
Post by Chen Fu
Hi!
I am using mapserver as server to browse satellite
image quickview (resampled image) . my question is
how
Post by Chen Fu
to have a dynamic map file.
In demos of mapserver, we only select some layers
that
Post by Chen Fu
are already described in map file, and [layers]
tell
Post by Chen Fu
cgi to show some and hide others.
Because there is thousands of images, and in
mapserver
Post by Chen Fu
one image must be a layer, i must dynamic generate
a
Post by Chen Fu
new map file to tell mapserver which tiff must be
catched to render. But i dont know how to do it
yet.
--
Dipl.-Geogr. Oliver Wesp
Gesellschaft für geografische Datenverarbeitung
Binger Strasse 49-51
D-55218 Ingelheim
fon: +49 6132 714818
fax: +49 6132 714828
http: <http://www.gdv.com>www.gdv.com
_________________________________________________________
Do You Yahoo!?
"ÓÃÑÅ»¢ËÑË÷£¬ÕÒµœ¹ØÓÚ°Â˹¿šµÄÒ»ÇÐ"
http://cn.search.yahoo.com/search/cn?p=%b0%c2%cb%b9%bf%a8
Ed McNierney
2003-03-06 13:24:04 UTC
Permalink
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
***@topozone.com


-----Original Message-----
From: Chen Fu [mailto:***@yahoo.com.cn]
Sent: Thursday, March 06, 2003 5:50 AM
To: mapserver-***@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 :)


_________________________________________________________
Do You Yahoo!?
"ÓÃÑÅ»¢ËÑË÷£¬ÕÒµœ¹ØÓÚ°Â˹¿šµÄÒ»ÇÐ"
http://cn.search.yahoo.com/search/cn?p=%b0%c2%cb%b9%bf%a8
Chen Fu
2003-03-07 08:26:59 UTC
Permalink
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 <***@topozone.com> µÄÕýÎÄ£º> Look at
the TILEINDEX keyword, and read the Raster
Post by Ed McNierney
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
-----Original Message-----
Sent: Thursday, March 06, 2003 5:50 AM
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 :)
_________________________________________________________
Post by Ed McNierney
Do You Yahoo!?
"ÓÃÑÅ»¢ËÑË÷£¬ÕÒµœ¹ØÓÚ°Â˹¿šµÄÒ»ÇÐ"
http://cn.search.yahoo.com/search/cn?p=%b0%c2%cb%b9%bf%a8
Post by Ed McNierney
_______________________________________________
Mapserver-users mailing list
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
Post by Ed McNierney
_______________________________________________
Mapserver-users mailing list
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

_________________________________________________________
Do You Yahoo!?
"ÓÃÑÅ»¢ËÑË÷£¬ÕÒµœ¹ØÓÚ°Â˹¿šµÄÒ»ÇÐ"
http://cn.search.yahoo.com/search/cn?p=%b0%c2%cb%b9%bf%a8
Dylan Keon
2003-03-07 21:19:38 UTC
Permalink
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
***@nacse.org (541) 737-6608
************************************************
Post by Chen Fu
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? :)
the TILEINDEX keyword, and read the Raster
Post by Ed McNierney
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
-----Original Message-----
Sent: Thursday, March 06, 2003 5:50 AM
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 :)
A***@brs.gov.au
2003-03-10 01:10:56 UTC
Permalink
Hi Chen,

I built an image catalogue for our Landsat collection using the CGI version
of mapserver. Vaguely:

I wrote an AML to read through the collection and produce for each image:
- a thumbnail (150 x 150 pixel) and overview (1200 x 1200 pixel) image
- Metadata (date, WRS, etc.)
- A shapefile showing the extent

I then had a pile of templates and Shape files in a map file, plus some forms so
that people could select imagery between certain dates. The map showed wire-frame
outlines of the image extents and the thumbnail showed up in queries and was linked
to a larger jpg overview.

If I was going to do it again, I'd probably put all the extents and metadata into
PostGIS and use GDAL to georeference the thumbnails themselves. And I'd use GDAL
(rather than ArcINFO) to render the thumbnails.

Cheers,

Antti

-----Original Message-----
From: Chen Fu [mailto:***@yahoo.com.cn]
Sent: Friday, 7 March 2003 7:27 PM
To: mapserver-***@lists.gis.umn.edu
Subject: RE: [Mapserver-users] have a dynamic map file?


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 <***@topozone.com> µÄÕýÎÄ£º> Look at
the TILEINDEX keyword, and read the Raster
Post by Ed McNierney
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
-----Original Message-----
Sent: Thursday, March 06, 2003 5:50 AM
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 :)
_________________________________________________________
Post by Ed McNierney
Do You Yahoo!?
"ÓÃÑÅ»¢ËÑË÷£¬ÕÒµœ¹ØÓÚ°Â˹¿šµÄÒ»ÇÐ"
http://cn.search.yahoo.com/search/cn?p=%b0%c2%cb%b9%bf%a8
Post by Ed McNierney
_______________________________________________
Mapserver-users mailing list
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
Post by Ed McNierney
_______________________________________________
Mapserver-users mailing list
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

_________________________________________________________
Do You Yahoo!?
"ÓÃÑÅ»¢ËÑË÷£¬ÕÒµœ¹ØÓÚ°Â˹¿šµÄÒ»ÇÐ"
http://cn.search.yahoo.com/search/cn?p=%b0%c2%cb%b9%bf%a8

Continue reading on narkive:
Loading...