So I am trying to do a where clause on a select and my code is

ST_Within(shape::GEOMETRY, ST_Buffer(ST_GeogFromText('@Value(_location)'), 5, 'endcap=round join=round')

I am trying to buffer the _location attribute by 5 meters so when the ST_Within is used it will help match better. This code is suppose to look for for input points and see if they match anything in the data set already. via spatial match. Just FYI both points for ST_within are points.

If anyone has any idea how i used ST_Bufffer wrong that would be great help.

  • Please edit the question to specify the exact PostgreSQL release, the PostGIS release, and the SRID associated with the table. It's likely you're finding all features within 5 Cartesian degrees (~550+km). – Vince Dec 7 '15 at 22:43

I find it diffucult to see what question you are asking here, but for sure you are using the buffer in a wrong manner. It should be a ST_Dwithin(shape, ST_GeogFromText('@Value(_location)'),5)

You can read more over here: http://postgis.net/2013/08/26/tip_ST_DWithin/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.