WKT: how do you define Polygons with 3 rings (==2 holes)?

ε祈祈猫儿з 提交于 2019-12-05 23:54:09

问题


I found in here this document. I read it but I keep wondering how to define a Polygon with 3 rings in WKT?


回答1:


You can use either the POLYGON or the MULTIPOLYGON type, but make sure the outer container ring is listed first followed by the inner hole rings. The orientations of the inner rings are not important since holes are explicit in the syntax.

X & Y are space separated, coordinates are comma separated, and ring extents are limited by parentheses and separated by commas. Polygons (outer ring plus any inner rings) are also limited by parentheses.

Finally, inner rings cannot cross each other, nor can they cross the outer ring.

Examples:
POLYGON ((10 10, 110 10, 110 110, 10 110), (20 20, 20 30, 30 30, 30 20), (40 20, 40 30, 50 30, 50 20))
MULTIPOLYGON (((10 10, 110 10, 110 110, 10 110), (20 20, 20 30, 30 30, 30 20), (40 20, 40 30, 50 30, 50 20)))



来源:https://stackoverflow.com/questions/8139739/wkt-how-do-you-define-polygons-with-3-rings-2-holes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!