I am trying to get the points those are within the shapefile. I have tried the Spatial functions and it's showing an error:
3033 - Binary geometry function st_contains given two geometries of different srids: 4326 and 0, which should have been identical.
My query is
SELECT
lightning.lightning_id, lightning.latitude, lightning.longitude,
lightning.flash_type,
DATE_FORMAT(lightning.lightning_time, '%D %b %Y %T %p') as lightning_time
FROM lightning, districts_s
WHERE
ST_CONTAINS(districts_s.SHAPE, Point(lightning.longitude, lightning.latitude))
AND lightning.height > 50
To rectify the error I got a solution from here and this link but no result, as this also showing an error:
ST_Transform does not exist
Point
function is not setting an SRID. You can useST_SetSRID(Point(lon,lat),4326)