Questions tagged [self-intersection]

A self-intersecting polygon is where the boundary (edge) crosses over itself.

Filter by
Sorted by
Tagged with
3 votes
2 answers
77 views

QGIS Single sided buffer value of specific area and line length on 90 degrees lines

I need to Single Sided Buffer a specific surface based on a line length, on QGIS. Example: line length: 60.367 meters. area needed from single sided buffer: 452.4 square meters. theoretic Single ...
Marin Marian's user avatar
2 votes
0 answers
70 views

PostGIS tesselation invalidating polyhedralsurfaces

We are trying to visualise prefabricated concrete elements. These elements are exported in an ifc format. https://technical.buildingsmart.org/standards/ifc/ifc-formats/ We have already been able to ...
Glenn's user avatar
  • 29
3 votes
1 answer
81 views

PostGIS not finding self-intersections

According to this link, ST_IsValid should return self-intersections. However, using the following WKT, I get that the following line is valid: SELECT ST_IsValid(ST_GeomFromText('MultiLineString ((8....
BritishSteel's user avatar
  • 6,637
0 votes
1 answer
51 views

Eliminate Selected Polygons in QGIS creates an incompatible GeometryCollection

I have a multipart shape file created from a GeoJSON. The original geoJSON is from the Vermont Open Geodata Portal, so a lot of the polygons have errors and overlaps. To fix the overlaps, after I ...
jake g's user avatar
  • 1
0 votes
0 answers
25 views

Self-intersections from geoprocessing in QGIS but detected via digitizing validity checks

I have performed a set of geoprocessing tasks to produce a polygon output. The polygon output contains - what I would consider an invalid set of vertexes and as such, an invalid geometry. (see screen ...
nr_aus's user avatar
  • 3,455
0 votes
1 answer
112 views

R: Error in CPL_geos_op2(op, x, y) : Evaluation error: TopologyException: Input geom 1 is invalid: Self-intersection at

I am new to using CRS on R and thus am confused and have the following question: I have two .shp files from - https://github.com/HindustanTimesLabs/shapefiles/blob/master/city/delhi/ward/delhi_ward....
Anisha Garg's user avatar
0 votes
0 answers
52 views

How to prevent self-intersections when using PyQGIS

I've been having an issue while drawing polygons using this PyQGIS code below. Specifically, I've been encountering self-intersection and I don't know how to fix it. Any advice or suggestions? ...
Salim Erbui's user avatar
1 vote
0 answers
56 views

Mapping self-intersections of a transformed LineString

I’m using shapely to solve a problem in physic. My problem can be represented in 2D with a LineString. In order to solve my problem I need to : Apply a transformation to the original LineString Find ...
lamilam's user avatar
  • 11
4 votes
1 answer
288 views

QGIS does not find self intersections, but ArcGIS Pro does

I am working on a project that includes preparation of a series of polygon shapefiles that need to go through an official geometry/topology check-up before final submission. This official check-up ...
Gašper Zupančič's user avatar
0 votes
0 answers
168 views

How to remove remove self-intersections(?) from a river network line

I am working with a new global-scale river network that splits around large islands (blue lines). I will be working with the river network in Google Earth Engine and have completed some prior vector ...
Rich_B's user avatar
  • 33
1 vote
1 answer
90 views

Reproject valid features returns geomety error with PostGIS

PostGIS3.2, PostgreSQL 13 I have a table with multipolygons. There is a constraint CHECK (st_isvalid(geom)) on it. Run a query with st_ivalid(geom) returns no error fortunately ! When I try to ...
Leehan's user avatar
  • 1,216
2 votes
0 answers
334 views

Python `shapely` - split a complex line at self-intersections

Description Sum-up When splitting a complex line - let's say with a single "loop" - shapely.ops.split applied at the self-intersection point returns two lines where I would expect three ...
jmon12's user avatar
  • 131
1 vote
3 answers
444 views

How to prevent self-intersection when using Intersect tool in ArcGIS?

When using the Intersect tool in ArcGIS (Desktop 10.8): I have two inputs, a polyline FC and a polygon FC. I want to get the intersection of each polyline feature with the polygon features, so the ...
Matt Leonard's user avatar
2 votes
2 answers
2k views

PostGIS: Is it safe to always call ST_MakeValid to "fix" geography polygons?

I have a GeoJSON file with latlong polygons for the US state of New Mexico. I've loaded them into Postgres, using the geography column type. For some of the polygons, I get an error when calling ...
Kannan Goundan's user avatar
3 votes
1 answer
391 views

Self-crossing/intersecting polygon in QGIS that tools identifies them as valid

I am using QGIS 3.14 long term version. I need to identify these polygons that are self-crossing. Here are the tools I have tried SAGA's "Polygon self-intersect"; check validity from ...
Bruno Neves's user avatar
8 votes
4 answers
2k views

Identifying self-crossing/intersecting polygon in QGIS

I need to identify these polygons that are self-crossing. I tried to run SAGA's "Polygon self-intersect" tool but it didn't work. update: I tried to use check validity and other similar ...
Bruno Neves's user avatar
5 votes
3 answers
5k views

Identifying self-intersections in LineString using shapely

I am looking for an efficient way to identify the self-intersections in a shapely LineString. I can check if there is an intersection by lineStringName.is_simple function. However, I couldn't find a ...
rmj's user avatar
  • 387
2 votes
2 answers
54 views

Self-intersecting problem in Canadian census tracts shapefile?

I need to pass some data stored at the census tract level in Toronto to dissemination areas. When I run the Areal Weighted Interpolation package (code below), I get an invalid topology error (see ...
manuel santana palacios's user avatar
4 votes
2 answers
300 views

PostGIS - Non-simple Linestring and Polygon Intersection

Application Description I am using PostGIS as a database for a PHP application for pilots. They can plan their flights there and see all the airspace information along the track. I have airspace data ...
Andrej S's user avatar
4 votes
1 answer
184 views

MSSQL STIntersection Results in COMException

Using MS SQL Server 2019 and running the following query results in the COMException displayed below. DECLARE @Geom1 AS GEOMETRY DECLARE @Geom2 AS GEOMETRY SET @Geom1 = ...
CarteTon's user avatar
  • 116
2 votes
1 answer
417 views

Can a self-intersecting banana polygon be made OGC-compliant in an Azure SQL Database using spatial functions?

I'm an experienced Postgres / PostGIS user fiddling with SQL Server / Azure SQL Database spatial capabilities for the first time. Banana Polygon For the banana polygon pictured above, I believe there ...
pixelpete's user avatar
3 votes
1 answer
534 views

Retrieving only type of the geometry error by using validateGeometry() in PyQGIS

I have a polygon layer and I am trying to catch the geometry error by using validateGeometry(). The following snippet is working and finding the reason for the error as well as the location. layer = ...
Nil's user avatar
  • 1,492
3 votes
0 answers
105 views

Calculating population within a circle excluding intersects with shapely

I have a data of a centroid and a count: centroid population id 0 POINT(38.9081 77.0349) 9004.0 0 1 POINT(38.8521,77.0377) 517.0 1 2 POINT(38.9081 77.0377) 10369.0 ...
Feyzi Bagirov's user avatar
3 votes
2 answers
109 views

Creating field from number of items separated by "|" in field in QGIS

I am trying to create an index field from an intersection layer I have created using the SAGA's "Polygon Self-Intersection" tool. The SAGA tool outputs a field that shows which buffers ...
N-particle's user avatar
8 votes
2 answers
2k views

How do I find where a line intersects itself?

I am using Python 3.7 with Shapely and GeoPandas. I have a big line of 181,000 points, and would like to find all the points where the line intersects itself. It does so a lot. I don't need a new ...
Aaron's user avatar
  • 81
3 votes
1 answer
700 views

Is there a faster way to see if a polyline intersects itself?

I have several large polyline feature classes and I need to find how many times each polyline intersects itself (where it intersects is of no importance). I wrote the following code, which works fine,...
Mathwiz's user avatar
  • 152
3 votes
0 answers
794 views

Shapely buffer(0) returns an empty polygon(coordinates:[]), and discard the main polygon

There are self-intersect polygons in my geojson files. So I used the shapely lib to fix it. The code is like this: clean = geom.buffer(0) Most of the polygons have been processed properly, but there ...
han's user avatar
  • 31
1 vote
1 answer
331 views

Finding line is self intersected or not using PyQGIS

I have to find whether the line feature is self intersected or not. I have tried the below logic but I am not getting it. Is there a way to find the solution? lineLayerName=self.lineLayer.name() ...
Kurinji Nathan Kumar's user avatar
7 votes
1 answer
1k views

Changing vertex order for polygons in QGIS?

I have this intersection of a polygon, see image below I would like to redraw the lines so they don't cross each other. So, in the end, I would like to have a polygon without self-intersecting parts....
Linkinpark's user avatar
1 vote
1 answer
2k views

turfjs cannot detect all self intersections

I am working with OpenLayers/Turfjs to detect self intersection in users manually drawn polygons on a web map. The function that detects the self intersection is a property of the condition of the ...
user3523583's user avatar
1 vote
0 answers
133 views

Ring self-intersection error when running Random Points

This error occurs on two rows of my shapefile: Feature (650) has invalid geometry. Please fix the geometry or change the Processing setting to the "Ignore invalid input features" option. ...
Jon's user avatar
  • 73
12 votes
1 answer
23k views

How to fix invalid polygon with self-intersection - Python

I have a self-intersecting polygon inside a shapefile. Does there exist a Python library which spots the self-intersections and makes it possible to correct them? I have found it is possible in QGIS ...
peppe's user avatar
  • 153
3 votes
2 answers
2k views

Finding polygon self-intersection with PyQGIS on QGIS 3.4

My script: from qgis.core import * import qgis.utils import processing, os, sys, glob polys = QgsVectorLayer("/Users/john/shapefile/layer.shp","intersection","ogr") output = "/Users/john/shapefile/...
p wat's user avatar
  • 85
3 votes
1 answer
866 views

Determining if route self intersects using Java? [closed]

I have a sequence of coordinates (lat,lng) defining a route. How can I determine whether this route is self intersecting? I am trying to implement a Java method for this, but I have been ...
João Matos's user avatar
2 votes
0 answers
1k views

QGIS: Dissolving Polygons with Self-Intersection

I have created multiple polygons with some subset of track-lines, with the order of time those points were recorded. Therefore some of the polygons have self-intersection within the polygon. Is there ...
Yuen Wa Ho's user avatar
4 votes
1 answer
5k views

Finding self-intersection in PostGIS

I've developed an query to find self-intersection points by using PostgreSQL 10 and PostGIS 2.4 database. The query took long time (aprx 90mins) to produce the result from 3,122 polygons. The query is:...
venkat's user avatar
  • 1,051
6 votes
1 answer
2k views

Command line tool to repair self-intersection in GeoJSON

I am working with this file. Kansas seems to have a self intersection: TopologyException: Input geom 0 is invalid: Self-intersection at or near point -98.918045000000006 37.379078 at -98....
Mittenchops's user avatar
4 votes
1 answer
11k views

Fixing invalid geometry (self intersection)

Attempted to extract raster by mask layer in QGIS 2.18.15 and for one of my shapefiles, the command could not be executed. The error message reads "Warning 1: Ring Self-intersection at or near point ...
Johanness's user avatar
  • 392
1 vote
1 answer
315 views

Self-intersecting geometry errors when splitting polygons

I'm having issues digitising in QGIS 2.18.20 on my mac. My normal strategy for digitising a habitat survey area is to create a (shapefile) polygon for my survey boundary, and split the shape ...
Cameron's user avatar
  • 171
3 votes
1 answer
4k views

Topology exception on geometry intersection?

I am using the following PostGIS functions in a Postgres query: ST_AsGeoJSON(ST_Intersection(p.geom,c.geom)) Where p.geom & c.geom are type multipolygon. The query works most of the time but ...
Don's user avatar
  • 805
3 votes
0 answers
242 views

Issues with geometry in QGIS but not ArcGIS? [closed]

I have found that shapefiles that function normally in ArcGIS will not work in QGIS due to geometry issues. For example, I have a species geographic range file that when I intersect with a buffer will ...
user113667's user avatar
13 votes
4 answers
29k views

Fixing polygon self-intersection in QGIS?

I am attempting to mask a raster to US Forest Service boundaries in QGIS. It fails due to self - intersections of polygons. Warning 1: Ring Self-intersection at or near point -109.90112962000001 43....
apetbrown's user avatar
  • 131
5 votes
2 answers
5k views

Invalid geometries made valid don't remain valid?

From https://s.geo.admin.ch/77395652c7 I got the groundwater resources data for Switzerland. (deeplink to ZIP with Shapefiles, 147.3 MB). Some areas therein are self-touching*, which makes gdalwarp ...
das-g's user avatar
  • 1,445
6 votes
2 answers
303 views

How do I topologically clean "pointy bridges" using GRASS v.clean?

I have a shapefile with hundreds of pointy areas connected at the tip, forming a "pointy bridge". This creates a self-intersection and duplicate node. I'm not exactly sure what this type of error is ...
srha's user avatar
  • 829
0 votes
1 answer
384 views

LineString Self-Intersection points

I'm trying to get all the points from a Self-Intersection LineString. On LineString segments intersection with no vertex on intersection: ST_Intersection make the job; Now, how catch the vertex ...
Paulo Pires's user avatar
12 votes
2 answers
5k views

Bowtie or hourglass polygon validity issue when self-crossing point is not defined

Using Python2.7 and shapely, let: import shapely coords = [(0, 0), (0, 2), (2, 0), (2, 2), (0, 0)] bowtie = shapely.geometry.Polygon(coords) bowtie.is_valid which gives this : Self-intersection ...
swiss_knight's user avatar
  • 10.1k
0 votes
1 answer
2k views

Count the intersection of buffers, in the same layer. qgis [duplicate]

If I have one shape of buffers, How to count the number of times, the different buffers (in the same layer) intersect each other.
helena.grau's user avatar
7 votes
1 answer
5k views

Fixing polygon with ring self-intersection in QGIS

When I polygonize a raster, I very often have 'pixels' holes/interior ring that touches exterior ring. An example: POLYGON((5 0, 10 0, 10 10, 0 10, 0 0, 5 0, 3 3, 5 6, 7 3, 5 0)) It's defined as an ...
J. Monticolo's user avatar
  • 15.7k
5 votes
1 answer
1k views

Python - gdal.Polygonize produce invalid geometries

gdal.Polygonize is making invalid geometries and later in processing chain an error is reported stating that there are Ring Self-Intersections. Not one, quite a few so manual solution is not an option ...
Pandza's user avatar
  • 153
3 votes
2 answers
10k views

How to overcome invalid input geom and self-intersection when intersecting shapefiles in R

I downloaded two shapefiles from IUCN (available here and here) to determine the range overlap between two species. When I bring the shapefiles into R, I am able to plot them on a map together, ...
user89092's user avatar