[Geomoose-users] zoomto.php with PostGIS?

Dan Little danlittle at yahoo.com
Mon Oct 27 15:27:28 EDT 2008


I'm starting to think this might be a problem with PHP Mapscript.  I'm going to have to try and setup a postgis db on my test machine and see if I can recreate the problem.




________________________________
From: Paul Senne <paul.senne at gis.leg.mn>
To: Dan Little <danlittle at yahoo.com>; "geomoose-users at lists.sourceforge.net" <geomoose-users at lists.sourceforge.net>
Sent: Friday, October 24, 2008 3:54:55 PM
Subject: RE: [Geomoose-users] zoomto.php with PostGIS?

 
“COUNTYNAME” is the
column name in the shapefile provided with geomoose and when I get zoomto.php
to work with the shapefile that is the qitem I use.  
 
My postgis county layer’s
column for the county name is ‘name’ all lowercase, which is what
use when I call my PostGIS data.  So instead of the qstring/qitem used for
shapefile for PostGIS it is:
 
…./moose/php/zoomto.php?map=/web/gis/geomoose/1.6/data/itemquery.map&qstring=Hennepin&qitem=name
 
My qstring (i.e. Hennepin) is
also matching the case and spelling of ‘Hennepin’ in the PostGIS
column ‘name’.  Other ideas?
 
Paul Senne
GIS Specialist
Legislative Coordinating Commission
100 Rev. Dr. Martin Luther King Jr. Blvd. Ste 54
651.296.3924
 
From:Dan Little
[mailto:danlittle at yahoo.com] 
Sent: Friday, October 24, 2008 3:41 PM
To: Paul Senne; geomoose-users at lists.sourceforge.net
Subject: Re: [Geomoose-users] zoomto.php with PostGIS?
 
Try
changing "COUNTYNAME" to the lowercase, "countyname".
 

________________________________
 
From:Paul Senne <paul.senne at gis.leg.mn>
To: "geomoose-users at lists.sourceforge.net"
<geomoose-users at lists.sourceforge.net>
Sent: Friday, October 24, 2008 12:30:38 PM
Subject: [Geomoose-users] zoomto.php with PostGIS?
I’m setting up a geomoose page that we will want to
link to specific areas of a feature layer such as a specific county and have
geomoose zoom directly to those when a user follows said link.  I set up
the service and call it with the qitem and the qstring in the URL as follows:
 
…./moose/geomoose.html?call=zoom&qstring=Hennepin&qitem=COUNTYNAME
where ‘COUNTYNAME’ is the table column, ‘Hennepin’ is
the county from the table I want to zoom to and ‘zoom’ is the name
I gave the service.  When using a shapefile, this works flawlessly. 
However, when using POSTGIS and adjusting the qstring an qitem to match (case
included) the POSTGIS setup, I get nothing.
 
Looking at the url geomoose is calling to retrieve the
bounding coordinates for the zoom extent, I can narrow down the problem
specifically to the DATA source in my itemquery.map mapfile.  Geomoose
calls the following url for the coordinates from the zoomto.php script.
 
…./moose/php/zoomto.php?map=/web/gis/geomoose/1.6/data/itemquery.map&qstring=Hennepin&qitem=COUNTYNAME
 
Using shapefile, this spits out the coordinates geomoose
needs.  Switching my itemquery.map layer to PostGIS instead of shapefile
yields a response with no information or error.
My PostGIS data layer is drawing fine and I have identify
working just fine with it.  My PostGIS DATA line in the mapfiles
(‘layername’.map, identify.map & itemquery.map)  are all
the same:
 
                               
DATA "the_geom from cty2000 using unique gid"
 
If my PostGIS line is altered (incorrectly), I receive an
error rather than a blank response which leads me to believe that PostGIS is
not giving the zoomto.php script what it needs to spit out coordinates. 
 
Has anyone successfully used PostGIS with the
zoomto.php?  If so, any help would be appreciated?
 
Thanks.
 
Paul
Senne
GIS
Specialist
Legislative Coordinating Commission
100 Rev. Dr. Martin Luther King Jr. Blvd. Ste 54
651.296.3924


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


More information about the Geomoose-users mailing list