[postgis-users] SRID Issues
Okeh, Sam
Sam.Okeh at co.fulton.ga.us
Mon May 16 12:09:52 PDT 2005
Can someone explain what's wrong with this code?
The code used to work real fine.
SQL = "SELECT str_num || ' ' || name as location," & _
"distance(the_geom,'POINT(" & X & " " & Y & ")'::geometry) as
dist " & _
"FROM roads.daccess " & _
"WHERE the_Geom && expand('POINT(" & X & " " & Y &
")'::geometry,500) " & _
"ORDER BY dist limit 1 "
Then I started getting the following error:
ERROR: Operation on two GEOMETRIES with different SRIDs
I tried using the Setsrid() function as a method of stabilization as
recommended by a co-worker, but it doesn't work:
SQL = "SELECT str_num || ' ' || name as location," & _
"distance(the_geom,Setsrid('POINT(" & X & " " & Y &
")'::geometry)) as dist " & _
"FROM roads.daccess " & _
"WHERE the_Geom && Setsrid(expand('POINT(" & X & " " & Y &
")'::geometry,500)) " & _
"ORDER BY dist limit 1 "
--sam
-----------------------------------------------------
This message has been scanned for viruses and
dangerous content for Fulton County by DefendMail, and is
believed to be clean.
More information about the postgis-users
mailing list