Questions tagged [spatial-join]

To join the attributes from one spatial data layer to another using their common location

Filter by
Sorted by
Tagged with
35
votes
4answers
23k views

More Efficient Spatial join in Python without QGIS, ArcGIS, PostGIS, etc

I'm attempting to do a spatial join much like the example here: Is there a python option to "join attributes by location"?. However, that approach seems really inefficient / slow. Even ...
28
votes
3answers
46k views

Join spatial point data to polygons in R

I am trying to perform a spatial join between point data and polygon data. I have data that indicate the spatial coordinates of an event in my csv file A and have another file, shapefile B, that ...
27
votes
2answers
18k views

Understanding Join Attributes by Location in QGIS?

I wonder if there is somewhere an explanation for the parameters that can be set when running the Algorithm "Join Attributes by Location" in QGIS 2.18. I had a look here: Documentation QGIS Testing |...
20
votes
3answers
12k views

geopandas spatial join extremely slow

I am using the code below to find a country (and sometimes state) for millions of GPS points. The code currently takes about one second per point, which is incredibly slow. The shapefile is 6 MB. I ...
13
votes
2answers
448 views

How does QGIS determine the first located feature option when using QGIS Join by location?

I have used QGIS process 'Join Attributes by Location' in one of the models I have built and I have now been asked to explain in detail exactly how the model is determining the results. I am using it ...
12
votes
2answers
18k views

One-to-many joins on a feature class to a table

I am using ArcMap 10.2.2 with an Advanced license. I have used ArcMap for other basic analyses, but am fairly new to the program and have only basic coding skills, with no SQL experience outside of ...
12
votes
3answers
4k views

Getting points-touching-a-line attributes back to lines layer using QGIS?

I'm using QGIS 2.14.4-Essen. I have two layers: points.shp that contains points with a YEAR column lines.shp that contains lines that exactly connect the points from points.shp I would like to get ...
12
votes
1answer
9k views

GeoPandas spatial join and count

I have following two GeoDataFrames. One with the crime count per polygon per year. Polygon Year total_crime shape_area geometry 0 0 2009 1 3.266388e+06 ...
12
votes
3answers
18k views

Getting point attribute from polygon layer using QGIS

In QGIS I have two layers: (A) has point features and (B) has polygons. How do I produce a new table with some (the "ID") or all the fields from the 'A' table and some (the area code) or all ...
11
votes
3answers
5k views

geopandas error "minimums more than maximums"

