I have a table "tbl_location" in PostGIS which has latitude and longitude, so I created a new column called "point_location" :
update "tbl_location" set point_location =
ST_Transform(ST_SetSRID(ST_MakePoint(lng, lat), 4326), 26913);
I have another table which is available here has MultiPolygon field and I am trying to find in which polygon a location(lat/lng) belongs. For that, I wrote the following query:
SELECT a.id, b.csa2010
FROM baltimore."vs14_housing" b, baltimore."tbl_location" a
WHERE
ST_Intersects(a.point_location, b.geom)
or
ST_Contains(a.point_location, b.geom)
or
ST_Within(a.point_location, b.geom)
It is not returning any records. Data type for geom column in vs14_housing is geometry (MultiPolygon). Let me know what I am doing wrong.