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

Creating Curb Objects #126

Merged
merged 27 commits into from
Dec 10, 2024
Merged

Creating Curb Objects #126

merged 27 commits into from
Dec 10, 2024

Conversation

jacobmalleau
Copy link
Collaborator

@jacobmalleau jacobmalleau commented Nov 20, 2023

Explain pull request

First commit / defining Curb Object

Is this a breaking change

  • No, not breaking

Impacted Spec

Which API(s) will this pull request impact?

  • Curbs
  • Events
  • Metrics

Additional context

Add any other context or screenshots about the feature request here.

First commit / defining Curb Object
@jacobmalleau jacobmalleau requested a review from a team as a code owner November 20, 2023 01:20
@CLAassistant
Copy link

CLAassistant commented Nov 20, 2023

CLA assistant check
All committers have signed the CLA.

@schnuerle schnuerle added enhancement New feature or request Curbs API Events API Metrics API schema Implications for the OpenAPI Schema labels Nov 20, 2023
@schnuerle schnuerle changed the base branch from feature-curb-objects to dev November 20, 2023 15:56
@schnuerle schnuerle marked this pull request as draft November 20, 2023 15:59
@schnuerle schnuerle linked an issue Nov 20, 2023 that may be closed by this pull request
@schnuerle schnuerle mentioned this pull request Nov 20, 2023
curbs/README.md Outdated Show resolved Hide resolved
curbs/README.md Outdated Show resolved Hide resolved
curbs/README.md Outdated
| ------ | ------ | ------------------- | ------------- |
| `curb_object_id` | [UUID][uuid] | Required | The ID of the curb object. |
| `geometry` | [Point][point] | Required |The spatial location of this curb object location. This can represent the approximate center of the object, or the centroid location of the object, depending on its size and shape. |
| `curb_zone_id` | [UUID][uuid] | Conditionally Required | The ID of the Curb Zone this object is related to. The geometry of the specified Curb Zone does not need to directly relate to the geometry of this object. Either a Zone or Space ID is required for an Object. |
Copy link
Member

Choose a reason for hiding this comment

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

The curb_zone_id description should reflect the idea that the object's physical location is nearest to this zone. Similarly with curb_space_id below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in latest commit

Copy link

Choose a reason for hiding this comment

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

It would be great to also be able to relate the object to a policy id for signs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

To @felixir's point, INRIX has a specific implementation underway that relates sign assets to policies

Copy link
Member

Choose a reason for hiding this comment

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

Ah so adding a policy_id to the curb object defintion? I guess that makes some sense, if the object at a curb zone is a sign that has one description on it and that aligns to just one policy. But most curb zone policies are not defined by just one sign? I'm not sure it's needed to do this, since the zone is connected to a policy already, and this would apply just one type of object, signage. Could you give us some use cases and reasons why you would need the policy_id field in an Object?

Copy link
Collaborator Author

@jacobmalleau jacobmalleau Nov 19, 2024

Choose a reason for hiding this comment

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

Yeah, I know we thought that you could relate the object to the policy through the curb zone. Similar to how events can be related to policies through the curb zone.

Copy link
Member

Choose a reason for hiding this comment

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

See the new curb_policy_id field @felixir @Mu-yi-Zhou @alexdemisch @mschwartzie and give feedback on this

See meeting notes for additional context.
Copy link
Collaborator Author

@jacobmalleau jacobmalleau left a comment

Choose a reason for hiding this comment

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

Left comments throughout with items addressed in my latest commit

| Name | Type | Required/Optional | Description |
| ------ | ------ | ------------------- | ------------- |
| `curb_object_id` | [UUID][uuid] | Required | The ID of the curb object. |
| `geometry` | [Point][point] | Required |The spatial location of this curb object location. This can represent the approximate center of the object, or the centroid location of the object, depending on its size and shape. |
Copy link

@felixir felixir Nov 9, 2024

Choose a reason for hiding this comment

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

It would be great to have this be more flexible and allow line and polygon for objects like bike racks and bus stops. This would simplify the need for linear distance, max length, and object shape.

