[Geomoose-users] Database connections

Fischer, Brian bfischer at houstonengineeringinc.com
Wed Jan 2 16:32:41 EST 2008


I don't believe you can do that two step process with MapServer queries.  The only way you could do that is if you where using PostGIS, Oracle Spatial or SDE where all your data was stored in the same database.  You can however join a .dbf file to your shapefile on the fly and access those fields, but that is about as close as you can get.
 
Maybe someone else knows a another method I am not thinking about to accomplish that same thing.
 
Brian Fischer
Houston Engineering, Inc.
Maple Grove, MN
(763) 493-4522
 

________________________________

From: Adam Feidt [mailto:afeidt at edenprairie.org] 
Sent: Wednesday, January 02, 2008 3:27 PM
To: Fischer, Brian
Subject: RE: [Geomoose-users] Database connections



I was essentially trying to mimic the identify tool using a FILTER and TEMPLATE.  I thought I could just point to a table by setting the CONNECTION and CONNECTIONTYPE layer parameters in the mapfile.  I guess I was way off.  I want to be able to click on a parcel/grab the PID from the shapefile and display property info from a SQL database.  I'll play around with what you just gave me and see if I can get it to work.  

 

Adam M. Feidt

GIS Coordinator

City of Eden Prairie

8080 Mitchell Rd

Eden Prairie, MN 55344

phone# 952-949-8443

fax# 952-949-8334

 

From: Fischer, Brian [mailto:bfischer at houstonengineeringinc.com] 
Sent: Wednesday, January 02, 2008 3:09 PM
To: Adam Feidt; geomoose-users at lists.sourceforge.net
Subject: RE: [Geomoose-users] Database connections

 

Adam,

 

Another question is what server side language are you trying to use to query the MSSQL database?  You can not query a DB directly with javascript.  Attached is a PHP script to connect to an MS Access database, query it and write out the results as HTML.  This script is the one that does the address search on http://mmcd.mapmorph.net/mmcd/mmcd.html GeoMOOSE app.  Also below is the mapbook definition for the service to return the results to the info tab.  And lastly the HTML DIV that is used to display the search options.

 

XML snippet:

<service title="Zoom To Address" selectable="false" default="false" locked="true" div="addresssearch">
   <url>/mmcd/addresssearch.php</url>
   <input type="user" name="searchval" title="Zoom to Address:"/>
 </service>

 

HTML snippet:

<div id="CustomForms">
  <div id="addresssearch">
  <font color="black"><b>Zoom to Address:</b></font><br/>
  <input name="searchval"/><input type="submit" value="Go"/>
  <br><i>Street address (no city or zip) or portion of address<i/>
  </div>

 

  <div id="waitingmessage">
    <font color="red"><b>Searching...</b></font><br/>
  </div>
</div>

Hopefully this gives you an example of a search service using PHP and an external database with GeoMOOSE.


  

Brian Fischer

Houston Engineering, Inc.

Maple Grove, MN

(763) 493-4522

 

 

________________________________

From: geomoose-users-bounces at lists.sourceforge.net [mailto:geomoose-users-bounces at lists.sourceforge.net] On Behalf Of Dan Little
Sent: Wednesday, January 02, 2008 2:50 PM
To: Adam Feidt; geomoose-users at lists.sourceforge.net
Subject: Re: [Geomoose-users] Database connections

Adam,

Do you have any sort of script that already connects to and searches the MSSQL database?

----- Original Message ----
From: Adam Feidt <afeidt at edenprairie.org>
To: geomoose-users at lists.sourceforge.net
Sent: Wednesday, January 2, 2008 2:44:40 PM
Subject: [Geomoose-users] Database connections

I assume this can be done after looking at other applications created by Geomoose, but what I’m trying to do is make a non-spatial database connection to SQL server.  Ideally my tool will grab the PID and connect to a database and display table values in the info tab.  It doesn’t appear to be too complicated, but I’m having problems setting up a connection.  I’ve read articles on ODBC/OVF/OGR is this the correct method?  Can someone point me in the right direction for setting up a SQL connection?

 

Adam M. Feidt

GIS Coordinator

City of Eden Prairie

8080 Mitchell Rd

Eden Prairie, MN 55344

phone# 952-949-8443

fax# 952-949-8334

 

 

 

________________________________

Never miss a thing. Make Yahoo your homepage. <http://us.rd.yahoo.com/evt=51438/*http:/www.yahoo.com/r/hs>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20080102/afd30175/attachment.html


More information about the Geomoose-users mailing list