Questions tagged [multi-polygon]

A MultiPolygon is a geometry whose elements are polygons.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

How can I cast all geometries from a SpatVector from type "MULTIPOLYGON" to type "POLYGON" in R?

sf function st_cast() doesn't work on SpatVectors, and I've tried to look for a way to convert all geometries to single polygons, but to no success. Is there a way to do that in R ? I guess something ...
0 votes
0 answers
16 views

Possibilites to save/export a loaded CityJSON layer (loaded with the Plugin: CityJSON Loader)

I am wondering if it is possible to export/save a loaded CityJSON file? I want to to edit it and save it again. What I am wondering in which format I have to save/export it. I tried multi-polygon, ...
  • 837
7 votes
1 answer
112 views

Deleting parts of MultiPolygon based on area using PyQGIS

I have a layer with MultiPolygons. Some of them have parts less than five m2 which I want to delete. The QgsGeometry class has methods: parts() and deletePart(self, partNum: int). On parts() I can ...
  • 565
4 votes
1 answer
35 views

Dividing point layer according to boundary layer in QGIS

I have two layers: All the post offices in the city (point layer) Division of the city into boundaries according to their neighbourhood council (MultiPolygon layer) How do I split the first layer ...
  • 53
1 vote
0 answers
57 views

ST_MakeValid for MultiSurface type in PostGIS

I am trying to take a lot of overlapping (bullseye type shape) polygons and curve polygons and create a valid shape with the correct cutouts. I was previously using a query that converted the ...
  • 19
1 vote
1 answer
217 views

shapely | Binary mask of Polygons' intersection

Goal: Create a binary 2d-array, that represents Points of intersection of a square Polygon with a MultiPolygon. from typing import List, Tuple import numpy.typing as npt from shapely.geometry import ...
2 votes
1 answer
88 views

Euclidean distance from vector features for radiotracking data in R

I have a radiotracking dataset (ca 5000 rows) like this Animal Date Time Latitude Longitude Pepe 21/12/2020 23:00:28 52.25938 15.50511 Pepe 21/12/2020 19:00:15 52.26251 15.52726 Pepe 21/12/...
  • 173
0 votes
1 answer
24 views

Masking two shapefiles with MultiLineString and MultiPolygon errors

I created a shapefile by converting a raster to a polygon using raster pixels to polygon tool and used this as a base layer to remove unwanted areas with difference tool. I added multiple shapefiles ...
  • 21
0 votes
0 answers
316 views

Shapely 2.0 from list of polygons to multipolygons

I have a geoJson file that contains some Regions boundaries. Based on this answer I made the following code to transform the boundaries coordinates into a MultiPolygon Shapely object. import json from ...
0 votes
0 answers
57 views

GeoJSON edit: merge LineStrings to Polygons

I need to export a district border from OSM to GeoJSON. I made a program that extracts borders as LineStrings from OSM XML and saves it as GeoJSON file. Now I need to merge LineStrings into a Polygon ...
  • 1
0 votes
0 answers
30 views

Merge separate polygons inside of a single JSON that do NOT share a boundary

I am trying to see if there is a way to merge/connect polygons that do not share a boundary with one another. As you can see from the imagine, these are two polygons that I'm looking to connect, if ...
0 votes
3 answers
118 views

Export polygon from shapefile as type: 'Polygon' (not type: 'MultiPolygon')

From a shapefile I try to export the contained polygons to GeoJSON. This works fine with right click on the layer > Export > Save as ... > Format: Geojson. The exported file then looks like ...
  • 15
0 votes
0 answers
20 views

How can I automate polygon creation between a linear point path?

Working with shapefiles for a natural gas pipeline installation. I have the polygon for the LOD (limits of disturbance), and the surveyed station number point file that runs linear along that same ...
  • 271
1 vote
0 answers
75 views

Areal Interpolation polygon to polygon using ArcGIS Pro

I am using ArcGIS Pro 3.0.0. I have two multipolygons and I would like to interpolate the values of one polygon to the other. I found the Areal Interpolation tool which does exactly that. One of ...
2 votes
1 answer
124 views

Extracting points by multipolygon and having separate point(s) output using ArcGIS Pro

I have a point shapefile that has 1.5 million data points and I want to extract the points that are within in each polygon of a multipolygon.shp file and have separate outputs. Let's say there are 32 ...
2 votes
4 answers
841 views

QGIS clip tool error non-point (MULTIPOINT) geometry to point shapefile

I'm using QGIS 3.22.4 then tried 3.22.7. I am using the clip tool. The input layer is a point(point) shapefile (verified in layer properties under information-geometry section). I have tried this ...
  • 21
6 votes
2 answers
208 views

