[Qgis-user] Issue with joining attributes by location

Berg, Neil nberg at ioes.ucla.edu
Thu Feb 1 08:38:35 PST 2018


Hi Stefan,

Unfortunately, setting the layers to the same projection does not resolve the issue. Only one of the 12 subregions is still joined to each point.

Neil



On Feb 1, 2018, at 8:09 AM, Stefan Giese <Stefan.Giese at wheregroup.com<mailto:Stefan.Giese at wheregroup.com>> wrote:


Hi Neil,

the problem you encountered belongs to the different projection of your 2 layers. If you want to perform an intersect you should reproject your point layer to the same system like your zone-Layer. Just right-click on the point layer and select "save as". in the following dialog set the projection to the same as your california layer and load the data. then the intersection should work..

Good luck

stefan

Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant
****************************************************************************
FOSS Academy Kompaktkurs Winterschule 2018
Grundwissen zum Aufbau von Geodateninfrastrukturen mit Open-Source-Software
https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
****************************************************************************
WhereGroup GmbH & Co. KG
Schwimmbadstr. 2
79100 Freiburg
Germany

Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

stefan.giese at wheregroup.com<mailto:stefan.giese at wheregroup.com>
www.wheregroup.com<http://www.wheregroup.com/>
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------

Am 01.02.2018 um 16:23 schrieb Berg, Neil:
Hi Stefan,

Thanks for clarifying - I’ve uploaded the .shp, .shx, and .dbf files to the drive below. Hopefully this helps!

Best,
Neil



On Jan 31, 2018, at 11:24 PM, Stefan Giese <Stefan.Giese at wheregroup.com<mailto:Stefan.Giese at wheregroup.com>> wrote:


Hi Neil,

just a note to  your link: if you provide shapefiles, you'll have to put at least 3 files: CC4a_RegionsSub.shp, CC4a_RegionsSub.dbf and CC4a_RegionsSub.shx. (shp contains the geometry, dbf the attributes and shx is the index between shp and dbf)..

best regards

stefan

Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant
****************************************************************************
FOSS Academy Kompaktkurs Winterschule 2018
Grundwissen zum Aufbau von Geodateninfrastrukturen mit Open-Source-Software
https://www.foss-academy.com/schulungstermine/kompaktkurs-winterschule
****************************************************************************
WhereGroup GmbH & Co. KG
Schwimmbadstr. 2
79100 Freiburg
Germany

Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11

stefan.giese at wheregroup.com<mailto:stefan.giese at wheregroup.com>
www.wheregroup.com<http://www.wheregroup.com/>
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------

Am 01.02.2018 um 05:42 schrieb Berg, Neil:
Hi all,

I’m working with (1) a CSV file containing columns of “lat” and “lon” which represent grid cell centroids from a gridded model product over California (“loca_lat_lon.csv”), and (2) a shape file that carves up California into 12 distinct subregions (“CC4a_RegionsSub.shp”).

These files can be accessed here:

https://drive.google.com/drive/folders/1IUrpVSJYBRIoCS4vzGYK9sBEzdwZec-c?usp=sharing

I am trying to determine which grid cells reside in each of the 12 subregions (or NA/NULL if outside all subregions) using Vector -> Data Management Tools -> Join Attributes by Location. I have specified my Target vector layer as loca_lat_lon.csv, the Join vector layer as CC4a_RegionsSub.shp, the Geometric predicate as “intersects”, and am taking attributes of the first located feature, and only keeping matching records.

The issue is that the returned joined layer assigns just 1 of the 12 subregions, “Sierra Nevada Mountains”, to all grid cells, rather than different subregions (or None) to the cells.

The shape file has a CRS of NAD83/California Albers and the coordinates in the CSV file are simply WGS 84. I’ve tried resetting the latter CRS to NAD83/California Albers, but the same issue persists.

I’m using QGIS 2.18.14.

Any help is greatly appreciated. Thanks in advance!

Neil




_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180201/fd41eafa/attachment.html>


More information about the Qgis-user mailing list