Closed elinz closed 7 years ago
@elinz Ready for testing
verified
@topowright @elinz @dhagens - I'm seeing something with LLOS in ArcMap (installed today's build) where it checks to see if the input surface is in projected coordinates (good), but when I project my DEM and add it to my map (originally CS of data frame and all layers GCS_WGS_1984), I can run the tool and I get unrealistic results - point A is visible from point B even though it is on the other side of a mountain range. If I change the data frame CS to the CS of my raster, the results are correct. Top one with data frame & DEM CS = projected UTM Bottom one with just the DEM CS = projected UTM (data frame CS geographic GCS_WGS_1984).
@BobBooth, Can you verify that the same scenario is different than what you see when running the core GP tools for LOS?
@dhagens - my GP tools are messed up now (https://github.com/Esri/military-tools-geoprocessing-toolbox/issues/199). However, if I re-path the script for LLOS to its new location it runs. I ran it with the GCS_WGS_1984 CS for the data frame (and the elevation data in UTM) and it ran with warnings: WARNING 000632: Datum conflict between map and output. WARNING 000632: Datum conflict between map and output. WARNING 000632: Datum conflict between map and output. WARNING 000632: Datum conflict between map and output. The output symbology is wrong (just a purple line) but I get a profile graph that looks right.
If the data frame in in the UTM projection it runs without those warnings. The layer symbology is still messed up (monochrome blue), but the profile graph looks right.
@mfunk - FYI
So it appears that the output from the core GP Tools doesn't handle this correctly either. I'd have to look into this one further to see how long it would take to fix. In the middle of fixing another bug right now. We may want to add this in the documents that incorrect results will occur if CS of dataframe and surface don't match (or the exact scenario that you mentioned above) @nfeuerstein @topowright Thoughts?
@dhagens - I think the GP tools (in ArcMap) are handling it almost right - I think the symbology is broken because of the path issue with the tools (so they aren't finding the LYR file, I'd guess). The profile graphs look right, anyway.
@elinz, @BobBooth , you should now get back a message indicating that the coordinate systems must match for the selected surface and the dataframe when running LLOS. This is ready for testing.
The Pro and ArcMap LLOS/RLOS tools have different requirements with regards to the spatial reference. In Pro, the input surface has to be in a projected coordinate system, while the map/data frame can be in any coordinate system. For ArcMap LLOS, the input surface has to be in a projected coordinate system and the data frame has to be in the same project coordinate system as the input surface.
For the ArcMap LLOS tool, the coordinate system checks should be performed in the following order:
Verification testing (used ArcMap addin build 09 Jan 2017 16:49 on ArcMap 10.3.1 final):
LLOS (ArcMap Addin) coordinate system check not right - I just added a basemap to get the Web Mercator projection, added a UTM projected raster, did LLOS. Get all "Visible" when should not be. @dhagens @elinz @lfunkhouser @nfeuerstein
@Dbarnes1 & @dfoll The LLOS doc in ArcMap PDF says "The input surface data must be in a projected coordinate system, and the data frame must have the same spatial reference as the input surface data." (Creating linear lines of sight p.28) If we don't actually check in the software to verify that the CS is valid for the analysis, we probably need more detailed info/warning that this will give bad results.
Unfortunately, the ArcObjects tools that are being called don't return any type of feedback indicating that the results are incorrect, the call either returns true or false. This can be updated in the documentation and make the user aware that if the coordinate systems don't match, invalid results may occur.
@dhagens - but the RLOS tools check to see if the CS is right - at least somewhat - I get a "something went wrong" message when I try to run it in Web Mercator. LLOS just goes ahead and runs, creating incorrect results.
@BobBooth, I would suggest testing this out using the GP Tools. I believe that you will get the same results. I'm not saying that we can't keep the user from running with a different coordinate system, but I believe the core tools run and produce the same results. We can document this for now.
@dhagens - Nope, the GP tools seem to produce correct output whether the data frame CS is Web Mercator or UTM. @mfunk
Good catch. Must have been an untested scenario. Could you provide the data somewhere to test with? @nfeuerstein - Your call on this. My suggestion is that we document that the coordinate systems must match and if they do not match, incorrect results may occur. This wasn't initially set as a showstopper.
@dfoll @Dbarnes1 @lfunkhouser let's document this, this release. Coordinate systems input surface and data frame coordinate systems must match.
@dhagens @BobBooth doc currently reads ---
"The input surface data must be in a projected coordinate system, and the data frame must have the same spatial reference as the input surface data."
will changing to
"The input surface data must be in a projected coordinate system, and the data frame must have the same spatial reference as the input surface data. If you do not check for this, invalid results may be returned." suffice? if so i can make that change now
@dhagens @BobBooth @Dbarnes1 i made this change to documentation in only the ArcMap pdf.... will something like this need changed in either the Pro or WAB pdf
@dfoll @Dbarnes1 @dhagens - it seems to work correctly regardless of the map CS in Pro.
thanks for testing that @BobBooth
@dhagens - email me a location where you'd like the data and I'll get you a copy.
@BobBooth & I looked at together & seems to behaving properly - will let Bob close/verify
Verified using the 3/1/17 Military Tools Add-in and the 3/1/17 Visibility component add-in.
The addin is comparing the coordinate system of the data frame with the coordinate system of the input surface. When they don't match the tool presents the following error message:
This is not the requirement for this tool to run. The requirement is for the input surface to be in a projection coordinate system.
The RLOS tool is performing the correct check and when the input surface is not in a projection coordinate system the tool presents the following error message:
Modify the LLOS tool to perform the same check. NOTE: the ArcGIS Pro addin tools LLOS and RLOS are performing the correct check and displaying the same error message that the RLOS ArcMap tool is displaying.