Displaying symbology only for largest part of polygon in QGIS

In QGIS 3.22.0 (Bialowieza) I have a polygon layer of municipalities in Germany. Some municipalities consist of more than one polygon. I have duplicated the layer in order to make a categorization of ...
  • 575
0 votes
1 answer
158 views

Google Earth Engine: Calculating image statistics for multiple study regions simultaneously

I am trying to calculate burned area for the districts of Punjab state. I have used following code var admin2 = ee.FeatureCollection("FAO/GAUL_SIMPLIFIED_500m/2015/level2"); var state = ...
  • 121
1 vote
0 answers
22 views

Fix Separated MultiPolygon Layer

I was given a parcel shp, and I found there's a lot of segmented of a single parcel. The geometry type of the layer is MultiPolygon, like the following picture. It seems to me, the original data was ...
  • 169
0 votes
1 answer
228 views

How to run Google Earth Engine analysis on very large MultiPolygon without timeout

I am running analysis on forest area MultiPolygons to calculate tree cover loss using the Hansen et al dataset (ee.Image('UMD/hansen/global_forest_change_2020_v1_8')). I am running into problems ...
1 vote
1 answer
470 views

Merging two polygon features (GeoJSON file) using QGIS

i've seen this tutorial that explains how to merge two polygon features in QGIS. Doing it works, but when I stop editing the layer, I got a message Could not commit changes to layer drawingPolygons ...
  • 246
1 vote
0 answers
1k views

Shapely intersection between LineString and multiple Polygons

I am trying to get a function to return True when a LineString intersects with any polygon in a list of polygons. Currently, I am using a for loop to iterate through all the polygons and check one by ...
2 votes
1 answer
313 views

Why are my area calculations in Python so small with .area()?

I'm trying to calculate the area of a flood with Python, but the results seem way too small: iceye_breaks = iceye_breaks.to_crs("+proj=cea +lon_0=0 +x_0=0 +y_0=0 +lat_ts=45 +ellps=WGS84 +datum=...
1 vote
1 answer
639 views

Clipping shapefile with MultiPolygon shapefile in GeoPandas

I have a shapefile (will be called source-file hereafter), which I need to clip by a MultiPolygon shapefile so that I can have a clipped shapefile for each polygon. I tried the GeoPandas, though I am ...
1 vote
1 answer
335 views

Creating a Polygon, with a hole, in Shapely

So I have two polygons: (i) An outer polygon, and (ii) an inner Polygon representing the 'hole'. I'm trying to merge these two to give a single Polygon, with the hole. For easy illustration, the outer ...
5 votes
2 answers
126 views

Getting "QgsPolygon: CurvePolygon EMPTY" when extracting the largest part of MultiPolygon using PyQGIS

There is a shapefile with MultiPolygons, see the image below With this code, I am trying to get the largest part (by area) of each MultiPolygon feature. It utilizes the constGet() method. layer = ...
  • 28.1k
6 votes
2 answers
622 views

Filling gaps within a multipolygon using Python

I would like to know how can I fill the gaps within a multipolygon. The convex hull isn't the proper solution, since they change the geometry completely. I have attached a sample figure of such a ...
  • 367
3 votes
2 answers
291 views

Getting area of part of MultiPolygon in QGIS

Is it possible, with QGIS, to get the area of a single part of a multi polygon? Or do I have to split them into single polygons?
  • 8,045
-1 votes
1 answer
70 views

Subsetting a specific number of features in a large dataset so that they are all together in ArcMap

