Geographic Information Systems Asked by Saroj on May 17, 2021
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
Have you tried this, on both layer:
UPDATE districts_s SET SHAPE = ST_SetSRID(SHAPE, 4326)
But I guess the problem is with lightning, you should save lightning.latitude and lightning.latitude to a geometry (point) column.
Answered by pnz on May 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP