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
31
votes
4answers
18k 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 ...
13
votes
2answers
9k 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 |...
6
votes
2answers
3k views

Calculating proportional area of polygon within another layer's polygon using QGIS?

I have two polygon layers, model and ntem, whose features overlap and intersect one another. I would like to calculate the proportion of the area of the model polygons which fit within each ntem ...
7
votes
2answers
12k 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 ...
23
votes
3answers
34k 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 ...
9
votes
2answers
4k 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 ...
1
vote
1answer
3k 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 ...
3
votes
2answers
2k 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 ...
4
votes
2answers
592 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:...
7
votes
2answers
11k 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 ...
4
votes
1answer
6k 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 ...
4
votes
1answer
4k 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 ...
1
vote
2answers
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,...
3
votes
3answers
529 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 ...
2
votes
1answer
194 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 ...
1
vote
2answers
583 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 ...
14
votes
3answers
7k 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 ...
8
votes
4answers
19k 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 ...
6
votes
3answers
2k 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/...
5
votes
1answer
2k 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 ...
3
votes
2answers
3k 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 ...
1
vote
2answers
1k 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 ...
5
votes
2answers
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 ...
4
votes
2answers
851 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 ...
4
votes
2answers
2k 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" ...
3
votes
4answers
319 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 ...
3
votes
3answers
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 ...
2
votes
0answers
178 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 ...
2
votes
2answers
134 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 ...
1
vote
1answer
512 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" ...
1
vote
2answers
194 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" ...
1
vote
1answer
264 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 ...
0
votes
1answer
266 views

Connect points from two SpatialPointsDataFrames in R, considering the closest distance

I have two SpatialPointsDataFrames. In SpatialPointsDataFrame one (dat1) I have three points (A, B and C). In SpatialPointsDataFrame two (dat2), I have eight points with temperature measurements. I ...
12
votes
3answers
2k 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 ...
5
votes
3answers
4k 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 ...
10
votes
2answers
13k 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 ...
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 ...
6
votes
1answer
9k 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 ...
5
votes
2answers
490 views

QGIS calculates main soil type of polygons from another polygon layer

I've been working with qgis for a while but somehow I never fiured this out, so I thought it's time to ask. I have 2 shapefiles. a polygon layer from nearby fields (SHAPE1 (the red outlines)) a ...
5
votes
1answer
1k views

Creating network from GPS tracks? [closed]

I'm trying to build a network from several GPS-trakcs, to digitize hiking routes on my land. I have several GPX-files from routes I've tracked with the gps. I managed to display them in Arcmap 10.2 ...
3
votes
1answer
6k 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 ...
3
votes
2answers
1k views

How to join attributes by location for more than one located feature in QGIS?

In the standard join attributes by locationfeature in QGIS 2.0/2.18, there are two options: Take attributes first located feature Take summary of intersecting features Is there a function in QGIS ...
2
votes
2answers
4k views

Spatial join using FME

I have two data sets, one is a polygon data set (Norwegian counties) and the other is points (roadkill incidence data). I want to do a spatial join where the points dataset inherits attributes (name/...
2
votes
2answers
609 views

QGIS equivalent for ArcMap join for purpose of distances from points to polygon?

It is relatively easy to calculate distances from points to a polygon in ArcMap by doing a join and selecting the option for creating a field containing the minimum distance information. i.e. it ...
2
votes
1answer
250 views

Split multiple attributes from a big polygon to smaller ones

I am looking for a sort of spatial (un)join function. Let's say I have 2 tables, both with a large number of polygons. The first one has a pop/polygon column in his attribute table. The 2nd one has ...
1
vote
1answer
357 views

duplicate polygons once for each point inside

I have a set of feature classes: points representing addresses, and polygons representing buildings. Sometimes there are more than one addresses per building. I use Maplex to generate and place ...
8
votes
1answer
1k 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 ...
5
votes
1answer
2k views

Join attributes by location

I am trying to join multiple records that occupy the same location (polygon centroid) and have tried using the join by location plug-in but have found this does not work for me in this case as I have ...
4
votes
4answers
608 views

Populating polygon with most frequent point attribute using QGIS?

What I have is two features, a polygon showing wards, and a point shapefile showing properties which has an attribute detailing the type of consumer within the household, such as country living, urban ...
4
votes
0answers
939 views

How to perform spatial join and obtain attribute in python/GDAL?

I am working on a script that will take an unprojected raster, and using a UTM grid (shapefile), will obtain the correct SRS (I have a shapefile where each zone is attributed with its numerical SRS) ...