I'm building a script that utilizes the intersect method of the geometry class so that I can run an intersect analysis on individual polygons within a feature class. As stated here, "intersect (other, dimension)" requires two parameters, but there is no explanation as to what kind of string they are expecting for "dimension". What should I pass to the method for that parameter? I can't find any documentation to tell me :(
You just need to scroll down further on the page in your post:
So, for example:
intersect = line_geom_object.intersect(other_line_geom_object, 1)
This will return a point geometry object wherever the two line features intersect.
Okay I found the solution by looking up the corresponding method in ArcObjects. This page defines which number codes should be used to define the Dimension of the features being analyzed. The method requires an integer in the second parameter. Here they are...
- 1 = Points
- 2 = Lines
- 4 = Polygons
- 5 = Surface Mesh
- 6 = 3D geometry
- -1 = Unspecified geometry