Skip to content

Commit 860be27

Browse files
authored
Merge pull request #824 from openmobilityfoundation/feature-geography
Remove Geographies from Policy and make public
2 parents 0a23642 + 1a9c659 commit 860be27

6 files changed

Lines changed: 26 additions & 62 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Please [let us know](https://docs.google.com/forms/d/e/1FAIpQLScrMPgeb1TKMYCjjKs
220220

221221
Community projects are those efforts by individual contributors or informal groups that take place outside Open Mobility Foundation’s formalized process, complementing MDS. These related projects often push new ideas forward through experimental or locally-focused development, and are an important part of a thriving open source community. Some of these projects may eventually be contributed to and managed by the Open Mobility Foundation.
222222

223-
The OMF's [Communitiy Projects](https://www.openmobilityfoundation.org/community-projects/) page has an every growing list of projects related to MDS, and see our [Privacy Committee's State of Practice](https://github.com/openmobilityfoundation/privacy-committee/blob/main/products/state-of-the-practice.md) for more examples.
223+
The OMF's [Community Projects](https://www.openmobilityfoundation.org/community-projects/) page has an every growing list of projects related to MDS, and see our [Privacy Committee's State of Practice](https://github.com/openmobilityfoundation/privacy-committee/blob/main/products/state-of-the-practice.md) for more examples.
224224

225225
Please [let us know](https://www.openmobilityfoundation.org/get-in-touch/) if you create open source or private tools for implementing or working with MDS data.
226226

agency/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ See [Bulk Responses](#bulk-responses)
202202

203203
**Endpoint:** `/stops`
204204
**Method:** `PUT`
205-
**Payload**: An array of of [Stop][stops] information, where the permitted changable fields are defined as:
205+
**Payload**: An array of of [Stop][stops] information, where the permitted changeable fields are defined as:
206206

207207
| Field | Required/Optional | Description |
208208
|---------------------|-------------------|---------------------------------------------|
@@ -220,7 +220,7 @@ See [Bulk Responses](#bulk-responses)
220220
| -------------------- | ------------------------------------------------- | ------------------------------- |
221221
| `bad_param` | A validation error occurred | Array of parameters with errors |
222222
| `missing_param` | A required parameter is missing | Array of missing parameters |
223-
| `unregisterd` | No stop with `stop_id` is already registered | |
223+
| `unregistered` | No stop with `stop_id` is already registered | |
224224

225225
### Stops - Readback
226226

general-information.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ This document contains specifications that are shared between the various MDS [A
44

55
## Table of Contents
66

7+
- [Authentication](#authentication)
78
- [Beta Features](#beta-features)
89
- [Costs and Currencies](#costs-and-currencies)
910
- [Data Types](#data-types)
@@ -14,14 +15,21 @@ This document contains specifications that are shared between the various MDS [A
1415
- [Stop-based Geographic Data](#stop-based-geographic-data)
1516
- [Intersection Operation](#intersection-operation)
1617
- [Geography-Driven Events](#geography-driven-events)
17-
- [Optional Authentication](#optional-authentication)
1818
- [Responses](#responses)
1919
- [Error Messages](#error-messages)
2020
- [Strings](#strings)
2121
- [Timestamps](#timestamps)
2222
- [UUIDs](#uuids)
2323
- [Versioning](#versioning)
2424

25+
## Authentication
26+
27+
If implementing MDS Policy, Geography, and/or Jurisdiction APIs and endpoints, an agency must make them unauthenticated and public. This allows transparency for the public to see how the city is regulating, holds the city accountable for their policy decisions, and reduces the technical burden on providers to use these endpoints. A side benefit is that this allows third parties to ingest this information into their applications and services for public benefit.
28+
29+
All other MDS APIs require authentication, as outlined.
30+
31+
[Top][toc]
32+
2533
## Beta Features
2634

2735
In some cases, features within MDS may be marked as "beta." These are typically recently added endpoints or fields. Because beta features are new, they may not yet be fully mature and proven in real-world operation. The design of beta features may have undiscovered gaps, ambiguities, or inconsistencies. Implementations of those features are typically also quite new and are more likely to contain bugs or other flaws. Beta features are likely to evolve more rapidly than other parts of the specification.
@@ -110,14 +118,6 @@ During the Beta period for this feature, location and telemetry data remain requ
110118

111119
[Top][toc]
112120

113-
## Optional Authentication
114-
115-
Authorization of the Policy and Geography APIs is no longer required and will be deprecated in next major release with these endpoints (plus Jurisdictions) becoming 'optionally private' instead of 'optionally public'. An agency may optionally decide to make the Policy and Geography endpoints, as well as Jurisdictions, unauthenticated and public. This allows transparency for the public to see how the city is regulating, holds the city accountable for their policy decisions, and reduces the technical burden on providers to use these endpoints. A side benefit is that this allows third parties to ingest this information into their applications and services for public benefit.
116-
117-
Note if implementing the beta feature [Geography Driven Events](/general-information.md#geography-driven-events), both Policy and Geography must be public.
118-
119-
[Top][toc]
120-
121121
## Responses
122122

123123
* **200:** OK: operation successful.
@@ -219,7 +219,7 @@ the vehicle and canceling or ending the trip in under 60 seconds.
219219

220220
Providers are still expected to report all trips and trip related events in
221221
all MDS endpoints, but parties may use this definition as a shared reference
222-
at the recommendation of the MDS community when analysing trips.
222+
at the recommendation of the MDS community when analyzing trips.
223223

224224
[Top][toc]
225225

geography/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Geographical data will be stored as GeoJSON and read from either `geographies.js
1212

1313
* [General Information](#general-information)
1414
* [Versioning](#versioning)
15-
* [Transition from Policy](#transition-from-policy)
1615
* [Distribution](#distribution)
1716
* [Flat Files](#flat-files)
1817
* [Response Format](#response-format)
@@ -41,14 +40,6 @@ Versioning must be implemented as specified in the [Versioning section][versioni
4140

4241
[Top][toc]
4342

44-
### Transition from Policy
45-
46-
To ensure this Geography API is not creating a breaking change for the 1.1.0 release, it's expected that the data contained in the [`/geographies`](/policy#geography) endpoint in the Policy API is identical to this Geography API. This will ensure that when a Geography ID is used anywhere in this release, the data could be retrieved from either location.
47-
48-
This temporary requirement is to ensure backwards compatibility, but the overall intent is to remove the /policy/geographies endpoint at the next major MDS release.
49-
50-
[Top][toc]
51-
5243
## Distribution
5344

5445
Geographies shall be published by regulatory agencies or their authorized delegates as JSON objects. These JSON objects shall be served by either [flat files](#flat-files) or via [REST API endpoints](#rest-endpoints). In either case, geography data shall follow the [schema](#schema) outlined below.
@@ -65,7 +56,7 @@ Geographies should be re-fetched at an agreed upon interval between providers an
6556

6657
To use a flat file, geographies shall be represented in one (1) file equivalent to the /geographies endpoint:
6758

68-
* `geographies.json`
59+
* `geographies.json` in Geography API
6960

7061
The files shall be structured like the output of the [REST endpoints](#rest-endpoints) above.
7162

@@ -83,7 +74,7 @@ See the [Responses][responses] and [Error Messages][error-messages] sections.
8374

8475
### Authorization
8576

86-
Authorization is not required. An agency may decide to make this endpoint unauthenticated and public. See [Optional Authentication](/general-information.md#optional-authentication) for details.
77+
This endpoint should be made public. Authorization is not required.
8778

8879
[Top][toc]
8980

@@ -99,7 +90,7 @@ See the [Endpoints](#endpoints) below for links to their specific JSON Schema do
9990
| ---------------- | --------- | --- | --------------------------------------------------------------------------------------------- |
10091
| `name` | String | Required | Name of geography |
10192
| `description` | String | Optional | Detailed description of geography |
102-
| `geography_type` | String | Optional | Type of geography, e.g. `municipal_boundary` or `council_district` or custom text. See [Geography Types](#geography-types). |
93+
| `geography_type` | String | Optional | Type of geography, e.g. `municipal_boundary` or `council_district` or custom text. See [Geography Type](#geography-type). |
10394
| `geography_id` | UUID | Required | Unique ID of geography |
10495
| `geography_json` | JSON | Required | The GeoJSON that defines the geographical coordinates. |
10596
| `effective_date` | [timestamp][ts] | Optional | The date at which a Geography is considered "live". Must be at or after `published_date`. |
@@ -134,7 +125,7 @@ Type of geography. These specific types are recommendations based on ones common
134125
| `neighborhood` | Neighborhood area |
135126
| `market_area` | Economic area |
136127
| `opportunity_zone` | Defined Opportunity Zone |
137-
| `overlay_district` | Agengy overlay district |
128+
| `overlay_district` | Agency overlay district |
138129
| `post_code` | Zip or postal code |
139130
| `traffic_zone` | Transportation planning area |
140131
| `property_line` | One or more property lines |

jurisdiction/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<a href="/jurisdiction/"><img src="https://i.imgur.com/tCRCfxT.png" width="120" align="right" alt="MDS Jurisdiction Icon" border="0"></a>
44

5-
This specification details the purpose, use cases, and schema for Jurisdictions. Jurisdictions are an optional service that are served by a coordinated group of agencies. Jurisdictions can be '[optionally authenticated](/general-information.md#optional-authentication)', making the endpoints unauthenticated and public. In the future this will shift to 'optionally private', where Jursidictions will be public by default. Note that it serves a different purpose from the [Geography](/geography) API, though it does reference areas within Geography by ID.
5+
This specification details the purpose, use cases, and schema for Jurisdictions. Jurisdictions are an optional service that are served by a coordinated group of agencies. Jurisdictions should be unauthenticated and public. Note that Jurisdictions serves a different purpose from the [Geography](/geography) API, though it does reference areas within Geography by ID.
66

77
## Table of Contents
88

@@ -68,7 +68,7 @@ Those tools can be granted data access from the SaaS tool based on the jurisdict
6868

6969
## Distribution
7070

71-
Jurisdictions can be served by agencies through the following REST API, or via [flat-files](#flat-files). Agencies may choose to make the endpoints public and non-authenticated.
71+
Jurisdictions can be served by agencies through the following REST API, or via [flat-files](#flat-files). Agencies should make the endpoints public and non-authenticated.
7272

7373
### REST
7474

policy/README.md

Lines changed: 7 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ This specification describes the digital relationship between _mobility as a ser
1919
- [Policies](#policies)
2020
- [Query Parameters](#query-parameters)
2121
- [Geographies](#geographies)
22-
- [Query Parameters](#query-parameters-1)
2322
- [Requirements](#requirements)
2423
- [Flat Files](#flat-files)
2524
- [Example `policies.json`](#example-policiesjson)
@@ -30,7 +29,6 @@ This specification describes the digital relationship between _mobility as a ser
3029
- [Rules](#rules)
3130
- [Rule Types](#rule-types)
3231
- [Rule Units](#rule-units)
33-
- [Geography](#geography)
3432
- [Rates](#rates)
3533
- [Rate Amounts](#rate-amounts)
3634
- [Rate Recurrences](#rate-recurrences)
@@ -124,7 +122,7 @@ See the [Responses section][responses] for information on valid MDS response cod
124122

125123
### Authorization
126124

127-
Authorization is not required and agencies are encouraged to make these endpoints unauthenticated and public. See [Optional Authentication](/general-information.md#optional-authentication) for details.
125+
This endpoint should be made public. Authorization is not required.
128126

129127
### Policies
130128

@@ -149,18 +147,7 @@ Policies will be returned in order of effective date (see schema below), with pa
149147

150148
### Geographies
151149

152-
**Deprecated:** see the new [Geography API](/geography#transition-from-policy) to understand the transition away from this endpoint, and how to support both in MDS 1.x.0 releases.
153-
154-
**Endpoint**: `/geographies/{id}`
155-
**Method**: `GET`
156-
**Schema:** [`policy` schema][json-schema]
157-
**`data` Payload**: `{ geographies: [] }`, an array of GeoJSON `Feature` objects that follow the schema [outlined here](#geography) or in [Geography](/geography#general-information).
158-
159-
#### Query Parameters
160-
161-
| Name | Type | Required / Optional | Description |
162-
| ------------ | --------- | --- | ---------------------------------------------- |
163-
| `id` | UUID | Optional | If provided, returns one [Geography](/geography#general-information) object with the matching UUID; default is to return all geography objects. |
150+
**Deprecated:** see the [Geography API](/geography#transition-from-policy) for the current home of this endpoint.
164151

165152
[Top][toc]
166153

@@ -180,12 +167,12 @@ See [Policy Requirements Examples](/policy/examples/requirements.md) for how thi
180167

181168
To use flat files, policies shall be represented in two (2) files:
182169

183-
- `policies.json`
184-
- `geographies.json`
170+
- `policies.json` in Policy API
171+
- `geographies.json` in Geography API
185172

186173
The files shall be structured like the output of the [REST endpoints](#rest-endpoints) above.
187174

188-
The publishing Agency should establish and communicate to providers how frequently these files should be polled.
175+
The publishing agency should establish and communicate to providers how frequently these files should be polled.
189176

190177
The `updated` field in the payload wrapper should be set to the time of publishing a revision, so that it is simple to identify a changed file.
191178

@@ -333,28 +320,14 @@ An individual `Rule` object is defined by the following fields:
333320

334321
[Top][toc]
335322

336-
### Geography
337-
338-
**Deprecated:** see the new [Geography API](/geography#transition-from-policy) to understand the transition away from this endpoint, and how to support both in a MDS 1.x.0 release.
339-
340-
| Name | Type | Required / Optional | Description |
341-
| ---------------- | --------- | --- | ----------------------------------------------------------------------------------- |
342-
| `name` | String | Required | Name of geography |
343-
| `description` | String | Optional | Detailed description of geography |
344-
| `geography_id` | UUID | Required | Unique ID of [Geography](/geography#general-information) |
345-
| `geography_json` | JSON | Required | The GeoJSON that defines the geographical coordinates.
346-
| `effective_date` | [timestamp][ts] | Optional | `start_date` for first published policy that uses this geo. Server should set this when policies are published. This may be used on the client to distinguish between “logical” geographies that have the same name. E.g. if a policy publishes a geography on 5/1/2020, and then another policy is published which references that same geography is published on 4/1/2020, the effective_date will be set to 4/1/2020.
347-
| `published_date` | [timestamp][ts] | Required | Timestamp that the policy was published, i.e. made immutable |
348-
| `prev_geographies` | UUID[] | Optional | Unique IDs of prior [geographies](/geography#general-information) replaced by this one |
349-
350-
[Top][toc]
351-
352323
### Rates
324+
353325
Rate-related properties can currently be specified on all rule types except `user`, i.e. any rule that can be measured.
354326

355327
**[Beta feature](/general-information.md#beta-features)**: *No (as of 2.0.0)*. [Leave feedback](https://github.com/openmobilityfoundation/mobility-data-specification/issues/674)
356328

357329
#### Rate Amounts
330+
358331
The amount of a rate applied when this rule applies, if applicable (default zero). A positive integer rate amount represents a fee, while a negative integer represents a subsidy. Rate amounts are given in the `currency` defined in the [Policy](#policy).
359332

360333
#### Rate Recurrences

0 commit comments

Comments
 (0)