Where features overlap

learn more… | top users | synonyms

28
votes
4answers
8k views

Separate polygons based on intersection using PostGIS

I have a PostGIS table of polygons where some intersect with one another. This is what I'm trying to do: For a given polygon selected by id, give me all of the polygons that intersect. Basically, ...
10
votes
2answers
15k views

How to create a new layer from overlap between two layers?

I'm new to desktop GIS, and will try to ask while lacking the proper terms from the GIS lingo: If QGIS was like Photoshop I would like to make a selection from one layer, and then match that ...
4
votes
2answers
3k views

Intersect Shapefiles using Shapely

What I'd like to try and do is intersect some point buffers with census tracts, maintain their ID's and the tracts attributes. I found a sample from ...
6
votes
2answers
378 views

Clipping vs Intersecting

I was curious why clipping shapefiles was just so difficult and whether it was different to intersecting shapefiles? You will see from one my questions that I gave up trying to clip a polyline with a ...
8
votes
2answers
1k views

Rgeos drops associated values when intersecting polygons

I am trying to intersect two SpatialPolygonsDataFrames and get a SpatialPolygonsDataFrame as the result. Unfortunately, using the gIntersection function from rgeos (which works impressively quickly ...
1
vote
1answer
187 views

Problem intersecting shapefiles with OGR in Python

I'm trying to move from ArcPy for geoprocessing. After searching some posts, I found this solution using the GDAL/OGR Python bindings: Intersect Shapefiles using Shapely My code is the following: ...
14
votes
3answers
4k views

Identifying road intersections using PostGIS

I'm trying to identify where roads intersect each other, and to make a point at this intersection, with the number of roads that form the intersection listed. I was wondering if there was some way ...
5
votes
2answers
785 views

Clip polygon and retain data

I have these two polygons: library(sp); library(rgeos); library(maptools) coords1 <- matrix(c(-1.841960, -1.823464, -1.838623, -1.841960, 55.663696, 55.659178, 55.650841, ...
1
vote
4answers
3k views

How to get intersection point from two lines (two coordinated points and two bearings)

I have tried for ages to find the algorithm for getting the coordinate of two intersecting lines from two given coordinated (latitude and longitude) points. As the picture below suggests, I have two ...
8
votes
7answers
3k views

Intersection algorithm that correctly handles the 180° meridian and poles?

Is there a well known intersection algorithm that correctly handles 180 meridian and poles? For example, let's say we have a list of latitude and longitude values that represent Antarctica. Let's ...
4
votes
1answer
2k views

How to use the Intersects function in the Field Calculator of QGIS?

I would like to have an example on how to use the Intersects function in the Field Calculator of QGIS. Basically, I want to know which feature from a polylines layer intersects a polygons layer and ...
9
votes
4answers
5k views

Distinguishing lines that intersect from lines that touch?

How do I distinguish between these cases in ArcGIS 10? Case 1: Both endpoints of a line touch another line Case 2: Both endpoints dangle over the lines it intersects I am looking at the Trim Line ...
6
votes
2answers
8k views

How to repair topology of a shapefile?

I performed an object-based image analysis using ENVI EX, and each of the classified features were exported as a shapefile. I transferred those shapefiles into ArcMap 10, and tried to intersect them ...
6
votes
1answer
1k views

Line vs. Polygon Intersection Coordinates

I am working with Python, Shapely and Fiona... Is there any way where I can give in an input of a line shapefile and a polygon shapefile, and get a result of the intersection points and their ...
1
vote
1answer
968 views

SQL Server Spatial Querying

I am looking for ways to learn querying for SQL Server Spatial (2008/2012). I have a table created from Shape2SQL and have been trying to run a simple intersection query to get results from that ...
1
vote
1answer
129 views

Calculate area intersected areas, problem [closed]

(I'm working in QuantamGIS) I intersected two layers creating a new layer. Within the attibute table of this new intersect layer i would like to calculate the new areas. However, it just doesn't ...
6
votes
1answer
7k views

can I extract overlap of polygons within the same layer?

I am trying to extract the overlap of polygons that are within the same layer in 10. The layer came from a buffered street centerline and I'm trying to extract and delete the intersections from the ...
4
votes
1answer
199 views

Intersecting overlapping polylines using ArcGIS for Desktop?

I have 4 multipart polyline shapefiles (download a sample dataset here). The geometries are identical, except for the length of segments in each shapefile. They represent 4 variables describing an ...
3
votes
2answers
119 views

How to map a building to only one grid which contain more than half of its area using qgis?

I have a shapefile of a city map and I have created vector grid as polygons. After intersecting the two shapefiles, a building will map to all the grids it overlaps. However, if I just want it to ...
3
votes
2answers
531 views

Find intercept WGS84 coordinates between two segments defined by (Lat1-Long1 and Lat2-Long2) and (Lat3-Long3 and Lat4-Long4)

I need to determine the WGS84 coordinates for a point that is defined by the interception of two segments represented by two sets of WGS84 coordinates each (lat1-long1, lat2-long2) and (lat3-long3, ...
3
votes
2answers
1k views

How do I find the points of intersection between a small circle and a great circle?

I only actually need to intersect a great circle arc i.e. the shortest path between two points, with a given small circle. I found this tutorial for intersecting two great circle arcs, but ...
2
votes
1answer
114 views

How to find the intersection areas of overlapping buffer zones in single shapefile?

Find the intersections of the buffer zones I found an example where they tried finding the intersection of two different shapefiles -Intersect Shapefiles using Shapely. I've tried to adapt my code to ...
1
vote
1answer
602 views

Intersect between polygonal shapefiles error

I'm encountering a problem when I try to intersect two different shapefiles. They are all new shapefiles I created to descibe the land cover and the land use of a city. The problem occurs when I ...
1
vote
0answers
349 views

Intersection between a ray from lat, lon, alt, with pan, tilt and earth's surface

I have a problem that consists of finding the intersection point between a ray from a given lat, lon, alt, that is looking to a given pan and tilt angles and the earth's surface. I need the lat, lon ...
22
votes
6answers
5k views

PostGIS: Select features that do NOT intersect

This seems to me like such a simple question (and it probably is) yet I cannot seem to find an example that gives me the answer. Using PostGIS, I just want to select points that fall outside of ...
8
votes
4answers
2k views

Best way to find the polygons crossed by a line

I'm trying to find all the polygons crossed by a single line (a GPS track). I'm using the OGR library (from python) for computing this, but it's currently a bit 'brute-force' (and slow). For every ...
13
votes
6answers
11k views

How to use ST_Intersection?

Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
7
votes
1answer
212 views

How to connect centroids of lines sharing the same intersection in QGIS?

I'm looking for a big help to accomplish the following task: I have this street network of the center of Turin (IT), composed by lines representing streets, and black points representing ...
6
votes
2answers
1k views

Split lines at intersection points

I've got some linestrings covering a road network, and need to split them at the crossroads. Does anybody have any idea on how to do it? I'm using QGIS 2.4, with a Postgis 2.1.3.
8
votes
1answer
950 views

Performance in calculating raster statistics in PostGIS

I'm trying to calculate raster statistics (min, max, mean) for each polygon in a vector layer using PostgreSQL/PostGIS. This GIS.SE answer describes how to do this, by calculating the intersection ...
8
votes
2answers
7k views

Calculate area of intersecting polygons in QGIS

I have two collections of shapefiles: 1 - postal codes, administrative and political areas 2 - various land use categories like parks & allotments, and points like trees I want to produce ...
5
votes
1answer
2k views

Extracting intersection areas in R

I have two polygons. One contains fields(X,Y,Z) and the other contains soil types (A,B,C,D). I want to know what area of every field contains which type of soil. I tried the following: ...
7
votes
3answers
8k views

How to find if two polygons Intersect in python?

I'm looking for an algorithm, high level solution, or even a library which can help me determine if two polygons intersect, in Python. I have the vertices of the two polygons (These are single part ...
5
votes
1answer
107 views

How to get smallest line segments from intersection + difference of multiple overlapping lines?

Inspired by this question, and this excellent answer. I have multiple overlapping lines and want to extract the complete intersection of them. So from this sample data SELECT id, geom INTO stackex ...
5
votes
4answers
16k views

QGis: Merge intersecting polygons into one which are part of the same feature

I'm not a GIS professional so I hope I use the correct wording, at least I hope you understand my question. Let's say there are 5 polygons in the feature A. In the shape file there are more ...
5
votes
2answers
2k views

Is there a way to get at C's OGRLayer.Intersection() or OGRLayer.Clip() in Python?

I am working with OGR in Python and noticed that the C libraries have useful Intersection() and Clip() functions as part of the Layer class. Is there any way to get at these functions in Python? I ...
4
votes
2answers
614 views

Keep nonintersecting polygons during clip

I am using ArcMap 10. I have two datasets, one of which consists of many small contiguous polygons, and one which has many small non-contiguous polygons. The first dataset is census blocks, and the ...
4
votes
1answer
1k views

Line intersection with circle on a sphere (globe or earth)

How can I find the intersection point of a line and a circle on a sphere (on earth) Please, if any one knows a good solution help. Thanks in response :)
3
votes
4answers
2k views

How can all polylines within a polygon be selected and then operated on to determine the average value from an attribute field?

I have two files illustrated wonderfully below: 1) Polyline (shown in red), 2) Polygon (shown in black). The polyline file contains a numeric attribute (elevation in meters). I would like to select ...
2
votes
2answers
411 views

Create Intersecting lines and remove dangles

I have 3 cases shown in the image..In all of them i want to intersect the lines and remove dangles using python in Qgis python console so afterwards i can make a plugin for this work in qgis.In case 1 ...
2
votes
0answers
164 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 ...
1
vote
3answers
370 views

Query to find the Intersection coordinates of multiple Polyon

I am using the below Query to find out the intersection coordinates of 2 Polygon and its working fine,but how to use or modify the query to find the intersection area coordinates for multiple(or N ...
1
vote
1answer
1k views

GetFeature Request with Polygon Intersecting Polygons

My task is very straightforward: a user draws a polygon and query all parcel polygons. The query string extends the URL limit. So I am posting XML to WFS. However, GeoServer always returned 0 feature, ...
0
votes
0answers
295 views

convert lat/lon into meters

I have a database of latitude, longitude and radius in the following form: 48180759,11518950,19.0 Both latitude and longitude are expressed in degrees but then multiplied by 1e6 (or 1000000). ...
5
votes
1answer
2k views

How do I find the intersections of 2 circles on earths surface?

I have the circles' center in lat & long, as well as the radius in meters. How do I find the circles intersections? Edit: EXAMPLE: Circle 1: Center on Earth's surface (43.564627,-116.220524) ...
4
votes
1answer
78 views

PostGIS > Intersect two circles. Each Circle must be built from Long/Lat degrees plus radius

I'm trying to figure this out, so I wanted to try asking to the experts. This question is related to PostGIS (from postgresql). What I want is: 1) Based on a longitude and latitude I want project ...
4
votes
3answers
294 views

Is the Intersection Operation Commutative?

In map overlay, is intersection of map layers a commutative operation ie layer_A intersection layer_B = layer_B intersection layer_A? If layer A is a square and layer B is a triangle. In this case, (A ...
3
votes
0answers
124 views

Calculating length of road network within a polygon [duplicate]

I have a road network stored in a gdb and some polygons in another gdb. I want to populate an attribute for each polygon with the total length (in km) of the road network that it overlaps. Any idea ...
2
votes
1answer
29 views

Preprocess OSM streets to see if query points fall “on” them

I am interested in the following query: Given a set of query points ($\leq 10$), how many of them have distance at most $s$ meters to the closest point on the closest street. What's the most ...
2
votes
2answers
435 views

How to fix overlapping polygons using ArcGIS for Desktop?

I'm using ArcMap 10.3. I have a layer of different land use types. After calculating the percentage of each land use in the catchment using tabulate intersection, I found out that the percentage of ...