I have a very large feature layer consisting of polygons of different sizes. I need to select or subset a certain amount of features (say I need 4 polygons of size x, 6 polygons of size y, and 10 ...
  • 1
5 votes
3 answers
805 views

Using Union tool over MultiLineString in polygons layer in QGIS

I created a polygons layer in QGIS 3.22.2 by creating circular buffers around points. I need to Union them by intersecting the overlapping parts. After running for several hours, the Union tool gives ...
  • 219
3 votes
1 answer
333 views

Turning overlapping MultiPolygons into not overlapping areas

I have a layer containing MultiPolygons. These MultiPolygons do overlap each other and do have a not unique attribute time containing integers. The number of polygons per layer vary as well as the ...
  • 30.4k
0 votes
2 answers
332 views

Geoserver connects multipolygon

I'm trying to render a layer wich contains some polygons and some multipolygons in geoserver. While polygons are rendered correctly, multipolygon are not. Geoserver renderer connects the last point of ...
4 votes
1 answer
169 views

PostGIS generate center POINTS from multilinestrings and multipolygons (for each line and polygon) in the memory

Let's assume, I have a mixed geometry type table in PostgreSQL The multipart geometries don't intersect themselves. I would like to generate a center point collection from every geometry. I know how ...
0 votes
1 answer
2k views

How to get union of multiple polygons in Google Earth Engine?

I would like to get the union of m (m is variable) different (multi)polygons in Google Earth Engine. The attribute .union() only works with two polygons. See example below for what I have till now. ...
2 votes
1 answer
316 views

PostGIS: Split polygons into intersecting and non-intersecting and grouping on overlap

I have a big query that I am looking to optimize. I am matching millions (expanding daily) of rows with Points against a mostly read-only table of (tens of thousands of) areas with (Multi)Polygons. ...
2 votes
0 answers
60 views

Selecting polygons within other polygons in the same layer in QGIS

I am trying to filter out certain infrastructure from OSM data and convert everything to simple point layers using QGIS. I have an OSM shapefile containing polygons of schools. In many instances, ...
  • 29
2 votes
1 answer
155 views

Cleaning up holes in MultiPolygon using QGIS

This is a screencap of my map in QGIS: Those orange bits in the middle of each section are actually holes in the GeoJSON file and I can't make them go away. I've tried using the "Vertex tool&...
  • 31
2 votes
2 answers
654 views

Turn a MultiPolygon with Nested Shells into a Polygon with Holes

I am reading GeoJSON into shapely objects and need help, I have a massive MultiPolygon with several nested Polygons in it. I believe this is why it is not considered a valid shape? as_shape.is_valid -&...
2 votes
1 answer
355 views

Getting the bigger polygon of Multipolygon

I have a Multipolygon that has 5 separate polygons and I want to get only the geometry of the biggest polygon. How can I get the largest polygon from the multipolygon?
3 votes
2 answers
249 views

Buffering around all borders of EEZ regions in QGIS

I have a layer containing points (in yellow) and a layer containing the Exclusive economic zones of all countries (as polygons, its geometry is MultiPolygon). See the image below: I would like to ...
0 votes
1 answer
259 views

Calculating/obtaining a "centerpoint" inside a multipolygon entity with FME software?

Obviously, this point does not necessarily have to be the real centroid, but it does have to be a, only one, single interior point of each multipolygon. What I have found is the CenterPointReplacer ...
  • 1
3 votes
0 answers
75 views

Error using PostGIS query in MultipolygonZ type data [duplicate]

I am using this query in MultipolygonZ type data in my PostgreSQL database, but I got error for so many times the data is not rendered properly in PostgreSQL with PostGIS extension. PostGIS query:- ...
  • 41
0 votes
1 answer
85 views

Partial perimeter in ArcGIS

I have a set of polygons, in turn formed by several polygons. Let's suppose a large polygon formed by three smaller polygons. Is there any method to know the outer perimeter of the set of three ...
  • 1
4 votes
1 answer
2k views

Splitting MultiPolygon shapefile into separate Polygons in R

I have a polygon shapefile with 2 features. I want to split the MultiPolygon shp into separate shapefiles based on a column of the attribute table. What I've tried so far is this code based on that ...
  • 705
4 votes
1 answer
330 views

Inspecting individual Polygons of MultiPolygon in QGIS

Using QGIS's Identify results, I can highlight and inspect an individual 'feature', in this case a country geometry. In reality, the geometry is a MultiPolygon and I would like to inspect individual ...
  • 155
0 votes
0 answers
51 views

Opening one corresponding related table in attribute form for selected feature in multipolygon in QGIS

I have MultiPolygon A with 9 features, each feature should be described by one non-spatial attribute table with 10 - 500 features. I tried to create 9 relations like A-to-Table1, A-to_Table2 ...A-to-...
7 votes
1 answer
5k views

Converting from MultiPolygon to Polygon in PostGIS

I have a table in PostGIS, where the data is currently stored as a MultiPolygon. Each Multipolygon has only a single Polygon in it. How do I query and get the containing Polygon, and not MultiPolygon? ...
7 votes
3 answers
5k views

R/sf: Some edges are crossing in a MULTIPOLYGON. How to make it valid when using S2 geometry?

Goal: I would like to know the NUTS region (2016 version) of points in Europe. Method: (1) Download the official geodata from Eurostat, (2) Use st_join from sf with R. Problem: I've updated sf, now ...
  • 795
1 vote
0 answers
160 views

Merging MultiPolygon and MultiLinestring

I want to merge a Multipolygon with a MultiLinestring however I cannot merge the data as they are of different types. One solution was to create a minimal buffer around the MultiLinestring and merge ...
1 vote
0 answers
414 views

How to convert a multipolygon to multiple single polygons

I have a polygon clipping function in my OpenLayers app which may return me a multipolygon. Unfortunately, my app does not support multipolygons by design. So I need to convert a multipolygon to ...
  • 435