I'm trying to develop a Spatial data processing GUI, one of the step uses the "Create Fishnet" tool. From the toolbox it self, there is a drop down let you select template extent, this way user won't need to manually input the X and Y coordinate for fishnet origin and Y-Axis. enter image description here

Though, from the script, it doesn't seem like there is a way to browse a reference extent. Does anyone know how to do this?

enter image description here


You can create an extent object, or simply use a feature class with the extent you desire, as shown here:

import arcpy

#feature class with desired extent
fc = r"C:\TestData.gdb\District"


CreateFishnet_management (out_feature_class,
                          template = fc, #Using feature class extent as template
  • 2
    This syntax doesn't address the question. The CreateFishnet_management arcpy syntax requires the origin coordinates and numbers of rows and columns as inputs. The GUI tool calculates these when a template feature is supplied, but supplying the optional template parameter in arcpy does not generate these values.
    – Ian Yau
    Oct 20 '17 at 20:35

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.