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

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Aug 26, 2019 at 18:28
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 Commented Aug 26, 2019 at 18:53

2 Answers 2

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.

answered Aug 27, 2019 at 13:52
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. Commented Aug 29, 2019 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!

answered Aug 29, 2019 at 14:13

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.