Rotation angle in my data seems to be an issue with the lattices script.

376
1
01-16-2018 02:45 PM
MelanieFournier1
New Contributor III

Hey,

I downloaded the ArcGIS Indoor tools and data. Everything runs well and the tasks are very complete.

I tried with my own data and I got a fantastic results, the rule package to create the wireframe is awesome! 

Today I tried to run the Campus Network task and tried the tools and scripts. It worked with the esri data. So I made sure all my fields are actually matching the ones from the test data. But I got an error of course and I don't understand which error this is. This is the message I get:

Running script CreateNetworkLattices...
Initialization complete.
Executing validate_inputs...
---All input feature classes' spatial references match.
---The building ID fields in all feature classes have the same type: String
---The floor ID fields in all feature classes have the same type: String
---The values in the Building ID field in the Building feature class are all unique.
---The values in the Floor ID field in the Floor feature class are all unique.
Function validate_inputs completed successfully. Elapsed time: 0.05 seconds.
Executing get_building_attributes...
Executing create_building_filename_string_dict...
Creating template geodatabase/network dataset...
Template geodatabase created successfully. Elapsed time: 2 minutes 24 seconds.
--------------------------
Processing building 54...
Filtering input layers on the Building ID...
Executing create_building_template_lattice...
Creating initial rotated polygon grid...
An exception was raised in rotate_polygon. Elapsed time: 0.05 seconds.
An exception was raised in create_initial_grid. Elapsed time: 0.05 seconds.
An exception was raised in create_buliding_template_lattice. Elapsed time: 0.11 seconds.
An exception was raised in CreateNetworkLattices.py.
Traceback (most recent call last):
File "D:\ECAB\ArcGIS Indoors\ArcGIS Indoors\Create Campus Network\Tools\CampusNetworkScripts\CreateNetworkLattices.py", line 930, in main
lattice = create_building_template_lattice(building_lyr, building, floor_lyr, lattice_angle, lattice_size, building_str, building_template_gdb)
File "D:\ECAB\ArcGIS Indoors\ArcGIS Indoors\Create Campus Network\Tools\CampusNetworkScripts\CreateNetworkLattices.py", line 526, in create_building_template_lattice
fishnet = create_initial_grid(building_lyr, lattice_angle, lattice_size)
File "D:\ECAB\ArcGIS Indoors\ArcGIS Indoors\Create Campus Network\Tools\CampusNetworkScripts\CreateNetworkLattices.py", line 282, in create_initial_grid
onside = rotate_polygon(shp, -lattice_angle)
File "D:\ECAB\ArcGIS Indoors\ArcGIS Indoors\Create Campus Network\Tools\CampusNetworkScripts\CreateNetworkLattices.py", line 342, in rotate_polygon
x, y = p.X, p.Y
AttributeError: 'NoneType' object has no attribute 'X'
Completed script CreateNetworkLattices...
Failed to execute (CreateNetworkLattices).
Failed at mardi, 16 janvier 2018 23:32:31 (Elapsed Time: 2 minutes 27 seconds)

I understand something is wrong with the rotation angle. However there is not much about this rotation angle in the tasks nor in the zip file. Does someone has an idea and can put me on the right track?

Thanks you.

Cheers,

0 Kudos
1 Reply
TerryBearb
New Contributor

I recently had an error similar to this one. I would run the network lattice script and there seemed to be an issue with the rotation field. The fix for me was to make sure the building outline lined up with the rest of the building. I discovered there was an overlap that was causing the error to happen. After rebuilding the building outline feature class, the error cleared. Not sure if this is your same issue.

Good luck!

0 Kudos