Set Fishnet Template Extent to Enviro Set Extent "Same As Display"

894
4
02-14-2013 06:25 AM
JenniferMinnick
Occasional Contributor
Hi -

I am attempting to use Modelbuilder and eventually Python to streamline some processes we use constantly. 

One of those processes uses the Fishnet Tool to create well, a fishnet of regularly space point for an analysis we do.

The three main things we always tweak are: Cell Size (x/y), Template Extent, and output.  I have set these as parameters and while I have issues with all three my main question is concerning the Template Extent as that is the most annoying set of values to set.

The Fishnet tool has an extent and if you select it as a parameter you get a drop down of all the feature classes/layers (?) only within the working mxd (or I suppose  you could load one). 

What I'd like to do is have the ability to set the Template Extent values (Top Bottom Left Right) to the values obtained from the Environment Settings >  Processing Extent using the "Same As Display" option.

But how???

Thanks in advance.  I have some trial models but they are confused disasters.
0 Kudos
4 Replies
curtvprice
MVP Esteemed Contributor
The Fishnet tool has an extent and if you select it as a parameter you get a drop down of all the [feature and raster layers] only within the working mxd. What I'd like to do is have the ability to set the Template Extent values (Top Bottom Left Right) to the values obtained from the Environment Settings >  Processing Extent using the "Same As Display" option.


This has to do with how the validation was set up for this tool.

I discovered that if you right click / create variable of type Extent you can connect it to the Create Fishnet tool. You could then mark that value as a parameter and I think you will have what you want, the dialog will allow you to pick Same As Display.
0 Kudos
JenniferMinnick
Occasional Contributor
Hi Curtis -

I have tried that.   When I do what you have suggested, I can see the options in my tool, select "Same as Display" but the values of Top Bottom Left Right don't get sent to their respective counterparts in the Extent part of the  Fishnet tool. 

Were you able to actually tie these together?

Thanks.
0 Kudos
curtvprice
MVP Esteemed Contributor
When I do what you have suggested, I can see the options in my tool, select "Same as Display" but the values of Top Bottom Left Right don't get sent to their respective counterparts in the Extent part of the  Fishnet tool. 

Were you able to actually tie these together?


Yes, when I connected the Extent variable I created to the fishnet tool, it seemed to work. I didn't run the tool though -- I'm using 10.1 SP1.

I have gotten Fishnet to work consistently in previous versions by using the Calculate Value tools to extract and calculate parameters based on the extent. You may have to do it that way -- it's a bit kludgy but it works:
[post]250138[/post]

Calculate Value is a tool to get to know!
0 Kudos
JenniferMinnick
Occasional Contributor
After a brief moment of euphoria I crashed back down to earth...

I created a parameter from Make Variable>From Environment>Processing Extent>Extent and deleted the precondition link and added a direct link which seemingly linked to the Create Fishnet>Template Extent.  While it seemingly should work - it didn't.

I also right clicked on the "Create Fishnet" tool in my model and messed around (without have much clue) with the properties hoping to make Same as Display Processing Extent dynamic.  I selected Environments>Processing Extent>Values and set the processing extent as "same as display" it always reverts to "as specified below" which is whatever you last set it as.  Plus, I set extent as a precondition not that I know what that means.  Either way, none of it worked.

I also called ESRI and showed an analyst what i was trying to do - I didn't get much of an explanation as to why it wouldn't work as it seemed that it should and he kept trying to get me to use some tool for data driven maps and tools in ArcInfo which I certainly don't have.

So we head back to Calculate Values but I need some help.

Key problems are:
1) When you manually use the Create Fishnet tool and enter Top, Bottom, Left, Right - the Origin and Y-Axis and Opposite corner of Fishnet coordinates are automatically calculated from your Template Extent.  When you use processing extent as a variable they don't fill in automatically.  You get some crazy extents that don't have anything to do with anything.

2) The only part of the model that is "colored" as in has values is the Extent which is a "bad thing" because while it will work, sometimes, on the first go around - the values never seem to reset.  So

So - if I have to use Calculate Values - what am I trying to calculate - I'm really just trying to pull coordinates (points) from the Display Extent and sent them to Create Fishnet - no real calculations.

Any ideas with this?

Curtis - I checked out that link and I think what I'm trying to do is much simpler - anyway to get display extent coordinates using python?
0 Kudos