I'm trying to import UK postcode zones from WKT to SQLServer 2012. Most are fine but there's a few that produce an very large polygon (best I can explain it).

When using QGIS the WKT below displays as it should.

MULTIPOLYGON (((-2.255068 53.669782, -2.262690 53.651819, -2.276995 53.676325, -2.255068 53.669782)))

but when using geography::STGeomFromText(#above WKT#, 4326) the spatial results window shows a grid filled with a square polygon not the area displayed in QGIS.

Any idea why?

有帮助吗?

解决方案

Found the answer. If the co-ordinates are reversed the polygon displays as it should. I guess my original data had some polygons that were reversed.

.ReorientObject() does this automatically

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top