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 :(

  • Are you trying to intersect two features? What ArcGIS version are you using? also, do you plan to use a standalone script or run arcpy within ArcGIS? – yanes Dec 22 '15 at 21:07
  • I'm running ArcGIS 10.2. I'm using ArcPy within ArcGIS as a standalone script. – CStarbird Dec 22 '15 at 21:11
  • Ah... sorry my bad I'll remove the answer, here is a good discussion where they talk about the use of touches, crosses or disjoints options for geometry analysis. – yanes Dec 22 '15 at 21:41

You just need to scroll down further on the page in your post:

enter image description here

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.

  • 1
    Wow, you're right. I don't want to admit how many times I looked at that page trying to figure it out. Thanks! – CStarbird Dec 22 '15 at 21:49

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

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.