문제

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