Re: [GeoAlchemy] Search for near points by one point

211 views
Skip to first unread message

Eric Lemoine

unread,
Oct 5, 2012, 11:45:01 AM10/5/12
to geoal...@googlegroups.com


On Friday, October 5, 2012, Tarsis Azevedo wrote:
Hi everyone,

I have a point with lat and lng and I want to find points near that point.

How I make this query with geoalchemy?

GeoAlchemy 1 has a _distance_within function that can be useful.

GeoAlchemy 2 [*] (not officially released yet) works with PostGIS 2, which features specific operators for nearest neighbors searching. See distance_box and distance_centroid in [**].

What version of GeoAlchemy do/can you use? What's use spatial database system ?






--
Eric

Tarsis Azevedo

unread,
Oct 5, 2012, 1:20:49 PM10/5/12
to geoal...@googlegroups.com
But to use this methods I have to know the limits?

Because I want to do a search in database for points near to my point for X kilometers(radius).

But I just know my point and my radius.

This works for that case?

Thanks
Tarsis Figueredo Azevedo.
-------------------
Celular: (22) 81244668

Eric Lemoine

unread,
Oct 6, 2012, 3:46:23 PM10/6/12
to geoal...@googlegroups.com
On Fri, Oct 5, 2012 at 7:20 PM, Tarsis Azevedo <tarsis....@gmail.com> wrote:
> But to use this methods I have to know the limits?
>
> Because I want to do a search in database for points near to my point for X
> kilometers(radius).
>
> But I just know my point and my radius.
>
> This works for that case?

Yes, use either _distance_within (GeoAlchemy 1), or ST_DWithin (GeoAlchemy 2).




--
Eric

Tarsis Azevedo

unread,
Oct 7, 2012, 3:11:55 PM10/7/12
to geoal...@googlegroups.com
Thank you!

Tarsis Figueredo Azevedo.
-------------------
Celular: (22) 81244668


Tarsis Azevedo

unread,
Oct 16, 2012, 9:40:34 PM10/16/12
to geoal...@googlegroups.com
Eric, I tried to find in documentation how to use _distance_within function, but I didn't find yet

How use this function?

Thanks
Tarsis Figueredo Azevedo.
-------------------
Celular: (22) 81244668


Reply all
Reply to author
Forward
0 new messages