TransWikia.com

Topography - represent result in WKT as polygons with rings or multipolygon without rings?

Geographic Information Systems Asked on April 18, 2021

I’m new to GIS vector, especially for GIS tools like ArcGIS, QGIS,…

My question is, for this image below with poylgon 1 and polygon 2, typically how a WKT (Well-known text) is represented in GIS tools?

I can see two possible cases, please speak from your experience what case should be used normally by GIS tools (e.g: ArcGIS, QGIS) when I have multiple polygons nested:

  1. By using polygon with interior ring. Is that correct, WKT only supports 1 nested polygon as interior ring?

    POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30))

  2. By using multipolygon containing polygons without any rings:

    MULTIPOLYGON ( ((30 20, 45 40, 10 40, 30 20)), ((15 5, 40 10, 10 20, 5 10, 15 5)) )

enter image description here

One Answer

I understood your description that in the first case the blue area is totally overlapping the yellow area and in the second case the yellow area has a hole that is totally filled with the blue area.

If you want to express those cases in WKT as one geometry you must use GeometryCollection.

enter image description here

Case 1:

Big polygon without holes + small polygon

GEOMETRYCOLLECTION (
    POLYGON ((
            642 405, 
            645 407, 
            645 410, 
            649 410, 
            649 406, 
            646 406, 
            643 404, 
            642 405
        )), 
    POLYGON ((
            646 409, 
            648 409, 
            648 407, 
            646 407, 
            646 409
        )))

Case 2:

Big polygon with a hole + small polygon

GEOMETRYCOLLECTION (
    POLYGON ((
            642 405, 
            645 407, 
            645 410, 
            649 410, 
            649 406, 
            646 406, 
            643 404, 
            642 405
        ), (
            646 409, 
            646 407, 
            648 407, 
            648 409, 
            646 409
        )), 
    POLYGON ((
            646 409, 
            648 409, 
            648 407, 
            646 407, 
            646 409
        )))

Geometrycollection is required because parts of a multipolygon can touch only at one point.

Answered by user30184 on April 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP