I'm trying to calculate the nearest neighbors. For that, I need to pass a parameter to limit the maximum distance from the neighbors. For example, which are the nearest neighbors within a radius of 1000 meters?
I did the following :
I created my table with the data:
id | name | latitude | longitude
After that, I executed the following query :
SELECT AddGeometryColumn ( 'public' , ' green ', ' geom ' , 4326 , ' POINT' , 2 );
UPDATE season
SET geom = ST_Transform(ST_PointFromText ('POINT (' || longitude || ' ' || latitude || ')', 4269), 4326);
First question, Is the SRID of Brazil 4326? What would be 4269 ?
Second question, by doing the following SQL
SELECT id, name
FROM season
WHERE ST_DWithin (
geom ,
ST_GeomFromText ('POINT(-49.2653819 -25.4244287 )', 4326),
1000
);
This returns nothing. From what I understand, this SQL would further point the radius of the maximum distance, right?
It appears if you put 1000 results for 100000000, all my entries appear .
So, I wonder what is wrong here?