Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge changes for Ranch into Develop #289

Closed
wants to merge 39 commits into from
Closed

Conversation

e-lo
Copy link
Collaborator

@e-lo e-lo commented Apr 19, 2022

List of Changes

1. Add CRS_alt

2. Adds/updates geometry

3. Change default for UNIQUE_SHAPE_ID field

  • changed from shape_id to id because shapes out of Ranch has unique id from SharedStreets, no need to create a shape_id. ( @i-am-sijia please fill in reason)
  • Fixed in Add kwargs to roadway #296

4. Updated base_scenario instantiation

5. Added to managed lane required attributes

@e-lo e-lo added this to the v1.0 milestone Apr 19, 2022
@e-lo
Copy link
Collaborator Author

e-lo commented Apr 22, 2022

  1. Change default for UNIQUE_SHAPE_ID field
    changed from shape_id to id because... ( @i-am-sijia please fill in reason)

I think this is moot given #296?

Copy link
Collaborator Author

@e-lo e-lo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments

@@ -187,6 +188,9 @@ class RoadwayNetwork(object):
"roadway",
"length",
"segment_id",
"assign_group",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't these be added as parameters?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

self.nodes_df = _add_dict_to_df(self.nodes_df, node)

# add geometry for new nodes
self.nodes_df["geometry"] = self.nodes_df.apply(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see two problematic things here:

  1. If the X/Y are updated, they need to have their geometry updated. It's probably an easy enough operation that I would just update it for all.
  2. If you are doing a selection, do it in the Dataframe before the .apply()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RE 1: This chunk of codes is for adding new links and new nodes. I don't think Lasso/Wrangler currently support node changes.
RE 2: I was following the implementation of new links.

# add location reference and geometry for new links
self.links_df["locationReferences"] = self.links_df.apply(
lambda x: create_location_reference_from_nodes(
self.nodes_df[
self.nodes_df[RoadwayNetwork.NODE_FOREIGN_KEY] == x["A"]
].squeeze(),
self.nodes_df[
self.nodes_df[RoadwayNetwork.NODE_FOREIGN_KEY] == x["B"]
].squeeze(),
)
if x["new_link"] == 1
else x["locationReferences"],
axis=1,
)
self.links_df["geometry"] = self.links_df.apply(
lambda x: create_line_string(x["locationReferences"])
if x["new_link"] == 1
else x["geometry"],
axis=1,
)

@@ -148,6 +148,7 @@ class RoadwayNetwork(object):

# CRS = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
CRS = 4326 # "EPSG:4326"
CRS_alt=4269
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this is? But the naming is confusing/doesn't mean anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can name it alternative_standard_crs. Added details in #302

@e-lo
Copy link
Collaborator Author

e-lo commented Apr 22, 2022

  1. Added to managed lane required attributes
    Added "assign_group", "county", "mpo" as required fields for managed lanes.

I think this is also taken care of by the flexibility in #296?

@@ -96,6 +96,17 @@ def __init__(self, base_scenario: dict, project_cards: [ProjectCard] = None):
self.road_net = None
self.transit_net = None

if type(base_scenario) is dict:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically it is supposed to be a dict per typehint? but we can address it

@e-lo
Copy link
Collaborator Author

e-lo commented Apr 22, 2022

@i-am-sijia I think this branch is now moot based on individual PRs to develop (as noted) with the exception of the alt_CRS - explanation of what it is?

@i-am-sijia
Copy link
Member

I added descriptions in #302 regarding the CRS issue.

@e-lo e-lo marked this pull request as draft March 10, 2023 00:05
@e-lo
Copy link
Collaborator Author

e-lo commented Mar 10, 2023

@i-am-sijia I believe this is now all moot and we can close this PR? Please check.

yueshuaing and others added 20 commits April 2, 2024 13:01
add comments, updated shape_id naming format, updated the condition for adding new stop node
Apply transit line addition and deletion project cards
…_node

Revert "assign ml node in the 950,000 range"
In transit routing change, new stops are add to the stops table based on index position. If a stop record gets deleted, the indices of the remaining rows need to be adjusted
fixed shape index and adding new stops issue
…ring

assign ml node in the 950,000 range
@e-lo
Copy link
Collaborator Author

e-lo commented Aug 28, 2024

This is a dupe of functionality already in v1.

@e-lo e-lo closed this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants