[Qgis-user] Spatial Join

Spencer Gardner spgardner at HNTB.com
Thu Aug 8 12:37:04 PDT 2013


Perhaps this isn't a helpful answer, but I try to keep as much analytical work as possible out of my desktop GIS of choice (sometimes QGIS, sometimes ArcMap) and into a spatial database such as PostGIS. A spatial join like you've described is pretty trivial as a SQL query and allows for easy tweaking or building off of the results.

It may not be practical for the single, simple use case that you've identified, but if you're looking to make this a learning experience I would recommend that approach.

Spencer

From: qgis-user-bounces at lists.osgeo.org [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of Jonathan Moules
Sent: Thursday, August 08, 2013 7:38 AM
To: Randal Hale
Cc: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] Spatial Join

It's not temporally critical. I have ArcGIS and can (have) done it there; this is more a learning exercise as to what QGIS can do and how to do analysis with it. Spatially joining data like this is something I seem to do quite often so I was surprised not to find a universal tool.
Cheers,
Jonathan


On 8 August 2013 13:34, Randal Hale <rjhale at northrivergeographic.com<mailto:rjhale at northrivergeographic.com>> wrote:
Let me get to a good stopping point this morning and I'll test something out. I think I might be able to say yes to the tool. I think.




-----------------

Randal Hale, GISP

North River Geographic Systems, Inc

http://www.northrivergeographic.com

423.653.3611<tel:423.653.3611> rjhale at northrivergeographic.com<mailto:rjhale at northrivergeographic.com>

<mailto:rjhale at northrivergeographic.com><mailto:rjhale at northrivergeographic.com>

twitter:rjhale

http://about.me/rjhale
On 08/08/2013 08:20 AM, Jonathan Moules wrote:
Hi Randal,
I had noticed the polygons to points converter, but wanted to do it "properly" - i.e. with a polygons in polygons comparison.

Your method will likely work but adds two extra steps (conversion to points and then from points back to polygons). Does QGIS not have a tool for this then?

Thanks!

Jonathan

On 8 August 2013 13:12, Randal Hale <rjhale at northrivergeographic.com<mailto:rjhale at northrivergeographic.com>> wrote:
Here's how I would do it: You have Two polygon layers and you need to count the number of polygons in layer 1 that are contained in the polygons in layer 2

1. Convert the polygons in 1 to points: Vector -> geometry -> polygon centroids
2. then use -> vector -> analysis tools -> points in polygon. Count the number of points contained by polygons in layer 2.

Hope that helps or at least creates an idea.
Randy


-----------------

Randal Hale, GISP

North River Geographic Systems, Inc

http://www.northrivergeographic.com

423.653.3611<tel:423.653.3611> rjhale at northrivergeographic.com<mailto:rjhale at northrivergeographic.com>

<mailto:rjhale at northrivergeographic.com><mailto:rjhale at northrivergeographic.com>

twitter:rjhale

http://about.me/rjhale
On 08/08/2013 07:36 AM, Jonathan Moules wrote:
Hi List,
   I have two layers of polygons. I want to do some analysis between them, basically doing a spatial join, counting how many of one polygon layer there are intersecting with each polygon in the other layer.
ArcGIS does this easily with the "Spatial Join" tool (ArcToolbox version). How can I do this in QGIS?

I know there is Vector -> Data Manage Tools -> Join attributes by location, but that only acts as a basic join and doesn't allow for counting of the number of joins.

Sextante has a large collection of tools, but none of them seem to have any help so I don't know what any of them do. (And none of them seem applicable anyway).

Suggestions welcome, Cheers,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

_______________________________________________

Qgis-user mailing list

Qgis-user at lists.osgeo.org<mailto:Qgis-user at lists.osgeo.org>

http://lists.osgeo.org/mailman/listinfo/qgis-user



This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.



This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.
------------------------------------------------------------------------------

This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you are NOT the intended recipient and receive this communication, please delete this message and any attachments. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130808/1b336700/attachment.html>


More information about the Qgis-user mailing list