AnsweredAssumed Answered

Problem with Grid Index Features Results via Python Window in ArcGIS Pro

Question asked by gnewburyiv on Jul 11, 2018

I'm using the Grid Index Features tool in ArcGIS Pro 2.1.2. I had been using GridIndexFeatures successfully for years in ArcMap, and then noticed when I tried it in ArcGIS Pro I had issues, so I went back to ArcMap, but I'd like to get this resolved because the task is much faster in ArcGIS Pro (but the results aren't correct via python).


I took the U.S. States feature class from the default ArcMap installation, added it to my map in ArcGIS Pro. Then selected Rhode Island and made a layer from it. 


Opened the GridIndexFeaturesTool (the usual GUI), set my output feature class, changed the environments to have a spatial reference of 32619 (UTM Zone 19N), modified the width/height to 10km, and then rounded the origin coordinates to the nearest 10000. The following is the python command for it (as copied directly from the 'Copy Python Command', just modified the username in the path):


arcpy.cartography.GridIndexFeatures(r"C:\Users\MyUserName\Documents\ArcGIS\Projects\GridCreation\GridCreation.gdb\RIGrid_Test2ViaToolWindow32619env", "RhodeIsland", "INTERSECTFEATURE", "NO_USEPAGEUNIT", None, "10 Kilometers", "10 Kilometers", "-4660000 2090000", 642, 538, 1, "NO_LABELFROMORIGIN")



Next in the python window, set the sr and then change the output to a new name...

arcpy.env.outputCoordinateSystem = arcpy.SpatialReference(32619)
arcpy.cartography.GridIndexFeatures(r"C:\Users\MyUserName\Documents\ArcGIS\Projects\GridCreation\GridCreation.gdb\RIGrid_Test3ViaPythonPrompt32619env", "RhodeIsland", "INTERSECTFEATURE", "NO_USEPAGEUNIT", None, "10 Kilometers", "10 Kilometers", "-4660000 2090000", 642, 538, 1, "NO_LABELFROMORIGIN")

and the result is that the grids don't line up. See attached. The blackboxes are via the tool window (and are correct), the blue boxes are off by 3+km to th e NW. Grid origin is the same. 


What am I doing wrong? Seems like a bug. I would think that running the tool from the GUI and running the tool from the python window should yield the same results.