Questions tagged [self-intersection]

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

Filter by
Sorted by
Tagged with
2
votes
2answers
26 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 ...
4
votes
2answers
79 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 ...
3
votes
1answer
33 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 = GEOMETRY::...
1
vote
1answer
77 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 ...
2
votes
1answer
103 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 = ...
0
votes
0answers
58 views

SAGA tool polygon self-intersection: time to prosess increases exponentially with increasing buffer width

With QGIS 3.10 I try to find overlapping areas and the number of overlaps of buffers with the SAGA tool "Polygon self-intersection". The tool works fine with round buffers around points with ...
3
votes
0answers
34 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 ...
2
votes
1answer
79 views

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

I am trying to create an index field from a intersection layer I have created using the SAGA, polygon self intersection tool. The SAGA tool outputs a field which shows which buffers intersect each ...
7
votes
2answers
746 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 ...
3
votes
1answer
345 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,...
2
votes
0answers
326 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 ...
2
votes
1answer
170 views

How to find the line is self intersected or not in python using QGIS

I have to find the line feature is self intersected or not. I have tried the below logic but not getting it.. Kindly suggest a way to find the solution. lineLayerName=self.lineLayer.name() for ...
6
votes
1answer
598 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....
1
vote
1answer
756 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 ...
1
vote
0answers
99 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. ...
9
votes
1answer
11k views

How to fix invalid polygon with self-intersection - Python [closed]

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 ...
2
votes
2answers
1k 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/...
2
votes
1answer
437 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 ...
2
votes
0answers
773 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 ...
1
vote
1answer
2k 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:...
5
votes
1answer
1k 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....
4
votes
1answer
7k 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 ...
1
vote
1answer
259 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 ...
2
votes
1answer
2k 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 ...
3
votes
0answers
175 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 ...
11
votes
4answers
18k 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....
5
votes
2answers
4k 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 ...
6
votes
2answers
235 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 ...
0
votes
1answer
293 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 ...
11
votes
2answers
4k 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 ...
0
votes
1answer
1k 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.
7
votes
1answer
4k views

How to fix polygon with ring self intersection in QGIS?

When I polygonize a raster, I very often have 'pixels' holes/interior ring that touche exterior ring. 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 ...
4
votes
1answer
770 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 ...
3
votes
2answers
8k 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, ...
3
votes
0answers
4k views

Clipping a raster by a polygon layer: Error "Cutline is not valid after transformation"

I have a raster layer (3 cm x 3 cm) and a vector layer with polygons and when I try to clip the raster by the polygon layer to have just the bare earth/ground regions left over, so I can interpolate ...
0
votes
1answer
1k views

R: Self-intersection error when using intersect with two shapefiles

I am trying to "translate" worldwide raster data to European nuts3 polygons. That means I try to overlap two shapefiles to find the average value on nuts3 level. Unfortunately, when I use the ...
2
votes
1answer
845 views

Draw polygons from self-intersecting lines: Looking for a workaround for inner boundaries / holes

I use OGR & Python to develop a geodesic polygon buffer. The buffered polygon is generated from a polyline ring. The polyline ring is generated from point coordinates. As the polyline ring is ...
2
votes
0answers
1k views

Creating inner ring of polygon using buffered geometry in JTS? [closed]

I am still a beginner to GIS. I have a polygon and I want to draw a large border inside the that polygon (see fig A and B below). With the library I am using, I have to do this with a polygon with "...
1
vote
1answer
257 views

PostGIS help writing a ST_MakeSimple method for self intersecting lines?

I have imported Open Street Map lines into PostGIS 2.1 and I need to clean up the self intersecting ways. I have done some manual edits in the past but there are many more ST_IsSimple(way) = false ...
2
votes
1answer
61 views

Self-intersecting after exporting .shp from Personal GeoDatabase

I have a Feature Dataset in a Personal Geodatabase, with resolution = 0.00000001 and tolerance = 0.000000005. I am exporting the Polygon Feature Classes to shapefiles, after setting Resolution = 0....
33
votes
1answer
32k views

Getting TopologyException: Input geom 1 is invalid which is due to self-intersection in R?

The 'TopologyException: Input geom 1 is invalid' self-intersection error which arises from invalid polygon geometries has been widely discussed. However, I haven't found a convenient solution on the ...
1
vote
5answers
8k views

Fix Self Intersecting Polygons Manually [closed]

I are looking to implement a method to fix self-intersecting polygons by editing the vertex order. We want to take the polygon rings and re-arrange/add in vertices to make a valid polygon. This is ...