[postgis-users] mixed srid geometries

Nelson Guda nelsong at mail.utexas.edu
Tue Apr 4 08:54:55 PDT 2006


Yes!  that worked wonderfully.  thank you so much!

nelson


On Apr 3, 2006, at 6:47 PM, Graham Stewart wrote:

> Nelson,
>
> If you change both tables to have a -1 geometry then you should be  
> able
> to make the comparison.
>
> As Emily pointed out you should be sure to do something like
>
> update table set geometry_column = setsrid(geometry_column,-1)
>
> However that will cause postgis to ignore the srid and you might  
> end up
> comparing apples and oranges.
>
> A better solution would be to set the column srids to match the
> geographic data which they contain and then use the transform function
> to covert one coordinate system into the other.
>
> Graham
>
> Nelson Guda wrote:
>> Hi all,
>>
>> Thanks to Aaron for the php code.
>>
>> Meanwhile, I have another question.  I am trying to do a query on two
>> tables.  One table (table 1) contains a large number of overlapping
>> geometries that represent animal ranges.  The other table (table 2)
>> are geometries of geographic areas.  I want to know which species of
>> animals live in a given geometry from table 2.  Below is the query I
>> am using, but I keep getting the error  'Operation on mixed srid
>> geometries'.
>>
>> So, i went and set all the srid's in the geometry columns table to  
>> -1,
>> but I still get the same error.  What am I doing wrong?
>>
>> thanks,
>> nelsong
>>
>> -- -- -- -- -- -- query: -- -- -- -- -- -- --
>> select a.sci_name
>> from species AS s, lands AS l
>> where l.name='name'
>> AND touches(s.the_geom,l.the_geom)
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>
> _______________________________________________
> 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