I posted this question on stackoverflow here, but it seems that gis.stackexchange is the more appropriate platform. I am trying to merge two geodataframes in geopandas (want to see which polygon each ...
11
votes
2answers
22k views

Join / merge lines that touch and intersect in QGIS

I have a large dataset consisting of lines/polylines where I would like to join/merge the lines that touch / intersect. Each line has an individual ID and there are no common attributes I can use for ...
11
votes
2answers
857 views

How to perform repetitive tasks in QGIS?

I am trying to do a treatment on many feature files, so I would like to automate it. In fact, I have one shapefile with the spatial distribution of some species, and one with vegetation type. I ...
10
votes
4answers
29k views

Join CSV file to shapefile

I wanted to join a CSV file to a shapefile. When I identified a field to facilitate the join, e.g., map <- spChFIDs(map, as.character(map$ID)) it returned Error in spChFIDs(SP, x) : lengths ...
10
votes
2answers
380 views

One-to-many spatial join with results in one row in QGIS

I have two feature Datasets. Both are Polygons. Dataset A has very big Areas and Dataset B just small ones. Now, B still overlaps in 2 or 3 Zones from Dataset A. I want to perform a spatial join and ...
9
votes
2answers
5k views

Is there a python option to "join attributes by location"?

I am trying to perform the function join attributes by location as found on the QGIS menu Vector>Data Management Tools. I am seeking an open source python option for this. I know arcpy has a spatial ...
9
votes
1answer
3k views

How to test the geometry type from a list of layers and then join it with PyQGIS 3

Summarizing my problem, I'm a beginner and I'm developing a plugin that will be able to do several spatial joins. For this, it will have to separate the spatial from the non-spatial layers and do the ...
9
votes
1answer
318 views

Select by Location and Join the Attributes of Two Line layers

I want to import the name of streets from OSM shapefile layer to another line layer based on neighborhood distance. The distances between two layers (line layers) are variable between 0 to 10 meter. ...
8
votes
3answers
8k views

Spatial join versus classical join [closed]

What are the main differences between a spatial join and a classical database join such as an equi (inner) join?
8
votes
2answers
13k views

Spatially joining polygon fields onto point layer in QGIS

I have gridded depth points in CSV format that I'm trying to add other map data to, in additional columns. I've tried joining fields, hoping that I could link the shapefile data to the CSV, but when I ...
8
votes
3answers
2k views

How to do a spatial join in PostGIS that returns on the minimum value of point intersecting polygon?

I have a polygon table (buffer) and a point table (dem_points), and I want to do a spatial join on them. I need to join the point with the minimum elevation (dn) to its spatially corresponding ...
8
votes
1answer
2k views

Join by attribute / spatialite with SQL / left outer join in QGIS

I have a layer with polygons (let's call it "woods") that is intersected by "n" line-objects ("roads"). Every road has an unique attribute roadid. I need to add ALL the roadid's (not only the first ...
7
votes
4answers
604 views

Count number of points by name within distinct polygons [closed]

In PostgreSQL/PostGIS I have 2 tables: A POLYGON table (polytable1) with shapes named 'Poly 1', 'Poly 2' etc... Each name can appear multiple times (i.e. 20 polygons with the name 'Poly 1') A POINT ...
7
votes
3answers
5k views

Error while using sjoin in GeoPandas

I have a problem with GeoPandas sjoin, I work with Ubuntu and I want to use: opolskieadresy = geopandas.sjoin(smallopolskie, adresy, how="inner", op='intersects') and i'm getting error: ...
7
votes
3answers
3k views

Efficient spatial joining for large dataset in R

I am working with rather large data frames that I often need to do a spatial join on. The fastest way I have come up with so far is this method: library(rgdal) download.file("http://gis.ices.dk/...
7
votes
1answer
3k views

How can you join attributes from polygons to points which are within the polygon feature using PostgreSQL and PostGIS? [duplicate]

Possible Duplicate: How to perform a spatial join of point and polygon layers in PostGIS? I don't know how to solve my actual problem. I have polygons and points (some points are located in the ...
7
votes
1answer
4k views

Where are the attribute summaries in Join Attributes by Location in QGIS 3.2.0?

I have recently switched from QGIS 2.18.21 to QGIS 3.0, and as of today, to the shiny new QGIS 3.2.0. I need to do some spatial joining so I was quite surprised to find out that in QGIS3, it seems, ...
7
votes
1answer
3k views

Split polylines at polygon boundaries in QGIS

I have a set of contour lines and a polygon set containing glaciers. Because I want the glaciers to have blue contours, I need to split the contour lines at the glacier boundaries. I can achieve this ...
7
votes
2answers
798 views

Spatial Join Yielding NULL values in ArcPy?

I'm writing an automated script to do some data processing of address points. One stage of the process is to retrieve 19 fields of information from various polygon layers that the Address Points are ...
7
votes
1answer
143 views

Performant possible pairs in concave polygon

My objective is to create all possible pairs of connecting vertices in a concave polygon, i.e. only keeping those lines which are covered entirely by the polygon itself. I have come up with the ...
7
votes
1answer
1k views

QGIS 'Join attributes by location' algorithm (sometimes?) not working properly in graphical modeler

In QGIS 2.14.10 I've set up a simple model to assign min and max of attributes of a point layer (adresses, about 2500 features) to a polygon layer (parcels, about 14000 features) to polygons ...
7
votes
0answers
297 views

Buffered one-to-many spatial join QGIS3 [closed]

I'm trying to spatial join bus stops and census block groups. However, these are a bit tricky with walking distance. Many bus stops are right on the borders of census block groups or within walking ...
6
votes
3answers
167 views

Aggregating result of many to many join of points closest to line in QGIS

I have a layer of points and a second layer of lines. The goal is to know for each line, how many and which points (by "ID") are closest to that line, to then export this information for ...
6
votes
3answers
362 views

Invert the ST_DWithin() function

Is it possible to perform a query like this: SELECT * FROM foo JOIN bar ON ST_Dwithin(foo.geom, bar.geom, > 10); -- the > 10 means that I want to select everything that is ...
6
votes
1answer
15k views

How to ignore invalid geometries in performing spatial join in QGIS 3.0? [duplicate]

I am attempting to perform a very simple join attributes by location between two shapefiles in the same projection. When I run it, I get an error message indicating that the algorithm could not be run ...
6
votes
1answer
11k views

Creating spatial join between points and polygons in GeoPandas?

I want to create a simple spatial join between points and polygons using GeoPandas but I think GeoPandas has bug? GeoPandas code: from geopandas import gpd import geopandas points = geopandas....
6
votes
4answers
7k views

arcpy field mapping for a spatial join: keep only specific columns

I want to perform a spatial join to find the join point (a node in the code below) that is closest to a target point (a consumer in the code below). In the result, I only need certain attributes from ...
6
votes
1answer
5k views

Difference between 'join' and 'merge'?

Suppose one wants to make polygons A and B, and their respective attributes to be one unique polygon C. What is this GIS operation called? Is there any difference in GIS terminology about "...
6
votes
2answers
188 views

How to group polygons based on spatial proximity and field value?

I have a shapefile consisting of the day of the year on which the temperature in a lake exceeds 15 degrees Celsius. I can see clear patterns in this (here seen as a raster): I want to group the ...
6
votes
3answers
6k views

Selecting nearest lines to point layer in QGIS?

I am a beginner with GIS software and I'm working on QGIS. I have a problem joining the spatial layers. I have a layer with objects in one city and another layer with the streets. I need to attach ...
6
votes
2answers
878 views

Join multiple spatial tables by distance

I'm trying to join two tables, one which contains road names and the other just a point. After exhausting research I'm now stuck. The idea is to join up the two tables using only distance, ie, select ...
6
votes
1answer
2k views

Can Spatial Joins be used to perform One-to-Many Closest joins?

My situation appears rather simple, but it has given me headaches more than once already. I have a set of points and a set of polylines. I would like to use a spatial join to join the attributes of ...
6
votes
3answers
706 views

Concatenate string field in spatial join in QGIS

I'm doing a spatial join between a point layer and a polygon layer. The point layer has a field called "type" which has string values. When I join this to the polygon layer, I would like to get a ...
6
votes
1answer
7k views

Raster Version of Spatial Join (one to many) [duplicate]

I have two raster layers that are identical in shape (they overlap exactly) and I need to perform the raster equivalent of a Spatial Join (one to many). My files need to stay in raster format ...
6
votes
0answers
72 views

Does QGIS use data source-specific operations?

This may be a very basic question, but I couldn't find an appropriate answer. Does QGIS use data source specific operations where available and appropriate? For example, when using the Join attributes ...
6
votes
0answers
1k views

Join attributes by location very slow on QGIS 3.0 [closed]

"Join attributes by location" is very slow on QGIS 3.0. I have tried it with a CSV file and also with a shapefile (point layer) and a grid (made of polygons). On QGIS3.0 it takes about 3 hours to ...
5
votes
2answers
805 views

Getting concatenated attribute values from Spatial Join

How can I query polygon features that intersect other polygon features in QGIS? I have ZIP code areas and city areas, and I would like to list all the ZIP codes that intersect the city areas. Example:...
5
votes
1answer
2k views

Setting list of fields to field mapping of spatial join using ArcPy?

I try to code spatial join tool and delete some fields in the result. to delete the fields i list the fields of source layer and the result layer then use the list of differences in the two list and ...
5
votes
3answers
2k views

Spatial join with HUGE datasets

How to make a spatial join with ArcGIS with these HUGE datasets? Target: almost 3 million squares 500x500m size (the attribute table is basically empty) Join feature: 12000 polylines Operation: one ...
5
votes
1answer
847 views

Get points within maximum distance from any point in GeoPandas

Given a set of points (with meters coordinates), I am trying to create lines between them. But I don't want to create lines of each pair of points, Iwant to create thoses lines if the distance between ...
5
votes
2answers
661 views

Spatial join based on polygon centroid in QGIS

I have 2 cleaned shapefiles, one containing building footprints and one land parcel shapes, both have attributes. I want to do a spatial join when data from the land parcel is merged into the ...

1
2 3 4 5
17