Conversation
|
|
||
| if "county_gdf" not in self.__dict__.keys(): | ||
| print('counhty not initialised') | ||
| self.county_gdf = gpd.read_file(r"\\corp.pbwan.net\us\CentralData\DCCLDA00\Standard\sag\projects\MTC\31000152\Network_Rebuild\LP_Local_folders\data\external\county_boundaries\county.shp") |
There was a problem hiding this comment.
I don't like having this part in Ranch. Can we move this part to MTC's lasso?
| ) | ||
|
|
||
| maz_node_gdf = maz_polygon_gdf["geometry"].representative_centroids() | ||
| maz_node_gdf = maz_polygon_gdf["geometry"].centroid |
There was a problem hiding this comment.
Let's use representative_point() to force zone centroid to be within the polygon boundary.
There was a problem hiding this comment.
Ill have to check because my version of geopandas did not have a representative point, I will have to fiddle with environment
|
|
||
| taz_good_intersection_df = Roadway.get_nodes_in_zones( | ||
| node_two_geometry_df, taz_polygon_df | ||
| node_two_geometry_df.drop(columns=["index_left", "index_right"], errors="ignore"), |
There was a problem hiding this comment.
Do we need this? If these two columns exist in the MTC workflow, I'd rather clean up the MTC data before calling this method. We should keep Ranch as generic as possible.
| "\u001b[1;31mNameError\u001b[0m: name 'external_dir' is not defined" | ||
| ] | ||
| } | ||
| ], |
There was a problem hiding this comment.
Why committing an error message?
There was a problem hiding this comment.
Should Probably Roll Back that file
| ) | ||
|
|
||
| if ("A" not in new_cc_gdf.columns ) and ("B" not in new_cc_gdf.columns): | ||
| new_cc_gdf = new_cc_gdf.rename(columns={"X": "A", "Y": "B"}) |
There was a problem hiding this comment.
X/Y are the coordinates, A/B are the node IDs, what's the meaning of this rename?
|
|
||
| # if the zone has less than 4 cc, keep all | ||
| if len(zone_cc_gdf) <= num_connectors_per_centroid: | ||
| if len(zone_cc_gdf) <= 4: |
There was a problem hiding this comment.
Would it make more sense to change the value to num_connectors_per_centroid than hardcoding?
Minor Code and bug fixes optimised for compatibility with BayAreaMetro:
BayAreaMetro/Lasso#6 (comment)