[postgis-users] Error: different SRIDS

"R. Müller" r.mueller at unicomp-berlin.de
Mon Jul 4 23:55:12 PDT 2005


Hallo Josh,

you can also use the GEOMFROMTEXT-function to get a geometry from your
polygon. There you have to explicitly pass a SRID as second argument.

The other polygon you mentioned, is the geometry-implementation
postgresql. But that won't work with postgis.

ronald




Josh Livni wrote:
>  
> 
> 
> Hi.
> 
> I have a large set of parcels I want to query.  They are in NAD83 UTM Zone
> 10, which I have in the db as EPSG 26910.  
> 
> Part of my query will include a knowing a rectangular extent that is a
> relatively small section of the overall extent of the parcels.  
> 
> If I add a clause as follows:
>  where the_geom && 'POLYGON((561648 5288731, 561648 5289731, 571648 5289731,
> 571648 5288731, 561648 5288731))'; I get ERROR:  Operation on two geometries
> with different SRIDs
> 
> Interestingly, if I change the polygon to be something like (0 0 ,20 0, 20
> 20, 0 20, 0 0) I get no error (but no results since that's nowhere near me)
> 
> If I select astext(the_geom) from parcels where lastname ilike 'josh%' I get
> a bunch of parcels, and it seems clear from their dimensions that some
> should align nicely within the above example rectangle.
> 
> I tried to force the polygon with a setsrid(polygon, 26910) but I got:
> ERROR:  function setsrid("unknown", integer) is not unique
> 
> There's probably some simple syntactical thing I'm missing -- any help
> appreciated.
> 
>    -Josh
> 
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 

-- 



More information about the postgis-users mailing list