0

I have a feature class of areas that are discontinuous. I want to be able to select each site and then create a fishnet grid (2x2) for each site I specify.

I am able to do this except one major step: The Spatial extent is still set to the entire dataset.

I am trying to stick to using ModelBuilder so I can automate it easier or give to a colleague.

Below is the ModelBuilder diagram. Even though I add the "Recalculate Feature Class Extent" tool, it returns the same extent origin.

enter image description here

1
  • Interestingly enough, it does recognize the x-origin when I use the model above. If I export to feature class with just my area of interest and THEN use it with the model it works. The x-origin updates. However, when I replace up to Copy Features with Feature Class to Feature Class, it doesn't recognize the x-origin. It leaves those values blank – Smithw1 Aug 26 '19 at 18:53
0

When creating the fishnet set the Environment variables for that tool such that they match the input feature class (rather than the entire dataset). You'd want to use the Output Extent setting, with the "same as layer input_feature_class" option.

1
  • I understand what you mean and tried it, but the problem still persists. Even though I am defining the layer earlier in the model, it wouldn't come up as an option in the "Same as Layer" part of the Extent dialogue box because it didn't exist it. Usually Model Builder is pretty good at predicting the layers that were created earlier in the model. This puts me back at square one. I tried to change Copy Features back to Feature Class to Feature class and still nothing. I made sure to set the Precondition, as well. – Smithw1 Aug 29 '19 at 13:28
0

I found a solution to my own question. Using what @ycartwhelen posted, I added the Iterate Feature Selection iterator. From there, I added the Buffer Tool to create a little bit of excess around the site to account for any extra data. The buffer has its own extent. That buffer is fed through the Create Fishnet Tool as the Template Extent and Environment Extent. This created a grid for each site.

I was able to take out the "Make Feature Layer" and "Copy Features" tools from the diagram above. It works like a charm!

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.