Skip to main content

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
4 answers
27k 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 ...
jburrfischer's user avatar
32 votes
3 answers
33k 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 |...
four-eyes's user avatar
  • 3,398
41 votes
6 answers
30k views

Joining attributes from nearest point in QGIS

I have two layers with points, A and B, each with different attributes. For each point in A, I want to join all the attributes from the nearest point in B. Ideally, this would also include a field ...
Fred's user avatar
  • 692
8 votes
2 answers
14k 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 ...
dez93_2000's user avatar
  • 1,079
12 votes
4 answers
997 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, 'Dataset B' still overlaps in 2 or 3 Zones from 'Dataset A'. I want to perform a ...
Skane's user avatar
  • 305
28 votes
3 answers
54k 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 ...
ben_aaron's user avatar
  • 383
14 votes
2 answers
37k 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 ...
Ilias's user avatar
  • 143
9 votes
2 answers
6k 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 ...
mishaF's user avatar
  • 193
2 votes
3 answers
1k views

Finding points outside state boundary that are supposed to be within specific State using ArcPy with ArcMap

I have a nationwide featureclass called bakeries. In the bakeries FC, there is a field called "State" and the field is populated with state abbreviations(AL,NJ,CT,etc). I have another feature class ...
RustyShackleford's user avatar
1 vote
1 answer
4k views

Fastest way to join many points to many polygons in python

I need to attribute a geographical area (based on shapefile polygons) to 8 million GPS points. There are 405 polygons. I currently have the code below, and a quick extrapolation tells me it will take ...
Alexis Eggermont's user avatar
12 votes
3 answers
22k 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 ...
Andrea Ballarati's user avatar
3 votes
2 answers
3k views

How to do a one-to-many Spatial Join/Query in QGIS

Does anyone know if it's possible to do a 'one to many' spatial join based on distance in QGIS? The "Join Attributes By Location" under ->Vector->Data Management Tools is very limited... Just to be ...
Chris10's user avatar
  • 31
2 votes
1 answer
1k views

Joining many points with lines in QGIS

I'm working with QGIS 3.4.3 and have a list of addresses (1500ish) that I need to map into lines. I have a CSV file having a start and end of each street and also have the same list separated in two ...
Juker92's user avatar
  • 23
0 votes
1 answer
2k views

"Spatial join" between raster and shapefille- give raster the shapefile values with python

I have raster which has NDVI values .In addition, I have shapefile(geopandas) on top of this raster but it doesn't fully covers the raster (illustration): the shapefile has column which contain data ...
ReutKeller's user avatar
  • 2,169
7 votes
1 answer
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 ...
Agnar Renolen's user avatar
6 votes
2 answers
1k 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 ...
abigfatcat's user avatar
5 votes
1 answer
5k views

Using many-to-many join in ArcMap

I'm working in ArcMap 10 and can move around in R, though am not an expert. I have a shp file and an xlsx file. The shp file is 20,221 rows and includes a field GID (grid ID) which is not unique ...
ecologist1234's user avatar
5 votes
2 answers
1k 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:...
Rusty Dickson's user avatar
4 votes
1 answer
9k views

Spatial Join Points and Polygons in ArcGIS Desktop?

I am trying to create a grid road map with an index table for street look up. I am using this tutorial by ESRI: http://blogs.esri.com/esri/arcgis/2007/11/08/creating-street-name-indexes/ I am at the ...
rspencer38's user avatar
3 votes
1 answer
3k views

How to obtain mean, maximum, and mininum of all points located within polygons using spatial joint in python?

I am trying to estimate summary statistics of points located inside a polygon. Each points in the point layer is associated with N attributes. My target is to summarize (say mean, min,..) the ...
PPR's user avatar
  • 511
3 votes
3 answers
636 views

Spatial join without operation on the variable of interest

I have a simple problem: I've got to spatially join records of an epidemic in forests to some plot coordinates I have gathered. Problem is, I cannot obtain the records for each year on each plot, I ...
Chris. Z's user avatar
2 votes
1 answer
474 views

Joining 2 layers by location doesn't join desired fields from attributes tables

I have 2 layers that I'm trying to join by location: 1 is a point layer (CRS 4326) and the other is a shapefile layer (CRS 4326). The shapefile layer has a field in the attribute table whose values I ...
gulfy's user avatar
  • 63
1 vote
2 answers
3k views

How to Join Attributes by Location in QGIS 1.8.0

I have a points layer with site attributes and a polygon layer with region attributes. I'd like to join the names of the regions to the point site locations using QGIS 1.8.0., on Windows XP. However,...
user12711's user avatar
  • 1,620
1 vote
2 answers
794 views

Spatial Join - One Join Feature to Multiple Target Features

I want to join a set of target features (polygons) to a set of join features (points). The polygons can, and do, overlap. I want the join features to be counted (joined) to as many target features ...
Matthew Friedman's user avatar
21 votes
4 answers
16k 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 ...
Alexis Eggermont's user avatar
12 votes
3 answers
5k 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 ...
wiltomap's user avatar
  • 2,710
12 votes
2 answers
23k 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 ...
MooseGirl's user avatar
  • 243
11 votes
4 answers
34k 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 ...
user3915459's user avatar
9 votes
1 answer
3k 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 ...
Papierwolf's user avatar
8 votes
3 answers
4k 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/...
Jeppe Olsen's user avatar
7 votes
1 answer
214 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 ...
Timothy Dalton's user avatar
7 votes
1 answer
3k views

