Geography point within polygon showing incorrect results
In my database, I have a table containing a set of Polygons & their attributes and another table containing a set of points that have coordinates within the boundaries of those polygons. I’ve plugged QGIS into my database to ensure that they are located exactly where I expect them to be, and then ran a query to identify the polygon_id that each point is located within. This resulted in some very unexpected results, so I’ve done some further testing & tinkering and am still none the wiser.
SQL server geography point within polygon showing incorrect results
I’m currently toying with the geospatial functions of SQL server 2022 and appear to have hit an issue with a very basic part of it. I have plumbed the depths of this site, the MS help pages and a staggering list of other online resources but have drawn a blank so far.