I perform the following query:
SELECT * FROM "houses" WHERE (ST_Distance(coordinates, 'POINT(-0.374930 39.478400)'::geometry) < 100)
To find houses around 100 meter distance from: 39.478400, -0.374930
I'm getting the following error:
PG::InternalError: ERROR: Operation on mixed SRID geometries
What is wrong here?
"Coordinates" is of type: geometry "coordinates", limit: {:srid=>4326, :type=>"geometry"}
CREATE INDEX houses_gpx ON houses USING gist(Geography(coordinates))see https://gis.stackexchange.com/questions/247113/setting-up-indexes-for-postgis-distance-queries – Vince Dec 23 '21 at 15:54