[mapserver-users] Trouble querying PostGIS layer

Bistrais, Bob Bob.Bistrais at maine.gov
Thu Feb 23 09:29:31 PST 2012


I'm having trouble doing an attribute query on a PostGIS layer.  The
data in this layer was formerly in shapefile, and the query worked fine
with it.  But with the PostGIS layer, I get no results.

 

The PHP MapScript query uses a setFilter on the layer, then does a
queryByRect, again, with no results.

 

The problem appears to be connected to the extent and/or projection.
With the original shapefile, I can echo back the extent rectangle:

[minx] => 342764.988407 [miny] => 4759515.50711 [maxx] => 647042.41629
[maxy] => 5245337.46493 )

 

--Which is what I'd expect.  But with the PostGIS layer, if I echo back
the extent, here is what I get:

 

[minx] => -3.40282346639E+38 [miny] => -3.40282346639E+38 [maxx] =>
3.40282346639E+38 [maxy] => 3.40282346639E+38

 

The PostGIS layer is set for the proper SRID, and the correct EPSG and
extent are in the map file.

 

What is going wrong here?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120223/f22977c2/attachment.htm>


More information about the MapServer-users mailing list