Closed llsjr2 closed 6 years ago
@llsjr2 - I'm seeing the ring geometry being correct, but the distance reported in the table is the diameter of the ring, not the radius of the ring.
@BobBooth Yeah, that is the issue. When range rings are issued and labeled in a product. The distance from the target or area is typically used.
I have updated the script in this PR https://github.com/Esri/military-tools-geoprocessing-toolbox/pull/328 to do the field calculation after the final output is created. It was not working on the intermediate table.
Updated existing (non-cucumber) checklist test with a couple of lines to verify that the range field values are correct, in this PR: https://github.com/ArcGIS/solutions-defense-test-catalog/pull/148
My thoughts for the automated test are to add something like this around line 318 of the Range Rings from Interval test:
[This is failing at the moment, but, I think it is close]
#get a list of values in the Range field
outRingLyr = arcpy.management.MakeFeatureLayer("outRings")
rangeList = [row[0] for row in arcpy.da.SearchCursor(outRingLyr, "Range")]
rangeList.sort()
self.assertTrue(rangeList == [200.0,400.0,600.0,800.0], "Range values not equal to expected values")
@BobBooth updated comments in the pull request. The manual test needs to be written like a cucumber test.
@topowright - done @ACueva - please review and merge
Created update to automated test script to check that Range output values match the inputs given the tool. https://github.com/Esri/military-tools-geoprocessing-toolbox/pull/329
Verified in Jenkins production the unit test passes successfully.
This should be working.
It is on my machine, and the PR got merged.
Is the GP toolbox not getting updated right in the Military Tools build process?
The Dev branch in GitHub has the correct code: https://github.com/Esri/military-tools-geoprocessing-toolbox/blob/dev/toolboxes/scripts/RangeRingUtils.py I think this is a problem with the Military Tools packaging process.
Impeded because I cannot test this from the latest Military Tools build, as the build process is still (as of the latest version, at \Solutions\DefenseSolutions\MilitaryToolsForArcGIS\3.0\27) not picking up the contents of the dev branch.
This is no longer impeded. The build has been updated to pull from dev.
I tested directly from the MT build. I can confirm, the changes addressed in this issue show up in the current build. Build 31
Tasks to be done
Verify
Expected Behavior
When the tool is run, the rings should be the distance should be correct in the attribute table for labeling
Current Behavior
The tool's output is double the distance in the attribute table. Ran the tool twice with and without the Spatial Reference option. It did not change the result. Also ran it with the Map Frame in both GCS and UTM.
Steps to Reproduce (for bugs)
Your Environment
Platform: ArcMap 10.6.1 Projection: GCS WGS1984