3

I am a amateur at GIS and need some help. I have a group of shapefiles of various areas and an Excel spreadsheet of addresses I have geocoded to points. I want to determine whether each point falls within the boundary of a shapefile, and which feature within the shapefile it falls within.

For example I have:

Shapefile Zone: polygons Zone #1, Zone #2, Zone #3, etc.
Shapefile Area: polygons Area #1, Area #2, Area #3, etc.
Shapefile Address: points Address #1, Address #2, Address #3, etc.

For my results I would like it to list:

 Address           Falls within feature
Address #1     Zone #2, Area #1
Address #2     Does not fall within any feature
Address #3     Zone #3

I know how to incorporate all the polygon features into a shapefile but not how to have it identify what polygon features of the shapefile each point falls into.

I am using ArcGIS and Quantum GIS. So in summary my issue is taking coordinates and determining if they fall within certain polygon shapefiles I have. The goal in the end is to start with a list of geocoded addresses (points) and end with a determination of which (if any) polygon's each point falls in.

  • 1
    Could you edit your question to mention what software you are using or have available? You may also want to clarify a bit - typically it's points that get geocoded (this is what geocoding is, creating a point out of an address/location reference). The polygons won't have an address (although they could by geocoding your addresses and then spatially joining those to your polygons). – Chris W Jul 3 '14 at 21:10
  • 1
    I suggest you treat the geocoding of addresses, and the "are the points in a polygon" question, as two different issues. Separating the problems will both make it simpler to accomplish, and ensure you get a set of points to put on a map. – Erica Jul 3 '14 at 23:30
  • You've edited your question, but you've still two questions going. I would edit this one to remove any mention of geocoding. You could ask that as a separate question, but there are several here already on how to geocode points from an address list. You might review the help files or run through the tutorial for ArcGIS. – Chris W Jul 11 '14 at 23:22
  • I've made a few changes to your edit for clarification and voted to reopen so new answers can be posted. You don't mention which version or license level of ArcGIS you have (Basic/Standard/Advanced), which could affect solutions available to you. I'm also unclear whether your zones and areas are still in separate shapefiles or have been combined into one, which will also affect available options. For ArcGIS, the quickest solution is going to be using the Intersect tool, but I'll post a full answer when I can. If you still need help geocoding, please do ask a new question. – Chris W Jul 14 '14 at 22:16
1

For quick and simple geocoding you can use CartoDB's service. You'll need to make an account but it's free and you are allotted 250 free geocodes a month. You can export your geocoded addresses as a shapefile from there. Then in QGIS you can join data from your polygon layer to your points layer by doing a spatial join (Join Attributes by Location in QGIS) and this will add whatever fields from your polygon layer to your points layer. So for instance if you have a field for "Zone #" and a field for "Area #" you can use the spatial join tool to add these attributes to the point that falls within those. Here is a pretty good tutorial on spatial joins.

  • Added info to the request. Software is ArcGIS or Quantum GIS. – user33153 Jul 10 '14 at 20:01
  • 1
    How would Points in Polygon give an attribute to each point naming which, if any or more than one, polygon it falls within as the asker is requesting? From what I can see at the linked tutorial, the tool only generates a count of the points that fall within a given polygon as an attribute of the polygon. – Chris W Jul 11 '14 at 23:28
  • To join data from your polygon layer to your points you can do a spatial join (Join Attributes by Location in QGIS) and this will add whatever fields from your polygon layer to your points layer. So for instance if you have a field for "Zone #" and a field for "Area #" you can use the spatial join tool to add these attributes to the point that falls within those. Here is a pretty good tutorial on spatial joins. – cbunn Jul 14 '14 at 15:41
  • A spatial join can definitely get the job done. I would suggest editing your answer to include this method (or replace the Points in Polygon method) rather than just having it as a comment. – Chris W Jul 14 '14 at 22:19
0

My answer will be from the ArcGIS side, but the problem can be solved in QGIS as well with perhaps slightly different tools or methods.

Generally speaking, what you are wanting to do is an Overlay analysis. There are several tools that fall into this category, some better suited to your specific task than others. The example you show of desired output is a single field listing all areas an address falls into. It might be better to keep them as separate attributes (ie address, zone if any, area if any, etc.) but it's easy enough to combine them if you want. At the core you just want to get the polygon's name as an attribute of the point.

A note about your input data: As I mentioned in my comments, the format of your data as well as license level can impact what tools are available and how to use them. Some tools require an Advanced license to run at all, or run on more than two layers at a time. This means if you have combined zone and area into a single file, you can run it once, else you'd have to run it once for zone and then again with that output and area. There is also the question of overlapping polygons in the same layer. If zones overlap and a point falls in two of them, that requires some special consideration. And if zones and areas are in the same feature class but just different names you end up with the same problem.

The first tool that comes to mind is Identity, which requires an Advanced license. With it you can assign the name attribute of a polygon that a point falls within to that point. This creates a new feature class.

The next is Spatial Join, as cbunn mentioned. This method is pretty flexible, because there are ways to deal with a point falling in more than one polygon in a single layer. This functions like a join but using a spatial relationship rather than a common attribute. The results must be exported to a new feature class to save them.

Then there's Intersect, which is probably not a good fit because it will only give you the points that do fall in a polygon, and the rest will be dropped. It could still be used, but it takes quite a bit more iteration and joining/merging of results. It also creates a new feature class.

The last tool I'll mention is Union, which would be ideal for what you want to do except it doesn't work with points. However it can be used to solve an overlapping polygon problem - if you union all your polygons together, they will be cut up into polygons that represent unique combinations. So if zone one and two were next to each other and area one overlapped both, you would get four new polygons - just zone 1, zone one and area one, zone 2 and area one, and just zone 2.

If you need more detail you can edit your question to include some screenshots of your data or provide examples, and I can revise this answer with more specific steps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.