[postgis-users] SetSRID functin does not exist

Mike Toews mwtoews at gmail.com
Fri Apr 30 11:36:46 PDT 2010


First, to answer your question, the ST_SetSRID failed since the box3d cast
failed since it could not be parsed.

I think you are using the wrong approach. Try using ST_Expand instead of
nesting calculations in the WKT:

http://postgis.refractions.net/documentation/manual-1.5/ST_Expand.html

Furthermore, you are trying to expand the search of a point with units of
degrees by 200 degrees. If you want a distance in metres or feet, you need
to transform your point into another projection. (This second part is
probably more complicated/confusing than the first issue.)

<http://postgis.refractions.net/documentation/manual-1.5/ST_Expand.html>
-Mike

On 29 April 2010 05:19, rakesh modi <rakesh.modi1585 at gmail.com> wrote:

> Hi All,
>
> i am trying to run this query but getting error -
> ERROR:  function setsrid(unknown) does not exist
> LINE 4:             FROM roads WHERE the_geom && SetSRID(
>                                                  ^
> what's the problem ..
>
>
> SELECT gid, source, target, the_geom,
>  distance(the_geom, GeometryFromText(
>  'POINT(26.8988086602918 7.71874658182343)', 4326)) AS dist
>             FROM roads WHERE the_geom && ST_SetSRID(
>                   'BOX3D((26.8988086602918-200 7.71874658182343-200
> 26.8988086602918+200 7.71874658182343+200))
>                          , ::box3d,4326)')
>             ORDER BY dist LIMIT 1;
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100430/f7ef76fb/attachment.html>


More information about the postgis-users mailing list