1

So I have a polygon feature classes with unique identifying names to them that I want to use to rename some other feature classes that are of the point feature type and have the same geography of one of the matching polygon feature classes. Basically the points from the second feature class fit within the polygon feature class. The point feature class has no name identify to it so I would like to change that and add at least part of the name of the polygon feature class to the name based on that fact they share the same geography.

I was thinking I could use the Select by Location tool but the problem is I basically just have a bunch of unnamed point feature classes in a folder so it's not like I can select individual feature classes. So some how I need to iterate thru all point feature classes and rename them based on the polygon feature class they match up to. I'm guessing I may use Arcpy to do this. Any help or direction would be appreciated.

7
  • How many points are in each point feature class, and do the points match -exactly- to the features in exactly one polygon feature class? This is possible, but it sounds like an O(m*n) problem, so it could take a long time to run. Sep 28, 2011 at 12:28
  • Often over 10,000 points, and sometimes over 20,000. Sometimes several of the point features will expand outside of the polygon feature class and into the edges of other polygon feature classes. I'm unsure what you mean by the O(m*n) problem.
    – wilbev
    Sep 28, 2011 at 16:20
  • "O(mn)" means that if the software uses a naive algorithm, it will do a brute-force search of all the polygons (*m of them, say) for each of the n points. The total computational time becomes proportional to m*n (with potentially a large constant of proportionality if the point-in-polygon tests are equally brute-force). This scales poorly and would therefore be limited to small numbers of points and small numbers of not-very-detailed polygons. Fortunately, no good GIS software will do it this way :-).
    – whuber
    Sep 28, 2011 at 16:46
  • I am confused by this problem. How many polygon feature -classes- and how many point feature -classes- are there? It seems like what you want to do is match up each point feature class to a polygon feature class that contains most, but not necessarily all, of the points in that point feature class? Do the point feature classes have heavily overlapping extents? Sep 28, 2011 at 19:10
  • @whuber He needs to match one set of files to another set of files, not polygons to points. That is the O(m*n) I was referring to. Sep 28, 2011 at 19:12

2 Answers 2

1

Perform a spatial join of the polygons to the points. This introduces the desired polygon id field within the point attribute table. Use a field calculation to concatenate the polygon id with the point identifier.

Incidentally, good algorithms for spatially joining a layer of polygons (having p edges total) to a layer of n points require p*log(p) preprocessing effort (for building a "spatial index" or its equivalent) and n*log(p) for the actual calculation. Thus, at least after the index is built, the time for the join is directly proportional to the number of points (and the constant of proportionality scales slowly with p). Absent any bugs--which have plagued this operation in previous versions of ArcGIS--the join should be quick and will scale to huge datasets.

1
  • thanks for the answer. That sounds like a good route to go. I'll give that a try later today and try and report back how it goes. These do have lots of points (10K+) so we'll see how it goes.
    – wilbev
    Sep 28, 2011 at 16:23
1

I am thinking the first step to this might be to create a merge of all of the polygon files with an attribute on the polygons to designate which feature class the polygon originated from.

Then, for each point feature class with its thousands of points, you can do a spatial join against the merged polygon feature class, and then do table statistics from the join to find which polygon feature class was matched the most often.

Then, once you have this file name, you can use that to create a new name for the point feature class and rename it.

1
  • @blord-castillo.. Thanks for your answer. I get what you're saying and I think it will work but seems like many steps to just find the polygon can matches the point feature class. It seems overkill to have each point within the point feature class have a link to the polygon feature class. It's like I need an all inclusive feature class of all polygon feature classes and when I attempt to add a new point feature class iterates thru those to find a match and gives it name of it's match. Just wish I could do it without adding fields to a new feature class.
    – wilbev
    Sep 29, 2011 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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