Easy $100.00 for the working example
Aaron Racicot
aaronr at ECOTRUST.ORG
Thu May 19 16:21:29 PDT 2005
Dave,
I have been meaning to put this example out there for a while now. This
is a php-mapscript based example, so I am not even sure it will help
you.
Here is a link to a running version on my development server:
http://pearl.ecotrust.org/apps/simple_mapserver/index.phtml
You should be able to plug in your rasters (as long as you have
php-mapscript and it is compiled with GDAL and they are formats
supported by GDAL) to the mapfile following the example here and get
things going. If you are still having trouble, email the list back and
we will try to help. Please include more information in your next
posts, including file formats, installation specs, and examples if you
have them
I have made two zip files available at:
http://pearl.ecotrust.org/downloads/
1) simple_mapserver.zip
This file contains a zip of a simple php-mapscript/jBox application. It
is ~45 meg zip because I included two rasters for the demo, one in tif
format and the other in binary ArcGRID format (80 meg DEM). It uses
jBox for the rubber band and coordinate mouse over display. Do the
following to get it going:
- Unzip in an area that is web accessible.
- Edit the global_vars.php file and modify the "APP_PATH" and "HOST_URL"
variables to match your system.
- Edit mapfile/simple_test.map and modify the paths for SHAPEPATH,
SYMBOLSET, FONTSET, and REFERENCE IMAGE.
- The temp directory where all temp files are written is
"/tmp/ms_temp/". If you want to change that you will need to edit both
simple_test.map and contents.php.
- Install the Java applet jBox as per number 2 below.
2) simple_jbox.zip
This application is hard coded in contents.php to the "/java/jBox"
directory in your web URL. You either need to unzip the file there, or
change the reference in the APPLET section of contents.php.
Make sure that your permissions are A-OK and you should be good to go.
Other items to note:
- map_functions.php includes "dl('php_mapscript.so');". Make sure this
matches the name of your Mapscript installation or you will need to
change the name.
- This application uses PHP sessions in a pretty simple way, but uses
them non-the-less.
- One of the downfalls of the simple way sessions are used here is that
after the initial page loading, a temporary mapfile is saved and used
from then on. If you have an error and modify your base mapfile to fix
it, you either need to use the "logout button" or restart your browser
to get a refresh of the new mapfile. Not pretty, but it is simple.
- This all assumes php-mapscript compiled with GDAL support and your
rasters are of a supported format.
- Check out all the official docs
(http://mapserver.gis.umn.edu/doc.html) and supplemental docs on things
like jBox (http://mapserver.gis.umn.edu/doc44/jbox-howto.html) and
php-mapscript
(http://mapserver.gis.umn.edu/doc44/phpmapscript-class-guide.html)
Finally, this is just a quick demo cobbled together from some of my
apps, some stuff from DM Solutions, and other code out there. It is no
where near a final app, but should hopefully do the trick.
Also, if you send me the rasters you are dealing with (email below or
send me a download link) I could try to put them up in this app on my
machine so you can see it work.
I am not interested in your money, but if this satisfies the criteria
for your $100 and it is burning a hole in your wallet, please contact
Steve Lime (steve.lime [at] DNR.STATE.MN.US) and donate the $100 to the
upcoming Open Source GIS conference (or better yet use it to sign up and
attend!).
Again, reply to the list if you are still having problems...
Aaron
+----------------------------------------+
| Aaron Racicot | aaronr at ecotrust.org |
| GIS Programmer | 503.467.0759 |
+----------------------------------------+
| e c o t r u s t |
| Jean Vollum Natural Capital Center |
| 721 NW Ninth Avenue |
| Suite 200 |
| Portland, OR 97209 |
| www.ecotrust.org |
+----------------------------------------+
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Dave Tee
Sent: Wednesday, May 18, 2005 8:16 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Easy $100.00 for the working example
Greetings All,
I have been banging my head againest the desk now for 2 weeks and all
I
have is a lot of frustrution to show for it. I am sure for some one
that
knows what they are doing....it is a pretty easy task. I feel pretty
sure
that after seeing a working example I will pick right up on it.....but I
can not seem to get there. So I am offering $100.00 paypal to the first
one that gives me a working example of an GeoTiff and a raster with Lat
and long display.
I will supply both shots.
I can supply lat and long of the corners for both.
I can supply m/pixel for both.
To take the money I need a working example of both with Lat and Long
displayed from the mouse over.
Payment is yours as soon as I have it running on my server. (Happily I
might add!!!)
All I need is a method of contact.
Dave
More information about the MapServer-users
mailing list