Esri / solutions-geoprocessing-toolbox

Models, scripts, and tools for use in ArcGIS Desktop and Server to support defense and intelligence workflows.
Apache License 2.0
133 stars 67 forks source link

Unit test TestModelRangeFan failing: grid_code vs. gridcode #8

Closed csmoore closed 10 years ago

csmoore commented 11 years ago

ArcGIS Desktop 10.2 - Unit tests

TestModelRangeFan TestModelRadialLineOfSight

are failing after a few minutes with Invalid field grid_code

Here is the failing unit test: https://github.com/ArcGIS/defense-and-intel-toolbox/blob/master/common/test/test_viz_and_range/TestModelRangeFan.py#L80

& Here is the error:

tel-toolbox\common\data\geodatabases\scratch.gdb\RasPolys visibility SHORT # # # "Observer visibility" NULLABLE NON_REQUIRED # [exec] Start Time: Fri Nov 22 08:47:42 2013 [exec] Adding visibility to C:\MyFiles\Github\defense-and-intel-toolbox\com mon\data\geodatabases\scratch.gdb\RasPolys... [exec] Succeeded at Fri Nov 22 08:47:42 2013 (Elapsed Time: 0.23 seconds) [exec] Executing (Calculate Field (3)): CalculateField C:\MyFiles\Github\de fense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\RasPolys visibility !grid_code! PYTHON # [exec] Start Time: Fri Nov 22 08:47:42 2013 [exec] ERROR 000539: Invalid field grid_code [exec] Failed to execute (Calculate Field (3)). [exec] Failed at Fri Nov 22 08:47:42 2013 (Elapsed Time: 0.35 seconds) [exec] Failed to execute (RangeFan). [exec] Failed at Fri Nov 22 08:47:44 2013 (Elapsed Time: 37.78 seconds)

BUILD FAILED C:\MyFiles\Github\defense-and-intel-toolbox\common\test\build.xml:26: The follow ing error occurred while executing this line: C:\MyFiles\Github\defense-and-intel-toolbox\common\test\test_viz_and_range\build .xml:43: exec returned: -1

csmoore commented 11 years ago

Related: Shows closed but still a problem in this repo: https://github.com/Esri/defense-and-intel-analysis-toolbox/issues/20

https://github.com/Esri/defense-and-intel-analysis-toolbox/issues/17

mfunk commented 10 years ago

OK. I've repaired this one. Again it seems the grid_code/gridcode issue is back again. I'm beginning to think that someone has an old copy on their machine that keeps overwriting it to 10.0 usage with grid_code. Anyway, I'd like @csmoore, @ACueva, and @nfeuerstein to get the changes here and retest with ANT test scripts...

test_range_fan: [exec] Starting Test: RangeFans [exec] Creating New Scratch Workspace (Workaround) [exec] Valid Object: sampleRangePoints [exec] Valid Object: Jbad_SRTM_USGS_EROS [exec] Valid Object: Visibility and Range Tools.tbx [exec] Running from: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\test\test_viz_and_range [exec] Geodatabase path: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases [exec] Input FeatureClass: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\de fault.gdb\sampleRangePoints [exec] Input Feature Count: 3 [exec] PROJCS['WGS_1984_Web_Mercator_Auxiliary_Sphere',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984' ,6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mercator_Auxiliary_Sph ere'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],PARAMETER['Standa rd_Parallel_1',0.0],PARAMETER['Auxiliary_Sphere_Type',0.0],UNIT['Meter',1.0]] [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\prjInFeatu re [exec] Projecting input points to Web Mercator ... [exec] Getting centers .... [exec] Creating paths ... [exec] Creating target feature class ... [exec] Buiding 3 fans ... [exec] Removing intermediate datasets... [exec] Removing: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\ prjInFeature [exec] Done [exec] Output FeatureClass: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\t est_outputs.gdb\RangeFans [exec] Output Feature Count: 3 [exec] Output FeatureClass: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\t est_outputs.gdb\RangeViz [exec] Output Feature Count: 7 [exec] Deleting Scratch Workspace (Workaround) [exec] Test Successful

test_radial_line_of_sight: [exec] Starting Test: TestModelRadialLineOfSight [exec] Creating New Scratch Workspace (Workaround) [exec] Valid Object: RlosObserverWebMerc [exec] Valid Object: Jbad_SRTM_USGS_EROS [exec] Valid Object: Visibility and Range Tools.tbx [exec] Running from: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\test\test_viz_and_range [exec] Geodatabase path: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases [exec] Input FeatureClass: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\te stinputs.gdb\RlosObserverWebMerc [exec] Input Feature Count: 4 [exec] RLOS will use local RADIUS2 values for calculation. [exec] Finding observer's minimum bounding envelope ... [exec] Finding center of observers ... [exec] Recentering Azimuthal Equidistant to centroid ... [exec] Projecting surface ... [exec] Projecting observers ... [exec] Calculating Viewshed ... [exec] Converting to polygons ... [exec] Removing scratch datasets: [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\observers mbg [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\mbgCenterP oint [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\mbgCenterW GS84 [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\mbgBuffer [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\mbgBufferP rj [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\surf_extra ct [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\extract_pr j [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\obs_prj [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\obs_buf [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\vshed [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\ras_poly [exec] C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\scratch.gdb\out_buf [exec] Output FeatureClass: C:\Users\matt2542\Documents\GitHub\defense-and-intel-toolbox\common\data\geodatabases\t est_outputs.gdb\RlosVizOutput [exec] Output Feature Count: 53 [exec] Deleting Scratch Workspace (Workaround) [exec] Test Successful

mfunk commented 10 years ago

BTW... I tested this in 10.2.2.3552 which is a few days old but should still work.

mfunk commented 10 years ago

@csmoore, @ACueva, @nfeuerstein can one of you guys verify this is fixed?