PSU-CSAR / bagis-pro

BAGIS for ArcGIS Pro
4 stars 1 forks source link

Basin Analysis Report - Extremely large AOI #32

Open jdduh opened 2 years ago

jdduh commented 2 years ago

We will need a separate set of design for AOI with a lot of SNOTEL and snow course sites. Here is a map showing why.

image

The decision is to not generate any report for AOIs with more than 50 sites. Just put an error message in the log so that we can find these AOIs easily.

lbross commented 2 years ago

Can we clarify the design somewhat? We won't know how many sites there are until we clip the sites layers. Do we want to generate all of the analysis layers before we count the sites and abort the process before creating the map package document? Or should we move the sites clipping to the beginning of the batch tool, count the sites immediately after the layers are clipped, and abort the process before proceeding further? Either way we can write an error message in the log per that requirement.

jdduh commented 2 years ago

We should clip the sites first. There might be a tool (e.g., Spatial Join) to perform spatial query to see how many features are within (or intersected) with the AOI boundary. This routine should work for AOIs that don't have any sites within the buffer area.

lbross commented 2 years ago

You bring up a good point that you may not have intended to. Are we restricting this to 50 sites within the AOI boundary? Or 50 sites in the combined Snotel and Snow Course layers? The 5 Km buffer could result in many sites that are outside the AOI boundary. My preference is to clip the sites first and count the features. The number of AOIs that will meet this criteria is likely small and it would be more additional coding to implement the spatial query.

jdduh commented 2 years ago

It wasn't my intention to bring this up. The number, 50, itself, was not selected precisely. It refers to the entries in the site table, which I think is based on the count within the buffered AOI boundary. Let's keep it that way.

lbross commented 2 years ago

It looks like I will be using the Spatial Join tool before clipping the sites. The method that clips the sites includes some site-related functions so it takes a long time to run. It took about 30 minutes to run on one of the larger AOIs. The Spatial Join tool takes less than a minute. I wanted to clarify that it's OK to use the aoib_v as the boundary for the spatial join tool. The alternative is to create a temporary polygon using the sites buffer distance as the boundary. The aoib_v tool will likely understate the number of sites, but it will be faster not to generate the temporary feature class.

jdduh commented 2 years ago

Using aoib_v is fine. We might want to make the cut-off threshold value (e.g., 50) customizable if using aoib_v overly undercounts the number of sites.

lbross commented 2 years ago

I added a MaximumSitesAllowed parameter to the batch configuration file to indicate the cut-off threshold value. This is done. I posted a new addIn for you to the basins server if you want to try it. Because of the new parameter, you will need to delete the batch_tool_settings.json from your BAGIS folder so that you get the latest version. Adding version control to that file is the next thing on my list.

jdduh commented 1 year ago

Not sure if this request goes to this issue. Please use a smaller font size to label the site numbers on the map to minimize label overlap. I'm not sure what the current font size is. Try using a font size of 10 (on letter size dimension) and see if that reduce the overlap. Here is an AOI in question.

image

lbross commented 1 year ago

Changed the font size to 10 in the latest release. It was 14.

jdduh commented 5 months ago

Given that we have AOI level statistic tool now (#45), we need to provide a way to prepare these large AOIs for the AOI summary tool. We probably have two dozen of these AOIs. Is there a way to activate the interactive mode in BAGIS Pro to perform the data preparation and processing without creating the reports? This request is just to prepare an AOI for the AOI summary tool to work.

lbross commented 5 months ago

There are two ways to handle this.

  1. Update the AdminMenu in the local batch_tool_settings.json to true. This will activate the interactive mode after an AOI is selected. Note that it will be set back to false if bagis-pro unloads a new settings file from the server because it has a newer version. If you run the 'Clip Layers' tool with all the boxes checked followed by the 'Generate Analysis Layers' with all the boxes checked, it should give you everything you need for the reporting tool. If it doesn't, hopefully the log will give you a good error message about what is missing.
  2. Alternatively we could add a checkbox to the batch tool that allows you to select whether or not the pdf report is created. I'm not sure how long this would take or where we need to modify the restrictions for large AOIs. But it would be the fastest for the end user.
jdduh commented 5 months ago

Option 1 sounds good. I will give it a try and let you know how it works.