AW: [mapserver-users] Question on linking external info
Lowell Filak
lfilak at medinaco.org
Fri Jun 14 06:28:14 PDT 2002
While I don't know how the DNR app does it the most important thing is the items that link the data together.
1) For example (in our case): A picked point relates to a polygon -> That polygon has a parcel number -> That parcel number is used to retreive all of the records from the owner database that have a matching parcel number.
2) For images (parcel surveys in this case): A picked point relates to a polygon -> That polygon's geographic location relates to the geographic location of the the original lots & tracts (grid) that the land was split into -> Each member of that grid has attributes (tract number, tract name, etc.) -> Those attributes are used to retrieve all of the records from the surveys database that have matching values -> Each of those records have a field which points to the location of the image (png & gzipped tiff in this case).
3) For requesting info from another website (tax records in this case): A picked point relates to a polygon -> That polygon has a parcel number -> That parcel number is used to create a url to query the remote server and retrieve a page with all of the taxing information.
For case #1 it is a direct database type query and both http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35ex4
and http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35ex9 have code for dealing with that.
For case #2 an example of the geographic query code can be found in http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35ex9
For case #3 there was a code example posted to the group by Steve Lehr in April that basically reproduces the "wget" command in perl for creating dynamic remote queries to other websites. For retrieving and including other types of information dynamically you may want to look at http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PerlMapScriptExamples35ex2 (text in this case).
In each case there is nothing that says that a single cgi couldn't call each of the individual modules to retrieve all of the information and compile it into a single report that is dumped into a single response to the user from a single click. In most cases I don't think that would be good beause of the amount of data that could result (ie. multiple survey images for a single location).
Hopefully that helps.
Lowell F.
The following message was sent by =?US-ASCII?Q?Nicole_Bomeke?= <bon at ivv-aachen.de> on Fri, 14 Jun 2002 09:23:44 +0200.
> That is a good question.
>
> I used the following code to achive something similar, but by doing it this
> way the user has to click twice.
> The first time he has to click on a point on the map and the second time he
> has to click on a link in the
> template file. The link refers to a html page with the name "[HSTNAME].html"
> stored in column HSTNAME of the
> DBase File vrs_hst.dbf.
>
> That works fine but is a bit inconvenient. I would prefer that the html page
> "[HSTNAME].html" appears allready
> on the first click. Has anybody an idear how I can achive that?
>
> Nicole Bomeke
>
>
> Mapfile:
> ---------
> LAYER
> NAME "Haltestellen"
> DATA vrs_hst
> STATUS DEFAULT
> TYPE POINT
> CLASS
> NAME "Haltestellen"
> COLOR 0 0 255
> TEMPLATE "point_query.html"
> END
> END
>
>
> point_query.html:
> -----------------
> <font size+1><b>You have choosen [HSTNAME].</b></font>
> <br>
> <font size+1><b>For further information:</b></font>
>
> <p>
> <script language="javascript">
> var URL="http://[host]/mapserv3.5_vrs_appl/"+"[HSTNAME]"+".html";
> document.write("<a href="+URL+">Click here!</a>\n");
> </script>
>
>
>
> -----Ursprungliche Nachricht-----
> Von: owner-mapserver-users at lists.gis.umn.edu
> [mailto:owner-mapserver-users at lists.gis.umn.edu]Im Auftrag von lists
> Gesendet: Donnerstag, 13. Juni 2002 12:35
> An: mapserver-users at lists.gis.umn.edu
> Betreff: [mapserver-users] Question on linking external info
>
>
> Hi
>
> I recently started looking into MapServer, and have MapServer 3.6/PostGIS
> running. Very nice !
>
> I was looking at the Recreation Compass at
> http://www.dnr.state.mn.us/maps/compass.html and was wondering how they
> implemented the external info when clicking on certain features in the
> map.
>
> For example, on clicking one of the pink "Scientific & Natural Areas" I
> get a new browser window with Information/photos etc about "Lost River
> Peatland
> SNA" ... generally speaking, what is needed to achieve this ?
>
> Any help would be much appreciated
>
> Regards and Thanks
>
> Arif Saleem
More information about the MapServer-users
mailing list