Questions tagged [multi-polygon]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 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 ...
user avatar
1 vote
0 answers
24 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 ...
user avatar
  • 187
1 vote
0 answers
43 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 ...
user avatar
2 votes
1 answer
140 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=...
user avatar
1 vote
1 answer
61 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 ...
user avatar
1 vote
1 answer
43 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 ...
user avatar
5 votes
2 answers
88 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 = ...
user avatar
  • 23k
6 votes
2 answers
169 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 ...
user avatar
  • 315
3 votes
2 answers
152 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?
user avatar
  • 7,663
-1 votes
1 answer
38 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 ...
user avatar
  • 1
5 votes
1 answer
247 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 ...
user avatar
  • 209
3 votes
1 answer
122 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 ...
user avatar
  • 24.9k
0 votes
2 answers
96 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 ...
user avatar
3 votes
1 answer
57 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 ...
user avatar
0 votes
1 answer
361 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. ...
user avatar
1 vote
1 answer
136 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. ...
user avatar
2 votes
0 answers
52 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, ...
user avatar
  • 29
2 votes
1 answer
81 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&...
user avatar
  • 31
2 votes
2 answers
200 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 -&...
user avatar
2 votes
1 answer
108 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?
user avatar
3 votes
2 answers
106 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 ...
user avatar
0 votes
1 answer
114 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 ...
user avatar
  • 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:- ...
user avatar
  • 41
0 votes
1 answer
26 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 ...
user avatar
  • 1
3 votes
1 answer
692 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 ...
user avatar
  • 150
4 votes
1 answer
131 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 ...
user avatar
  • 155
0 votes
0 answers
43 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-...
user avatar
4 votes
1 answer
2k 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? ...
user avatar
7 votes
3 answers
2k 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 ...
user avatar
  • 775
1 vote
0 answers
70 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 ...
user avatar
0 votes
0 answers
139 views

Multiple 3D polygons to a single 2D MultiPolygon having individual overlapping features or a single 3D MultiPolygonZ

I narrowed a 3D problem to a GeoDataFrame G containing four Shapely polygons, each is a 3D flat triangle. In 3 dimensions, these polygons all share a common summit and also a common edge, 2-by-2. They ...
user avatar
  • 6,698
1 vote
0 answers
181 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 ...
user avatar
  • 391
1 vote
0 answers
137 views

QGIS Difference Algorithm: multilinestring won't work with multipolygon layer

I am working with two vector layers in QGIS (location: Indonesia). I want to 'subtract' the area of layer 1 ('Forest_buffer') of layer 2 (Scenario_1). I am using the Difference algorithm. Layer 2 is ...
user avatar
1 vote
0 answers
212 views

Extend the contours of the polygon into a polygon

I would like to be able to extend the vertices of one polygon to the edge of another polygon, how does the snapping between poligons using python. The photo shows a representation of my problem. I ...
user avatar
  • 365
3 votes
2 answers
125 views

Constructing grid over given position from polygons in QGIS

I have the following situation: I have a MultiPolygon Layer that shows some squares with the size of 100mx100m. The data looks like a raster: I want to construct a grid with the size of 100mx100m (...
user avatar
  • 65
0 votes
0 answers
90 views

Optimizing minimum distance calculations between multiple polygons in R

I have a list of polygons and would like to create a minimum distance matrix by calculating the minimum distance between each possible pair. I am currently using the code below, but this is running ...
user avatar
1 vote
0 answers
116 views

Getting error while trying to read multipolygon data using shapely wkt.loads (Python)

I have a CSV file from which I'm trying to read multipolygons using wkt.loads of shapely. While this works: from shapely import wkt x='MULTIPOLYGON(((18.62981086588664 73.79447461830097,18....
user avatar
0 votes
0 answers
40 views

Getting centroid of multipart polygon using ArcPy

I am trying to get the center of a multipolygon, I have tried doing: with arcpy.da.SearchCursor(fc, ['SHAPE@']) as cursor: for row in cursor: multipoly = row[0] centroid = ...
user avatar
  • 131
0 votes
1 answer
43 views

Matching polygons to intersecting polygons using ArcMap

I am trying to match a set of polygons (A) to another set of polygons (B) using ArcMap. Both sets overlap themselves, and each other. Here's an example of what it looks like in my data: The green ...
user avatar
  • 1
2 votes
0 answers
38 views

Separate multipolygons into equal parts

I am trying to separate a multipolygon into equal parts. I am aware of the divide polygon plugin and that worked well for me in previous examples where a single polygon is involved. Unfortunately I ...
user avatar
  • 21
0 votes
1 answer
471 views

How to convert Multipolygon to GeometryCollection?

I get this error (Script Error, File too large: larger than 512kb) in Google Earth Engine and my layer is a Multypolygon, just with 86 polygons. I have another layer with 300 polygons without any ...
user avatar
0 votes
1 answer
67 views

How to flatten a PolygonZ onto the XY-plane using pygis

I want to flatten/project a PolygonZ onto the XY-plane. Although I wished for a method to flatten the whole object with the option of letting me decide what direction of the the line needs to be ...
user avatar
  • 91
1 vote
1 answer
153 views

Rendering overlapping polygons without holes in multipolygon in Leaflet

Is there a way to render overlapping polygons without holes in multipolygon in Leaflet? I found Leaflet has an open issue. codesandbox.io I am asking because I have a bound polygon that contains inner ...
user avatar
  • 73
1 vote
0 answers
79 views

Geometry converts from Polygon to Multipolygon in PostGIS

I'm having difficulties with the Geometry types in PostGIS and/or ArcPy and hope some of you can shed a light on what I'm missing or how I can fix it. I have a .gdb containing Polygons. The Table in ...
user avatar
  • 23
0 votes
1 answer
59 views

Using symbology for representing start and end (polygon / point) in QGIS

I have records with two geometry columns per record. I have been looking at different options to show them in QGIS: Create two layers (one for start and one for end) Create a multipolygon that merges ...
user avatar
4 votes
1 answer
125 views

Creating polygons with "Create shapefile layer" always produce multipolygons instead of polygons when saving in QGIS

Not sure if is a bug or I'm missing something. Every time i'm creating a new shapefile with "Create shapefile layer" i got a multipolygon instead of a polygon (at least is what I'm expecting)...
user avatar
  • 183
3 votes
1 answer
293 views

Error when calculating final polygon after subtracting all intersecting polygons using shapely

This question is a follow-on question from Calculating final polygon after subtracting all intersecting polygons using shapely which was answered. I have a list of centroids that I buffer to 5000 ...
user avatar
6 votes
4 answers
710 views

Taking only the largest polygon from MultiPolygon layer in QGIS

I have MultiPolygon geometries in my file, and I want to take only the largest polygon within the MultiPolygon geometry to further work with it. I tried using the "Multipart to singleparts" ...
user avatar
1 vote
1 answer
129 views

Getting a count of points in a multipolygon?

I have a set of lottery retail locations, latitude and longitude, that I transformed to points and added the geometry column like this: ALTER TABLE lottery.retailers ADD COLUMN geom geometry(Point, ...
user avatar
  • 11
6 votes
3 answers
553 views

Multipolygon supposed to be contained by another but returned False with Shapely

There are two multi-polygons a and A where a is supposed to be contained inside A. Using shapely, the following difference operator b = a.difference(A) print(b) gives POLYGON EMPTY However testing A....
user avatar
  • 265