Questions tagged [intersection]

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

143 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
0answers
233 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
314 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
540 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
95 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(...
4
votes
0answers
347 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 ...
4
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 ...
3
votes
0answers
100 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
121 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
96 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
209 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
206 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
136 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
295 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
821 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
767 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
1answer
64 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

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 ...
2
votes
0answers
35 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
293 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
53 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
120 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
122 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
220 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
220 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
278 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
311 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
72 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
137 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
446 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
213 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
628 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
60 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
183 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
154 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
667 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
105 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
237 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
294 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
264 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
130 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
72 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
273 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 ...
2
votes
0answers
282 views

How could I make this PostGIS query run faster?

SELECT st_band(rast, 1), st_width(rast), st_height(rast), st_bandpixeltype(rast, 1), st_bandnodatavalue(rast, 1), st_scalex(rast), st_scaley(rast), st_upperleftx(rast), st_upperlefty(rast) FROM public....
1
vote
0answers
22 views

Intersection between two polygons using GeoDjango

I've three models: class Buffer(models.Model): geom = models.PolygonField() class ImportedPolygons(models.Model): geom = models.MultiPolygonField() class IntersectionOutput(models.Model): ...
1
vote
0answers
25 views

Adjecency matrix with road intersaction to the power of 3

I got the following code: line_gdf = Crewe.iloc[0:2500] ma = line_gdf.geometry.apply(lambda g: line_gdf.intersects(g)) lll = ma < 1 # Where values are low ma[lll] = 0.0001 # All low values ...
1
vote
0answers
20 views

Create grid with a prespecified number of cells inside a shapefile with R

I need to create a grid inside a shapefile with a fixed the number of cells n (inside the shapefile). I tried a few stuff see bellow but nothing worked so far. Any ideas? The data shapefile can be ...