[postgis-users] Problem with "Different SRIDs"

Obe, Regina robe.dnd at cityofboston.gov
Wed Jun 20 08:13:07 PDT 2007


Are you sure the SRID of your bairros layer is 29101
 
Try running the following sql statement.
 
SELECT DISTINCT SRID(geometry)
FROM bairros
 
That should return 29101.  If it doesn't that is where your problem is.
 
Also it looks like your geometry field is called geometry.  You should
try to stay away from keyword/datatype names for field names.
 
Thanks,
Regina
 

________________________________

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
Juliano Zaban
Sent: Wednesday, June 20, 2007 10:41 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Problem with "Different SRIDs"


Hello all!

I'm trying to use PostGIS with SharpMap library to develop GIS
applications. However when the PostGIS extension for SharpMap try to run
the following query an error occurs:

SELECT AsBinary(geometry) AS Geom FROM bairros 
WHERE geometry && setSRID(box2d('BOX3D(-0.5 -0.302040816326531,0.5
0.302040816326531)'::box3d),29101)

ERROR: Operation on two geometries with different SRIDs
SQL state: XX000

I believe the "bairros" layer is ok because I can edit it with OpenJUMP
without problem... 
Anybody can help me with this?

Thanks a lot!



-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070620/7d589715/attachment.html>


More information about the postgis-users mailing list