MultiPolygon: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Maxim@tygron.com (talk | contribs)
No edit summary
Maxim@tygron.com (talk | contribs)
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:


In [[GeoJSON]], a MultiPolygon looks like this:
In [[GeoJSON]], a MultiPolygon looks like this:
<br>
 
<code>
<pre>
{
{
   "type": "Feature",
   "type": "Feature",
   "properties": { "name": "Two separate squares" },
   "properties": {
    "name": "Two separate squares"
  },
   "geometry": {
   "geometry": {
     "type": "MultiPolygon",
     "type": "MultiPolygon",
     "coordinates": [
     "coordinates": [
       [
       [
         [
         [[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]
          [0, 0], [1, 0], [1, 1], [0, 1], [0, 0]
        ]
       ],
       ],
       [
       [
         [
         [[2, 2], [3, 2], [3, 3], [2, 3], [2, 2]]
          [2, 2], [3, 2], [3, 3], [2, 3], [2, 2]
        ]
       ]
       ]
     ]
     ]
   }
   }
}
}
 
</pre>
</code>


{{article end
{{article end

Latest revision as of 13:53, 15 July 2026

A MultiPolygon is a geometry type that represents multiple Polygons at once.

In GeoJSON, a MultiPolygon looks like this:

{
  "type": "Feature",
  "properties": {
    "name": "Two separate squares"
  },
  "geometry": {
    "type": "MultiPolygon",
    "coordinates": [
      [
        [[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]
      ],
      [
        [[2, 2], [3, 2], [3, 3], [2, 3], [2, 2]]
      ]
    ]
  }
}