1

I am working on a project within ArcGIS Pro 3.1.3. Ultimately I am trying to create a submodel that will be inserted in a larger workflow eventfully. This submodel is intended to convert a shapefile to raster and then reclassify it. The data I am working with is not in the right projection system, so I know I will need to project it. However, other people will be using this model with other data sources. I want to ensure that if other, already projected data is added to the model that an extra projection will not screw it up.

I know that I can use logical branching (i.e. 'if coordinate system is') to achieve this. See below for what I have currently:enter image description here

If possible I would like to eliminate the logical branching. I am needing to make other more complicated submodels, and I would prefer to be smaller/less confusing if possible. So my question is: Can I run all data through the project tool, even if the data is already in the correct projection?

If the extra projection will affect things, and it is better to leave it as is, does anyone have any knowledge on how to set some type of contingency for my output parameter, where only the actual output is set? Currently I have nhna_reclass and nhna_reclass (3) set as the parameters, but really only one of those will end up existing based on the result of 'if coordinate system is'

2 Answers 2

1

To my knowledge projecting a dataset into a coordinate system that it is already in is akin to making a copy of it. I think you can remove the duplication of tools (the clip tool onwards) by employing the merge branch tool. Explore that. I would say keeping the "if coordinate system is" tool in the model logic is the smarter way to go as that captures the scenario where someone swears blind its coordinate system X but they still enter in a dataset in coordinate system Y.

1
  • Thanks, Hornbydd. I thought there must be something like the merge branch tool, but for the life of me, I couldn't find it. I think that will be quite suitable for this application.
    – bhall
    Jan 5 at 17:22
1

It is easy enough to test whether reprojecting data into the same coordinate reference system (CRS) as the CRS of the input will affect the location of the data.

Here is a dataset in Washington State Plane North with latitudes.

enter image description here

And here is the same data after reprojection in WaSPN

enter image description here

If you are interested in eliminating the logical branching and you need to make other more complicated submodels you should consider exporting this model to Python. With Python you can write your own scripts to handle logic needs like parameter setting based on inputs. You can and call your logic if an only if you if you need them. For example, you can test the incoming CSR and if they need reprojecting you can call another Python script to do the reprojecting leaving your original tool (script) tidy and readable.

1
  • Thanks, CBG for your response. I've tried a similar test with the same results (i.e., the tables match up) -- Mostly I just wanted to verify that there isn't anything going on in the background that I may not be able to see just from the table. You're right, the logic in python is quite simpler to work with. I have built some submodels within my main model as python script tools. For simpler submodels like this though, I was hoping to just be able to throw it into a model real quick. For me testing python script tools and their parameters is a bit time consuming.
    – bhall
    Jan 5 at 17:20

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.