Questions tagged [intersection]

Use this tag when asking questions related to where features overlap.

156 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
263 views

Defining partial or complete overlap with QgsSpatialIndex

I'm working on adding some functionality to a QGIS plugin. It currently uses a QgsSpatialIndex to efficiently compute whether the features of a vector layer intersect (potentially millions) of ...
6
votes
0answers
341 views

How to remove overlapping features by percentage?

I have geometry records of type MultiLineStringZM and I am trying to INSERT new records that overlap some of the records currently in the table. If they were type MultiPolygon I could use ST_Area() as ...
6
votes
0answers
550 views

PostGIS: How to distinguish overlapping routes (i.e., LineStrings) based on their direction?

I have a set of routes which are represented by LineStrings in my PostGIS database. These routes represent journeys that people make. I want to come up with routes that (a) overlap, and (b) have the ...
5
votes
0answers
99 views

Why won't my points (that I created by intersection) intersect with the geometry they've been created from?

I created a set of points by intersecting a linestring layer with the boundary of a multipolygon layer like this: CREATE TABLE freiraumkataster_grenze AS SELECT gid, ST_CollectionHomogenize(...
5
votes
1answer
1k views

Finding Intersection of Two Circle given Lat/Lon and radius?

I am attempting to calculate the intersection of two circle on the Earth with a given latitude, longitude and radius. I started with this Calculating intersection of two Circles? These circles will ...
4
votes
0answers
362 views

How to Simulate Venn Diagram of Buffers using QGIS?

For the sake of simplicity, suppose I have only 2 points on one layer. Point A have population of 100, and point B have population of 150. I do find buffer of these 2 points and it is intersect. I ...
3
votes
0answers
43 views

Joining lines intersecting with only one other line?

I have road centerline file that is split into smaller segments. I need to make a node file. How can I join line segments intersecting only once - so I wouldn't join ones that have 3-4 intersections ...
3
votes
0answers
53 views

Clip completely overlapping polygon(s)

The shapefile that I'm working with (in QGIS) has over more than 250k polygons. But unfortunately a lot of the polygons are overlapping. The focus of my challenge is to delete or clip the polygon ...
3
votes
0answers
166 views

Find a centerline of an intersection between two irregular shaped polygons

I have two irregular shaped polygons that overlap each other at least in at two points. I want to first find the intersection area between all of them, then for the polygon pair that intersects I want ...
3
votes
0answers
165 views

Unable to compute intersection between two polygons using PyQGIS?

I have two polygons in different layers. I am trying to find the intersect between the two polygons. Below a figure showing my test case. I initially wanted to find the intersect between the green ...
3
votes
0answers
108 views

Intersection and area calculations in geographic vs. projected coordinates

I think one should do intersection calculations when layers are in the same coordinate system, and one should do area calculations in the appropriate projected coordinate system. The order matters, ...
3
votes
0answers
241 views

Create lines to connect vertices in QGIS

I have a file that marks street edges and want to connect "crossing" points automatically. Image 1 shows the street edge, Image 2 shows the desired result. Is there a plugin or method I can use to ...
3
votes
0answers
213 views

Framing of WFS GetFeature request using polygon intersect filter

I am trying to frame a Web Feature Service GET Request applying the INTERSECT filter but I am getting the following error. : <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows" version="1....
3
votes
2answers
155 views

Query Z at intersecting point locations from a MultiPolygonZ?

I create a MultiPolygonZ geometry with ST_DelaunayTriangles(). select st_setsrid( ST_CollectionExtract( ST_DelaunayTriangles( ST_GeomFromText('MULTIPOINT ...
3
votes
0answers
82 views

Determining the first and last point that a polygon intersects

I have this... And I want to join those attributes to the polygon automatically: Because I'll have to replicate this on tones of those polygons. If this works I would like to know if it still works ...
3
votes
0answers
307 views

How to compute (X,Y,Z) of a point from given attributes

Is there a way to compute the geodetic coordinates (Earth Centered) of a satellite S(x,y,z). The original problem is to compute the footprint of an antenna, given the following information: Antenna(x,...
3
votes
0answers
842 views

Intersecting vector data with raster data in PostGIS?

I have Open Street Map [OSM] data imported so that I can access the geometry of buildings. I have also loaded SRTM digital height data from NASA from a GeoTIFF raster. I have projected the raster into ...
3
votes
0answers
775 views

Can't find point/polygon intersect using QGIS (Windows only)

Below I describe the method I am using. I have two machines: ubuntu linux, qgis 1.4 - intersection works WIN xp, qgis 1.8 - intersection does not work Hopefully, someone will find what I am doing ...
2
votes
0answers
45 views

Assign area of polygon to raster cell. Effective way in Python

I have quite interesting task to resolve, but my solution is not effective, so I am looking for some advice to improve my code. I have raster dataset covering Europe, in crs WGS 1984 (4326). The cells ...
2
votes
0answers
28 views

Problem with intersects operator in Postgres

I have this table below CREATE TABLE public.geometry_polyline_volume ( id serial not null primary key, distance float not null, height float not null, coordinates ...
2
votes
1answer
81 views

Finding differences between polygons in PostGIS

I have another redistricting question. The datasets and queries available on my GitHub, but I will include the queries here, too. I am working on two complete datasets: 1) A PLAN - composed of ...
2
votes
0answers
38 views

PostGIS intersected polygon fails on contains

I have two functions, first I check if a polygon is within a defined polygon. If it's not, but on the border, I cut it with ST_Intersection, and get a new polygon. If I check the result, I get that it ...
2
votes
1answer
481 views

Finding shortest distance from point(s) to number of polygons at varying angles using shapely?

My aim is to calculate the distance a point is from land in Python, trying to replicate the functionality of fetchR. Given an origin and distance, I create shapely LineStrings which radiate out from ...
2
votes
0answers
54 views

Calculating share of overlapping areas via aggregate function in a virtual field

I'm trying to calculate the shared area for several overlapping areas. I need a dynamic solution in order to get automatically calculated statistics when drawing new polygons. The target area is in ...
2
votes
0answers
157 views

T-SQL Invalid Geometry Created by Intersection

I have two sets of geometries (A and B) in SQL Server 2016. I want to determine the overlap areas of those geometries from set A that intersect set B. Most of the time this code works: SELECT a....
2
votes
1answer
143 views

Trimming road end at the intersection?

I have a road centerline that I have used to create buffers that represent road area. Now I need to fix the intersections. As you can see on the picture, if the road end is touching the non-end of the ...
2
votes
0answers
338 views

How to speed up 'intersection' tool for big amount of data?

I can't figure out how to work with a large dataset. The problem is: I want to know how many points (over 700 000 adresses) are within a polygon layer (it's made out of 5 layers, train noise)(they are ...
2
votes
0answers
243 views

r - intersection of 3D objects

How can an intersection of 3D object with 3D object be done in R, for example a 3D line with 3D polygon ? Saw that "sf" provides some possibilities but didn't get the desired result. What was ...
2
votes
0answers
336 views

TopologyException issue when doing intersection in Geopandas?

When I do overlay processes like intersection, I mostly get: :TopologyException: found non-noded intersection between LINESTRING (229971 4.39944e+06, 229971 4.39944e+06) and LINESTRING (229971 ...
2
votes
0answers
368 views

Length of the boundary intersection between two polygons in R

I am trying to find the length of the border shared by two polygons. I have run cleangeo on these shapefiles. There were no flags that came up. I have looked through several other posts on the topic ...
2
votes
0answers
73 views

Find the intersecting area of more than 2 polygons in QGIS

I have a map of 7 species distributions. I want to create polygons of the area where all 7 overlap, 6 overlap, 5 overlap etc. I created a polygon of where any 2 species overlap using the intersect ...
2
votes
0answers
148 views

QGIS processing algortihm crashes in python console but works manualy

I am loading two layers from PostGIS database and I am trying to run 'qgis:intersection' algorithm with them. Execution of the algorithm through the python console initially works but crash after 2-3%....
2
votes
0answers
484 views

QGIS not recognizing special characters and problem with intersection?

Started playing with QGIS recently and I have encountered a problem. I have a layer with administrative areas of my country and when adding it the encoding is set to UTF-8. When I open its attribute ...
2
votes
0answers
58 views

How to get lengths between intersecting points

I have a route that goes all the way along the project scope (Route A) and then multiple other alternative routes that intersect Route A at different points (See picture Here). I want to get the ...
2
votes
0answers
216 views

Finding the closest points to a line with only one point from each subset of points

I have a set of data points that represent many paths for different journeys, where each journey has its own identifier (Operation No). The data for all journeys is in a single table but in effect has ...
2
votes
0answers
1k views

How to efficiently detect intersect between polygons?

So I'm trying to implement box selection in Leaflet. Currently I'm using turf's intersects function to detect if the box intersects with any of my GeoJSON polygon features. However, this is very ...
2
votes
0answers
680 views

Find Properties of Nearest Line Segments to Point in Python

I have been trying to find a workable Python approach to finding nearest line segments to one (or more) points, and came accross @gene's solution to @RustyMagoo's problem here: from shapely.geometry ...
2
votes
0answers
61 views

Joining polygons to points when the points fall in the intersection of polygons. QGIS

I am using QGIS. I am hoping to join a set of geocoded points to polygons in such a way that the new snapefile will be points that have a new field which lists the attributes of the polygon it lies in ...
2
votes
0answers
188 views

PyQGIS: intersection of one node layer with two polygon layers

I´m new with the use of PyQGIS and I´m working in a problem applied to a water supply systems modelling, where I need to distribute the water demand in about 5000 nodes (network junctions). I´m ...
2
votes
0answers
160 views

QGIS Atlas zoom to intersection between two different layers

I have two polygon layers, one is about different land owners boundaries and is used for atlas generation, and the other is about forests inside each property. In atlas generation sometimes i want to ...
2
votes
0answers
697 views

How to test polar stereographic projection for a specific longitude intersection?

I'm writing a library that tests grids defined by map projections for intersections, and am running into an issue implementing the test for polar stereographic and rectangular projections - '...
2
votes
0answers
116 views

how to use st_intersection() with re-projection in POSTGIS?

This is a shipping route from 'Portland to Busan' and I want to check the route against land_polygons like how much distance is traveled by a route through land. And the problem is while checking the ...
2
votes
0answers
288 views

How to choose a projection for area measurement on building to continental scales?

I have many geographical objects described as polylines, polygons, multipolygons. All objects are in WGS84. Object could be: a building, stadium, park, street, highway, city, state, even country and ...
2
votes
0answers
243 views

ogr2ogr: export intersected gml using shapefile

I'm trying to do the same as the ogr2ogr example given by https://gis.stackexchange.com/a/119404/6458 The difference is that my inputs are a GML and a shapefile. Export.shp should only contain the ...
2
votes
0answers
299 views

PostGIS: intersection of a polygon with 2 rasters

I'm trying to get the intersection of a Polygon with 2 raster layers in PostGIS. The rasters have the same size and pixel size and I'd like to retrieve for the polygon a list of something like that: ...
2
votes
0answers
267 views

QGIS 2.8.2 - Using spatial expressions in labelling

I'm creating some hard copy map output from QGIS. I want to use an expression to suppress labels for some features on a layer when another feature from another layer intersects with those features. ...
2
votes
0answers
133 views

How to cut parallelogram with intersecting line?

I have a very specific set of circumstances under which I need to break a parallelogram into 2 pieces. The parallelogram obviously always have 4 vertices and the intersecting line intersects the ...
2
votes
0answers
73 views

Distribute Hotel Beds According to Population Density in Buffers using ArcGIS for Desktop?

I am running an ArcGIS for Desktop analysis where I am plotting competing hotel facilities and then distributing their beds in a 5-mile buffer around the site. I would like to distribute the beds ...
2
votes
0answers
1k views

3D features (Polyline, Polygon) intersection library

For my research I am looking for a (python) library to get the intersection of some 3D features. The features can be Polygons or Polylines. Mostly I need to intersect a plane with my features and get ...
2
votes
0answers
280 views

GDAL/OGR- OGRLayer.Intersection() with C# bindings

I was trying to perform intersection on two feature classes (shapefile format) using OGRLayer.Intersection(), but have problems making it work with C# bindings. I am not able to figure out on how to ...