Copy link
Member

Choose a reason for hiding this comment

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

This point represents a required field.

We also have an optional object_shape field below which is for polygons.

I don't think lines work in the context of defining where objects area (though you could argue they do with curb zones, but that's not the scope of this).

Copy link
Member

@schnuerle schnuerle Nov 21, 2024

Choose a reason for hiding this comment

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

See the new object_line field @felixir @Mu-yi-Zhou @alexdemisch and give feedback on this

@Mu-yi-Zhou
Copy link

Is Object Type Enum or free-form? If Enum, will be good to keep custom attributes or even a comment/description fields. Example user case - some assets in our database are owned by other city department or private developer, we need a filed to note that.

@@ -263,6 +308,7 @@ A Curb Zone is represented as a JSON object, whose fields are as follows:
| `entire_roadway`| Boolean | Optional | If "true", this curb location takes up the entire width of the roadway (which may be impassible for through traffic when the Curb Zone is being used for parking or loading). This is a common condition for alleyways. If `entire_roadway` is `true`, `street_side` MUST NOT be present. |
| `curb_area_ids`| Array of [UUID][uuid] | Optional | The ID(s) of the [Curb Areas](#curb-area) that this Curb Zone is a part of. If specified, the areas identified MUST be retrievable through the Curb API and its geographical area MUST contain that of the Curb Zone. |
| `curb_space_ids`| Array of [UUID][uuid] | Optional | The ID(s) of the [Curb Spaces](#curb-space) that this Curb Zone contains. If specified, the spaces identified MUST be retrievable through the Curb API and its geographical area MUST be contained in this Curb Zone. |
| `curb_object_ids` | Array of [UUID][uuid] | Optional | The ID(s) of the [Curb Objects](#curb-object) that this Curb Zone is related to, in particular what Objects are in the Zone's areas of influence. For example, a pay station being used for multiple paid parking zones, a locker for a commercial loading zone, or a camera monitoring several zones. If specified, the objects identified MUST be retrievable through the Curb API. Curb Objects can be related to a Curb Space or a Curb Zone. |
Copy link
Member

Choose a reason for hiding this comment

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

Flagging this update for review

@@ -317,6 +363,7 @@ A Curb Space is represented as a JSON object whose fields are as follows:
| `published_date` | [Timestamp][ts] | Required | The date/time that this curb area was first published in this data feed. |
| `last_updated_date` | [Timestamp][ts] | Required | The date/time that the properties of ths curb area were last updated. This helps consumers know that some fields may have changed. |
| `curb_zone_id` | [UUID][uuid] | Required | The ID of the Curb Zone this space is within. The geometry of the specified Curb Zone MUST contain the geometry of this space. |
| `curb_object_ids` | Array of [UUID][uuid] | Conditionally Required | The ID(s) of the [Curb Objects](#curb-object) that this Curb Space is related to, in particular what Objects are in the Space's areas of influence. For example, a meter being used for two paid parking spcaes, a locker for a commercial loading space, or a camera monitoring several spaces. If specified, the objects identified MUST be retrievable through the Curb API. Curb Objects can be related to a Curb Space or a Curb Zone.|
Copy link
Member

Choose a reason for hiding this comment

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

Flagging this update for review and comment.

@schnuerle
Copy link
Member

Is Object Type Enum or free-form? If Enum, will be good to keep custom attributes or even a comment/description fields. Example user case - some assets in our database are owned by other city department or private developer, we need a filed to note that.

Hi @Mu-yi-Zhou - The Curb Object object has lots of these freeform fields now as you can see here: name, description, owner, operator, external object id, external URL. I think these cover your use case.

@schnuerle
Copy link
Member

Hi everyone, please take a look at the latest unresolved comments and things for review and leave your thoughts.

@schnuerle
Copy link
Member

The only things open for final consensus are now:

  1. Do we need an optional polyline for objects, and what is the use case for this?
  2. Should we add a policy_id field to objects, or does its connection to Zones and therefore policy_ids that way sufficient?
  3. Review of the updated language clarifying how curb_object_ids are defined

@schnuerle schnuerle marked this pull request as ready for review November 20, 2024 21:47
@alexdemisch
Copy link

Re: (1), a polyline would be helpful to represent curb paint, which we are planning to store as an asset/curb object, and represent as a line feature.

@Mu-yi-Zhou
Copy link

  1. Should we add a policy_id field to objects, or does its connection to Zones and therefore policy_ids that way sufficient? Having policy_id in Curb Object is useful. Although we can link a object with curb_zone then with policy, a curb zone can be associated with several policies.

| `geometry` | [Point][point] | Required |The spatial location of this curb object location. This can represent the approximate center of the object, or the centroid location of the object, depending on its size and shape. |
| `curb_zone_id` | [UUID][uuid] | Conditionally Required | The ID of the Curb Zone this object is physically in or closest to. The geometry of the specified Curb Zone does not need to directly relate to the geometry of this object. Either a Zone or Space ID is required for an Object. |
| `curb_space_id` | [UUID][uuid] | Conditionally Required | The ID of the Curb Space this object is physically in or closest to. The geometry of the specified Curb Space does not need to directly relate to the geometry of this object. Either a Zone or Space ID is required for an Object. |
| `curb_policy_id` | [UUID][uuid] | Optional | ID of [Policy object](#policy) that is directly associcated with this curb object. For example, `signage` or `paint` that relates to a single policy. |
Copy link
Member

Choose a reason for hiding this comment

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

See the new curb_policy_id field @felixir @Mu-yi-Zhou @alexdemisch and give feedback on this

@schnuerle schnuerle added the SMART Collaborative Idea coming from the OMF USDOT SMART grant collaborative. label Nov 21, 2024
@bhamlinSDOT
Copy link
Collaborator

Re: (1), a polyline would be helpful to represent curb paint, which we are planning to store as an asset/curb object, and represent as a line feature.

@alexdemisch Can you explain more of the use cases for why you want curb paint represented in CDS? SDOT also has several curb paint colors associated with our regulations but I've never thought about listing the colors in CDS until I read your comment. Seems like important to have noted in asset mgmt. system but feels different than say a sign object listed in CDS. Curious your thoughts.

@alexdemisch
Copy link

@bhamlinSDOT We plan to link regulations to the assets that define them to help maintain the data. In some cases, we only define regulations through curb paint, so having a line feature would help us do that.

Your comment just made me realize that we don't have anywhere to store the actual color of the curb paint in CDS. I suppose that's fine for now as we'll have the linkage to the internal asset_id via the external_object_id field. If we decide to expand on object attributes, it could go there. Admittedly, the asset/regulation linkage might only be useful for internal purposes, but not sure.

@jacobmalleau
Copy link
Collaborator Author

The main issue I see with adding a polyline option is that your Curb Objects dataset would then have both point and linear data which would make the data not compatible in GIS software unless separated out.
A work around would be to have an additional polyline attribute to store the line geometry, but still having a point represent the object.

@schnuerle
Copy link
Member

The main issue I see with adding a polyline option is that your Curb Objects dataset would then have both point and linear data which would make the data not compatible in GIS software unless separated out. A work around would be to have an additional polyline attribute to store the line geometry, but still having a point represent the object.

@jacobmalleau It seems like this PR supports your workaround idea. Can you explain why it's a workaround in your estimation? It seems as written there is a required point for every object, and there is an optional polyline field. So it is separated out. How does that create compatibility issues with GIS software?

@schnuerle schnuerle merged commit 6e5ed1d into dev Dec 10, 2024
1 check passed
@schnuerle
Copy link
Member

Pushed to dev branch as is. Please continue the conversation here.

If needed we can make a new Issue or PR now to address suggested changes to dev before the 1.1 release starts the OMF approval process, at a later date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Curbs API enhancement New feature or request Events API Metrics API schema Implications for the OpenAPI Schema SMART Collaborative Idea coming from the OMF USDOT SMART grant collaborative.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Curb Objects
9 participants