[postgis-users] mixed srid geometries
Graham Stewart
graham at mobilefoundry.net
Mon Apr 3 16:47:11 PDT 2006
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
>
>
More information about the postgis-users
mailing list