PostGIS nearest point with LATERAL JOIN in PostgreSQL 9.3+

I need to obtain on each element on one table the closest point of another table. The first table contains traffic signs and the second one the Entrance Halls of the town. The thing is that I can't ...
Egidi's user avatar
  • 3,738
6 votes
2 answers
6k views

Combining st_join with st_nn to include all points within, as well as within a given distance of a polygon

This is a follow up to my earlier question (Spatial join in R - Adding points to polygons with multiple corresponding points). I have successfully joined a spatial points file to a polygon file in R ...
Adam G's user avatar
  • 331
6 votes
2 answers
1k 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 ...
Thomas's user avatar
  • 925
5 votes
2 answers
5k views

Scripting spatial join in ArcPy to set field attribute in field mapping object?

I'm scripting a spatial join in ArcGIS with Python. I only want the resultant feature class to have a single field containing one attribute from the join features. In general, many join features ...
captain picard's user avatar
4 votes
2 answers
3k views

Joining attributes from points to lines QGIS

I am working with two shapefile layers: lines and points. These shapefiles do not overlap and have different attribute values. The point layer contains data that I want to join to the beginning and ...
Anelsio's user avatar
  • 43
4 votes
2 answers
3k views

Sum of attributes in Spatial join when polygons cross boundaries in ArcMap?

I use ArcMap, where I have two layers: Buildings as polygons. Each polygon has a number of people living in it as an attribute. Polygons dividing the city into "districts". I drew these "districts" ...
Yule's user avatar
  • 155
4 votes
1 answer
427 views

Table join or virtual layer to match multiple points to geometry

I have: a non-spatial table of multiple test results with reference to non-unique locations, and a spatial layer that has all the locations (multiple results per location) I can do table joins ...
benny the spaceman's user avatar
3 votes
3 answers
1k views

Performing join on simultaneous spatial and attribute criteria in ArcGIS for Desktop?

I have two point layers and want to perform a spatial join on nearest distance. Normally it is easy with ArcMap. But now I have a restricting condition on the spatial join. The restriction only ...
hoge6b01's user avatar
  • 1,118
3 votes
4 answers
938 views

Seeking PostGIS equivalent to GeoPandas union overlay?

What is the PostGIS / PostgreSQL equivalent of the GeoPandas Overlay Union operation? res_union = geopandas.overlay(df1, df2, how='union') Say I have two tables, 1 green, 1 red with each with two ...
RutgerH's user avatar
  • 3,325
3 votes
2 answers
4k views

Populate cross street name at intersections

Just a follow up of an older post seen here: Python script/Model to populate cross street names at intersections I need to create a shapefile of Road segments with a "To_Road/s" and "From_Road/s" as ...
Dean van den Heever's user avatar
3 votes
1 answer
2k views

PostgreSQL PostGIS: Spatial join but keep all features that don't intersect

Spatial joining a point table to a polygon table, creating a new output table. So far I can only get the output table to contain features that satisfy the spatial join. However, I want the output to ...
Theo F's user avatar
  • 1,839
3 votes
2 answers
252 views

Merging attributes from point with containing polygon?

I need to develop a process for merging the attributes of each point in a SDE feature class with a polygon in a SDE feature class that contains the point to create a third feature class. The third ...
DenaliHardtail's user avatar
2 votes
2 answers
3k views

Join Point to the Nearest Polygon

I'm using QGis 2.18.3 on Windows 10. I'm trying to join a point layer with a polygon layer. However, since it is a city grid map, points that do not fall within the polygons do not get joined. My ...
Artur Lascala's user avatar
2 votes
2 answers
638 views

Combining data from overlapping polygons and assign [duplicate]

I have two multipolygons layers: Layer A: Census blocks with data from 2010 (last census). Layer B: A study about poor neighborhoods with data from 2016 (POOR NH). Both layers have a "population" ...
facu pedemonte's user avatar
2 votes
0 answers
267 views

QGIS 'join attributes by location' algorithm produces strange results for min, max

In QGIS 2.14.11 LTR I have a point shapefile with (besides others) an attribute kd which is either 1 or 0 (never NULL) and a polygon dataset. I try to calculate minimum and maximum values for kd for ...
Jochen Schwarze's user avatar
1 vote
1 answer
17k views

Creating buffers around points and merging with SpatialPolygonsDataFrame to create a list of matched polygons and area of intersection?

I have data on polling booths as points and data on village boundaries as polygons. I want to create buffers of 1km around the polling booths and (a) save the ID of all the villages that intersect ...
Tini Tan Goya's user avatar
1 vote
1 answer
704 views

Using Spatial Join to copy a single attribute

I am attempting to use Spatial Join to combine tax parcels and zoning information, such that the parcels contain the designation of the underlying zone. However, I only want to take the "esmZONE" ...
Patrick Danner's user avatar
1 vote
1 answer
121 views

Creating relations many to one in QGIS [closed]

I have a vector layer with polygons A, and the second with polygons B. Polygons A includes/are intersected by several polygons B. I want to join the data (just names of polygons) from polygons B to ...
grzes00223's user avatar
1 vote
1 answer
375 views

Qgis Spatial Join: numeric values change to negative values

I run the function "Join attributes by location" in Qgis 2.2 between a point vector layer and a polygon vector layer. When I open the resulting table of contents of point layer there is a column of ...
Carlo's user avatar
  • 11