I have a table with geometry column called point, saved in SRID 4326. I want to get the geometry by its coordinates, but something didn't work. I suspect database configuration or something.
Here is what I do
select point from geom_data limit 1
And I get "0101000060E610000000000020558A5EC0000000C0F3B8424000B0CFCFA4717342"
This as text is
select AsText(point) from geom_data where point = '0101000060E610000000000020558A5EC0000000C0F3B8424000B0CFCFA4717342'
And the result is "POINT(-122.161445617676 37.444938659668)"
Trying this
select * from geom_data where ST_Contains(point, ST_GeomFromEWKT('SRID=4326;POINT(-122.161445617676 37.444938659668)'))
Didn't give a result. Tried this
select ST_PointFromText('POINT(-122.161445617676 37.444938659668)', 4326)
and get "0101000020E61000000F000020558A5EC0040000C0F3B84240" which is different.
Selecting within bounding box didn't worked either
select * from geom_data where
st_x(point) >= '-122.161445617670' AND st_x(point) <= '-122.161445617679'
AND st_y(point) >= '37.444938659660' AND st_y(point) <= '37.444938659669'
Any ideas?