From 7774eef5b45b299ecf6d7c65a49d75e4466586aa Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 4 Mar 2020 19:11:26 -0500 Subject: [PATCH 01/11] Adding geography author service. --- Examples.md | 1003 ++++++++++++++++++++++++++ geo.html | 1 + geography-author/Examples.md | 1003 ++++++++++++++++++++++++++ geography-author/README.md | 195 +++++ geography-author/geo.html | 1 + geography-author/get_geography.json | 1038 +++++++++++++++++++++++++++ get_geography.json | 1038 +++++++++++++++++++++++++++ 7 files changed, 4279 insertions(+) create mode 100644 Examples.md create mode 100644 geo.html create mode 100644 geography-author/Examples.md create mode 100644 geography-author/README.md create mode 100644 geography-author/geo.html create mode 100644 geography-author/get_geography.json create mode 100644 get_geography.json diff --git a/Examples.md b/Examples.md new file mode 100644 index 000000000..947e322b7 --- /dev/null +++ b/Examples.md @@ -0,0 +1,1003 @@ +# Examples + +## Current LADOT Policies + +### Venice Special Operations Zone + + + +#### Raw Policy JSON + +``` +{ + "name": "LADOT Venice Beach Special Operations Zone Global Caps", + "description": "Global cap rule for Venice (aggregate number of vehicles across all providers)", + "policy_id": "16e3fca1-f771-440d-9f9c-713e364ffbf5", + "provider_ids": null, + "start_date": 1562043637000, + "published_date": 1562043637000, + "end_date": null, + "prev_policies": [ + "8c3fa8e2-e0eb-4773-a52f-7aada073da46", + "eda761e0-ef67-4531-b5ff-504efc8bacb3" + ], + "rules": [ + { + "name": "Venice Beach Special Operations Zone Global Cap", + "rule_id": "81b1bc92-65b7-4434-8ada-2feeb0b7b223", + "rule_type": "count", + "geographies": [ + "e0e4a085-7a50-43e0-afa4-6792ca897c5a" + ], + "statuses": { + "available": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 750, + "value_url": "https://api.ladot.io/compliance/count/81b1bc92-65b7-4434-8ada-2feeb0b7b223" + } + ] + }, + { + "name": "LADOT Venice Global Caps", + "description": "Global cap rule for the Venice (aggregate number of vehicles across all providers)", + "policy_id": "808f7c4e-83e2-456d-9e49-655a461d393f", + "provider_ids": null, + "start_date": 1562043637000, + "end_date": null, + "published_date": 1562043637000, + "prev_policies": [ + "8c3fa8e2-e0eb-4773-a52f-7aada073da46", + "eda761e0-ef67-4531-b5ff-504efc8bacb3", + "7813bb2c-20a2-45a9-9913-2ea9b6d194d3" + ], + "rules": [ + { + "name": "Greater Venice Area Global Cap", + "rule_id": "6d8f73ed-ba12-4715-af0b-1276b32b54a4", + "rule_type": "count", + "geographies": [ + "3abf8e10-a380-45bb-bfd4-ec5b21b1b0b6" + ], + "statuses": { + "available": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 1500, + "value_url": "https://api.ladot.io/compliance/count/6d8f73ed-ba12-4715-af0b-1276b32b54a4" + } + ] + }, + { + "name": "VSOZ: Provider Caps", + "description": "LADOT Venice Special Ops Zone Provider Caps", + "policy_id": "94cd621c-bf29-430e-a0b8-9362a330b268", + "provider_ids": null, + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "VSOZ Cap", + "rule_id": "a9ce5330-323b-4ee6-b16e-21040dd5d8b2", + "rule_type": "count", + "geographies": [ + "e0e4a085-7a50-43e0-afa4-6792ca897c5a" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 150 + } + ] + }, + { + "name": "VSOZ: Drop-off Caps", + "description": "LADOT Venice Special Ops Zone Drop-off Caps", + "policy_id": "5ba40320-b187-4c51-bd52-3dad0a60f0cc", + "provider_ids": null, + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "Drop-off Caps", + "rule_id": "03f36e3b-a513-4f1c-a0bf-2fa882f25b22", + "rule_type": "count", + "geographies": [ + "6dc968c7-19f4-421c-b9d1-683dd3cdb632", + "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", + "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", + "fe9c910a-7aca-4a42-9d63-e014b3c243d7", + "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", + "c7553640-730f-4ae1-a422-68bac4b849cc", + "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", + "b539054b-541a-43b3-a182-58a0bd0958fd", + "73779ce8-e0fb-48c0-96ba-a1e7f7738279", + "aa4dc424-09e4-48f3-8471-df5186927016", + "f5f4a15d-447f-4969-aedb-a0e94ae5b183", + "456c25f0-a9ce-4ff3-8610-3cee919a3539", + "0a484e09-7a95-4e7d-86c7-a10a58268ee2", + "06b4e69e-da53-4340-8354-5a2262034657", + "b1fdf441-ce46-4f22-bb70-dd2e99df1001", + "2166b7dd-10ab-4219-9921-0d8c0f082308", + "86f9a2bd-48c8-4447-b6eb-60916da16aa1", + "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", + "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", + "8ce201f3-34d7-46a2-aed3-282fcb6938ac", + "2d7f76f0-f45e-4563-8be1-280f77b1181a", + "9912fa40-b594-492f-91d0-113a7568bb2b" + ], + "statuses": { + "available": [ + "provider_drop_off" + ] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 5 + } + ] + }, + { + "name": "VSOZ: Dropzone Caps", + "description": "LADOT Venice Special Ops Zone Drop-off Caps", + "policy_id": "ac467d72-c539-4a32-9759-69cc9dc86944", + "provider_ids": null, + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "Dropzone Caps", + "rule_id": "37308204-936a-4db0-b9b9-0fa00e9dc868", + "rule_type": "count", + "geographies": [ + "6dc968c7-19f4-421c-b9d1-683dd3cdb632", + "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", + "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", + "fe9c910a-7aca-4a42-9d63-e014b3c243d7", + "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", + "c7553640-730f-4ae1-a422-68bac4b849cc", + "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", + "b539054b-541a-43b3-a182-58a0bd0958fd", + "73779ce8-e0fb-48c0-96ba-a1e7f7738279", + "aa4dc424-09e4-48f3-8471-df5186927016", + "f5f4a15d-447f-4969-aedb-a0e94ae5b183", + "456c25f0-a9ce-4ff3-8610-3cee919a3539", + "0a484e09-7a95-4e7d-86c7-a10a58268ee2", + "06b4e69e-da53-4340-8354-5a2262034657", + "b1fdf441-ce46-4f22-bb70-dd2e99df1001", + "2166b7dd-10ab-4219-9921-0d8c0f082308", + "86f9a2bd-48c8-4447-b6eb-60916da16aa1", + "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", + "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", + "8ce201f3-34d7-46a2-aed3-282fcb6938ac", + "2d7f76f0-f45e-4563-8be1-280f77b1181a", + "9912fa40-b594-492f-91d0-113a7568bb2b" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 10 + } + ] + }, + { + "name": "VSOZ: Non-dropzone Caps", + "description": "LADOT Venice Special Ops Zone: Each Operator may deploy up to 25 vehicles outside of the 22 deployment zones.", + "policy_id": "64c1adb3-67df-4888-98ac-70598173cc21", + "provider_ids": null, + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": [ + "dd9ace3e-14c8-461b-b5e7-1326505ff176" + ], + "rules": [ + { + "name": "Valid Provider Drop Offs", + "rule_id": "e0c44896-676b-483b-8c1e-a9914ef79746", + "rule_type": "count", + "geographies": [ + "6dc968c7-19f4-421c-b9d1-683dd3cdb632", + "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", + "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", + "fe9c910a-7aca-4a42-9d63-e014b3c243d7", + "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", + "c7553640-730f-4ae1-a422-68bac4b849cc", + "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", + "b539054b-541a-43b3-a182-58a0bd0958fd", + "73779ce8-e0fb-48c0-96ba-a1e7f7738279", + "aa4dc424-09e4-48f3-8471-df5186927016", + "f5f4a15d-447f-4969-aedb-a0e94ae5b183", + "456c25f0-a9ce-4ff3-8610-3cee919a3539", + "0a484e09-7a95-4e7d-86c7-a10a58268ee2", + "06b4e69e-da53-4340-8354-5a2262034657", + "b1fdf441-ce46-4f22-bb70-dd2e99df1001", + "2166b7dd-10ab-4219-9921-0d8c0f082308", + "86f9a2bd-48c8-4447-b6eb-60916da16aa1", + "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", + "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", + "8ce201f3-34d7-46a2-aed3-282fcb6938ac", + "2d7f76f0-f45e-4563-8be1-280f77b1181a", + "9912fa40-b594-492f-91d0-113a7568bb2b" + ], + "statuses": { + "available": [ + "provider_drop_off" + ] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ] + }, + { + "name": "VSOZ Non-dropzone Caps", + "rule_id": "84e2b85e-7542-4bed-8854-203927ced318", + "rule_type": "count", + "geographies": [ + "e0e4a085-7a50-43e0-afa4-6792ca897c5a" + ], + "statuses": { + "available": [ + "provider_drop_off" + ] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 25 + } + ] + } +``` + +#### Walkthrough + +##### Abstract + +The Venice Special Operations Zone Restrictions published by LADOT !FIXME NEED LINK! specifies a series of valid drop off points within a greater overarching no-dropoff zone. + +##### Policy Design Approach + +The Venice Special Operations Zone Policy consists of two rules, first, a rule which contains geographies representing the 'valid' `provider_drop_off` zones, and a second rule which has the overarching Venice geography. During the evaluation of the policy, a set of vehicles will be provided, we'll refer to this set as `V`. The first rule will match all vehicles which have been `provider_drop_off`'d within one of the given geographies (because we provide no maximum or minimum we will default to an infinitely sized bucket), let's call this group of vehicles `v_1`. When evaluating the second rule, the vehicles which will be considered in the evaluation will be a subset `V \ v_1`. At this point, we are considering a subset which cannot have a vehicle in a valid drop off zone for this policy; and because of this, all vehicles that match with the second rule but cannot fit in its bucket will be considered in violation of the policy. + +##### Side-notes + +This is a very good example of a case where a `rule` is used for pattern matching, and a vehicle (or group of vehicles) being matched with a particular rule should not necessarily result in upstream consequences (fines, warnings, etc...). + +### Venice Beach No-Fly Zone + +``` +{ + "policy_id": "39a653be-7180-4188-b1a6-cae33c280341", + "name": "Prohibited Dockless Zones", + "description": "Prohibited areas for dockless vehicles within the City of Los Angeles for the LADOT Dockless On-Demand Personal Mobility Program", + "provider_ids": null, + "start_date": 1552678594428, + "end_date": null, + "published_date": 1552678594428, + "prev_policies": null, + "rules": [ + { + "name": "Prohibited Dockless Zones", + "rule_id": "8ad39dc3-005b-4348-9d61-c830c54c161b", + "rule_type": "count", + "geographies": [ + "c0591267-bb6a-4f28-a612-ff7f4a8f8b2a" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + } + ] +} +``` + +``` +[{ + "name": "LADOT Mobility Caps: Bird", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "99f7a469-6e3a-4981-9313-c2f6c0bbd5ce", + "provider_ids": ["2411d395-04f2-47c9-ab66-d09e9e3c3251"] + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "8a61de66-d9fa-4cba-a38d-5d948e2373fe", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 1000 + }, + { + "name": "All other DACs", + "rule_id": "0a11a5d0-06ad-45d8-b4ba-c53f24744ff5", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 2500 + }, + { + "name": "Non-DAC", + "rule_id": "57d47e74-6aef-4f41-b0c5-79bb35aa5b9d", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Bolt", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "4c1464b6-490e-4540-adbf-de7b98d8f9fd", + "provider_ids": ["3291c288-c9c8-42f1-bc3e-8502b077cd7f"] + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "5b1a8ca3-a363-4a0f-9b14-fda82f579e41", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "All other DACs", + "rule_id": "2db85564-9660-43ca-ab4a-029af75c7d29", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 250 + }, + { + "name": "Non-DAC", + "rule_id": "96169f21-4c64-4f21-9090-ab0982e909f1", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 250 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Jump", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "221efc03-c3ad-4868-b628-eef93f05e1d6", + "provider_ids": ["c20e08cf-8488-46a6-a66c-5d8fb827f7e0"], + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "734f5974-d153-4473-8eb5-e146dd38d70b", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "All other DACs (bikes)", + "rule_id": "ccd6b299-5c58-412a-ae9d-75f1e077dc1d", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle" + ], + "maximum": 1250 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "4c78e8dd-fec9-4a09-8807-b1f16a1adbbc", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "scooter" + ], + "maximum": 1250 + }, + { + "name": "Non-DAC", + "rule_id": "9680ec38-90c7-43dc-880d-4c4b9cd1f81a", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle" + ], + "maximum": 1500 + }, + { + "name": "Non-DAC", + "rule_id": "dacb5dec-ea0c-4155-bb46-7b4b392d5291", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "scooter" + ], + "maximum": 1500 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Lime", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "f09ad24a-ad0e-4fb0-8770-4fd24e06eb2c", + "provider_ids": "63f13c48-34ff-49d2-aca7-cf6a5b6171c3", + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "d7dc6e5b-cefb-4392-a87d-f990c7b1a21b", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "dc926dc9-62fb-45bf-8655-0651b59655ac", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 2500 + }, + { + "name": "Non-DAC", + "rule_id": "e659737d-e62d-45d6-8c71-ef302c355065", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Lyft", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "284a5199-365e-4b9d-b5d0-842ea7b1d4f7", + "provider_ids": ["e714f168-ce56-4b41-81b7-0b6a4bd26128"], + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "42938a11-db1e-4c38-84f8-fe4406f4b310", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 500 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "9d9e3d55-866e-47d2-a0a5-af7b62aaef68", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 500 + }, + { + "name": "Non-DAC", + "rule_id": "0dfcb73f-c4ab-40bd-bcbc-a6f3878e5350", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Sherpa", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "59f25ae6-3ec7-4642-a594-f8d2f6d97362", + "provider_ids": ["3c95765d-4da6-41c6-b61e-1954472ec6c9"], + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "56f7e527-8b91-42e9-bba3-7bc86d88f720", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 410 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "e1aae22e-8a2a-4f63-8133-f03cc3e770fe", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "Non-DAC", + "rule_id": "2fb022bc-8f6a-4ee3-9d67-50f57866119a", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 260 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Spin", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "784bb9d8-ae82-49a2-83f2-fe01c8e1bb7b", + "provider_ids": ["70aa475d-1fcd-4504-b69c-2eeb2107f7be"] + "start_date": 1558389669540, + "published_date": 1558389669540, + "end_date": null, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "05441326-d626-4817-96c5-54c046279ca6", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 5000 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "71267fb9-b319-4b0d-9544-36cc7eecbc6d", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 2500 + }, + { + "name": "Non-DAC", + "rule_id": "3a84a446-0354-4026-91cb-102d18bdf675", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Wheels", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "65207595-dfdc-4653-bc4c-7cca29f69cb7", + "provider_ids": ["b79f8687-526d-4ae6-80bf-89b4c44dc071"] + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "f60af867-9241-4f53-8cfb-4c6c807679f2", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "c046953a-6b34-4a28-992d-e993232ffaa2", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "Non-DAC", + "rule_id": "70958c50-aa35-4ac6-8905-850e97f40613", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}] +``` + +### Idle Time Example + +Idle time limits example. Scooters and bikes can be in the public right-of-way for up to three days if rentable, one day if not. + +``` +{ + "policy_id": "a2c9a65f-fd85-463e-9564-fc95ea473f7d", + "name": "Idle Times", + "description": "LADOT Idle Time Limitations", + "start_date": 1552678594428, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [{ + "name": "Greater LA (rentable)", + "rule_type": "time", + "rule_units": "hours", + "geographies": ["b4bcc213-4888-48ce-a33d-4dd6c3384bda"], + "statuses": { + "available": [], + "reserved": [] + }, + "vehicle_types": ["bicycle", "scooter"], + "maximum": 72 + }, { + "name": "Greater LA (non-rentable)", + "rule_type": "time", + "rule_units": "hours", + "geographies": ["12b3fcf5-22af-4b0d-a169-ac7ac903d3b9"], + "statuses": ["unavailable", "trip"], + "vehicle_types": ["bicycle", "scooter"], + "limit": 24 + }] +} +``` + +### Speed Limits Example + +Speed limits example. Fifteen MPH in greater LA, 10 MPH on Venice Beach on Saturday/Sunday from noon til midnight. + +``` +{ + "policy_id": "95645117-fd85-463e-a2c9-fc95ea47463e", + "name": "Speed Limits", + "description": "LADOT Pilot Speed Limit Limitations", + "start_date": 1552678594428, + "end_date": null, + "published_date": 1552678594428, + "supersedes": null, + "rules": [{ + "name": "Greater LA", + "rule_type": "speed", + "rule_units": "mph" + "geographies": ["b4bcc213-4888-48ce-a33d-4dd6c3384bda"], + "statuses": { + "trip": [] + }, + "vehicle_types": ["bicycle", "scooter"], + "maximum": 15 + }, { + "name": "Venice Beach on weekend afternoons", + "rule_type": "speed", + "rule_units": "mph", + "geographies": ["ec551174-f324-4251-bfed-28d9f3f473fc"], + "statuses": { + "trip": [] + }, + "vehicle_types": ["bicycle", "scooter"], + "days": ["sat", "sun"], + "start_time": "12:00", + "end_time": "23:59", + "maximum": 10, + "messages": { + "en-US": "Remember to stay under 10 MPH on Venice Beach on weekends!”, + "es-US": "¡Recuerda permanecer menos de 10 millas por hora en Venice Beach los fines de semana!" + }, + }] +} +``` diff --git a/geo.html b/geo.html new file mode 100644 index 000000000..205eb6acb --- /dev/null +++ b/geo.html @@ -0,0 +1 @@ +

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "The MDS Policy Schema, GET /geographies/{id} payload",
"definitions": {
"GeoJSON.Feature<GeoJSON.Geometry,{[name:string]:any;}>": {
"description": "A feature object which contains a geometry and associated properties.\nhttps://tools.ietf.org/html/rfc7946#section-3.2",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"geometry": {
"anyOf": [
{
"$ref": "#/definitions/GeoJSON.Point"
},
{
"$ref": "#/definitions/GeoJSON.MultiPoint"
},
{
"$ref": "#/definitions/GeoJSON.LineString"
},
{
"$ref": "#/definitions/GeoJSON.MultiLineString"
},
{
"$ref": "#/definitions/GeoJSON.Polygon"
},
{
"$ref": "#/definitions/GeoJSON.MultiPolygon"
},
{
"$ref": "#/definitions/GeoJSON.GeometryCollection"
}
],
"description": "The feature's geometry"
},
"id": {
"description": "A value that uniquely identifies this feature in a\nhttps://tools.ietf.org/html/rfc7946#section-3.2.",
"type": [
"string",
"number"
]
},
"properties": {
"additionalProperties": {},
"description": "Properties associated with this feature.",
"type": "object"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Feature"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.FeatureCollection<GeoJSON.Geometry,{[name:string]:any;}>": {
"description": "A collection of feature objects.\n https://tools.ietf.org/html/rfc7946#section-3.3",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"features": {
"items": {
"$ref": "#/definitions/GeoJSON.Feature<GeoJSON.Geometry,{[name:string]:any;}>"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"FeatureCollection"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.GeometryCollection": {
"description": "Geometry Collection\nhttps://tools.ietf.org/html/rfc7946#section-3.1.8",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"geometries": {
"items": {
"anyOf": [
{
"$ref": "#/definitions/GeoJSON.Point"
},
{
"$ref": "#/definitions/GeoJSON.MultiPoint"
},
{
"$ref": "#/definitions/GeoJSON.LineString"
},
{
"$ref": "#/definitions/GeoJSON.MultiLineString"
},
{
"$ref": "#/definitions/GeoJSON.Polygon"
},
{
"$ref": "#/definitions/GeoJSON.MultiPolygon"
},
{
"$ref": "#/definitions/GeoJSON.GeometryCollection"
}
]
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"GeometryCollection"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.LineString": {
"description": "LineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.4",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"LineString"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiLineString": {
"description": "MultiLineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.5",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiLineString"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiPoint": {
"description": "MultiPoint geometry object.\n https://tools.ietf.org/html/rfc7946#section-3.1.3",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiPoint"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiPolygon": {
"description": "MultiPolygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.7",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiPolygon"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.Point": {
"description": "Point geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.2",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"description": "A Position is an array of coordinates.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.1\nArray should contain between two and three elements.\nThe previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),\nbut the current specification only allows X, Y, and (optionally) Z to be defined.",
"items": {
"type": "number"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Point"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.Polygon": {
"description": "Polygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.6",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Polygon"
],
"type": "string"
}
},
"type": "object"
}
},
"properties": {
"geography_id": {
"examples": [
"3c9604d6-b5ee-11e8-96f8-529269fb1459"
],
"format": "uuid",
"pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$",
"type": "string"
},
"geography_json": {
"$ref": "#/definitions/GeoJSON.FeatureCollection<GeoJSON.Geometry,{[name:string]:any;}>"
}
},
"type": "object"
}

diff --git a/geography-author/Examples.md b/geography-author/Examples.md new file mode 100644 index 000000000..947e322b7 --- /dev/null +++ b/geography-author/Examples.md @@ -0,0 +1,1003 @@ +# Examples + +## Current LADOT Policies + +### Venice Special Operations Zone + + + +#### Raw Policy JSON + +``` +{ + "name": "LADOT Venice Beach Special Operations Zone Global Caps", + "description": "Global cap rule for Venice (aggregate number of vehicles across all providers)", + "policy_id": "16e3fca1-f771-440d-9f9c-713e364ffbf5", + "provider_ids": null, + "start_date": 1562043637000, + "published_date": 1562043637000, + "end_date": null, + "prev_policies": [ + "8c3fa8e2-e0eb-4773-a52f-7aada073da46", + "eda761e0-ef67-4531-b5ff-504efc8bacb3" + ], + "rules": [ + { + "name": "Venice Beach Special Operations Zone Global Cap", + "rule_id": "81b1bc92-65b7-4434-8ada-2feeb0b7b223", + "rule_type": "count", + "geographies": [ + "e0e4a085-7a50-43e0-afa4-6792ca897c5a" + ], + "statuses": { + "available": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 750, + "value_url": "https://api.ladot.io/compliance/count/81b1bc92-65b7-4434-8ada-2feeb0b7b223" + } + ] + }, + { + "name": "LADOT Venice Global Caps", + "description": "Global cap rule for the Venice (aggregate number of vehicles across all providers)", + "policy_id": "808f7c4e-83e2-456d-9e49-655a461d393f", + "provider_ids": null, + "start_date": 1562043637000, + "end_date": null, + "published_date": 1562043637000, + "prev_policies": [ + "8c3fa8e2-e0eb-4773-a52f-7aada073da46", + "eda761e0-ef67-4531-b5ff-504efc8bacb3", + "7813bb2c-20a2-45a9-9913-2ea9b6d194d3" + ], + "rules": [ + { + "name": "Greater Venice Area Global Cap", + "rule_id": "6d8f73ed-ba12-4715-af0b-1276b32b54a4", + "rule_type": "count", + "geographies": [ + "3abf8e10-a380-45bb-bfd4-ec5b21b1b0b6" + ], + "statuses": { + "available": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 1500, + "value_url": "https://api.ladot.io/compliance/count/6d8f73ed-ba12-4715-af0b-1276b32b54a4" + } + ] + }, + { + "name": "VSOZ: Provider Caps", + "description": "LADOT Venice Special Ops Zone Provider Caps", + "policy_id": "94cd621c-bf29-430e-a0b8-9362a330b268", + "provider_ids": null, + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "VSOZ Cap", + "rule_id": "a9ce5330-323b-4ee6-b16e-21040dd5d8b2", + "rule_type": "count", + "geographies": [ + "e0e4a085-7a50-43e0-afa4-6792ca897c5a" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 150 + } + ] + }, + { + "name": "VSOZ: Drop-off Caps", + "description": "LADOT Venice Special Ops Zone Drop-off Caps", + "policy_id": "5ba40320-b187-4c51-bd52-3dad0a60f0cc", + "provider_ids": null, + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "Drop-off Caps", + "rule_id": "03f36e3b-a513-4f1c-a0bf-2fa882f25b22", + "rule_type": "count", + "geographies": [ + "6dc968c7-19f4-421c-b9d1-683dd3cdb632", + "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", + "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", + "fe9c910a-7aca-4a42-9d63-e014b3c243d7", + "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", + "c7553640-730f-4ae1-a422-68bac4b849cc", + "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", + "b539054b-541a-43b3-a182-58a0bd0958fd", + "73779ce8-e0fb-48c0-96ba-a1e7f7738279", + "aa4dc424-09e4-48f3-8471-df5186927016", + "f5f4a15d-447f-4969-aedb-a0e94ae5b183", + "456c25f0-a9ce-4ff3-8610-3cee919a3539", + "0a484e09-7a95-4e7d-86c7-a10a58268ee2", + "06b4e69e-da53-4340-8354-5a2262034657", + "b1fdf441-ce46-4f22-bb70-dd2e99df1001", + "2166b7dd-10ab-4219-9921-0d8c0f082308", + "86f9a2bd-48c8-4447-b6eb-60916da16aa1", + "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", + "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", + "8ce201f3-34d7-46a2-aed3-282fcb6938ac", + "2d7f76f0-f45e-4563-8be1-280f77b1181a", + "9912fa40-b594-492f-91d0-113a7568bb2b" + ], + "statuses": { + "available": [ + "provider_drop_off" + ] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 5 + } + ] + }, + { + "name": "VSOZ: Dropzone Caps", + "description": "LADOT Venice Special Ops Zone Drop-off Caps", + "policy_id": "ac467d72-c539-4a32-9759-69cc9dc86944", + "provider_ids": null, + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "Dropzone Caps", + "rule_id": "37308204-936a-4db0-b9b9-0fa00e9dc868", + "rule_type": "count", + "geographies": [ + "6dc968c7-19f4-421c-b9d1-683dd3cdb632", + "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", + "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", + "fe9c910a-7aca-4a42-9d63-e014b3c243d7", + "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", + "c7553640-730f-4ae1-a422-68bac4b849cc", + "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", + "b539054b-541a-43b3-a182-58a0bd0958fd", + "73779ce8-e0fb-48c0-96ba-a1e7f7738279", + "aa4dc424-09e4-48f3-8471-df5186927016", + "f5f4a15d-447f-4969-aedb-a0e94ae5b183", + "456c25f0-a9ce-4ff3-8610-3cee919a3539", + "0a484e09-7a95-4e7d-86c7-a10a58268ee2", + "06b4e69e-da53-4340-8354-5a2262034657", + "b1fdf441-ce46-4f22-bb70-dd2e99df1001", + "2166b7dd-10ab-4219-9921-0d8c0f082308", + "86f9a2bd-48c8-4447-b6eb-60916da16aa1", + "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", + "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", + "8ce201f3-34d7-46a2-aed3-282fcb6938ac", + "2d7f76f0-f45e-4563-8be1-280f77b1181a", + "9912fa40-b594-492f-91d0-113a7568bb2b" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 10 + } + ] + }, + { + "name": "VSOZ: Non-dropzone Caps", + "description": "LADOT Venice Special Ops Zone: Each Operator may deploy up to 25 vehicles outside of the 22 deployment zones.", + "policy_id": "64c1adb3-67df-4888-98ac-70598173cc21", + "provider_ids": null, + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": [ + "dd9ace3e-14c8-461b-b5e7-1326505ff176" + ], + "rules": [ + { + "name": "Valid Provider Drop Offs", + "rule_id": "e0c44896-676b-483b-8c1e-a9914ef79746", + "rule_type": "count", + "geographies": [ + "6dc968c7-19f4-421c-b9d1-683dd3cdb632", + "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", + "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", + "fe9c910a-7aca-4a42-9d63-e014b3c243d7", + "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", + "c7553640-730f-4ae1-a422-68bac4b849cc", + "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", + "b539054b-541a-43b3-a182-58a0bd0958fd", + "73779ce8-e0fb-48c0-96ba-a1e7f7738279", + "aa4dc424-09e4-48f3-8471-df5186927016", + "f5f4a15d-447f-4969-aedb-a0e94ae5b183", + "456c25f0-a9ce-4ff3-8610-3cee919a3539", + "0a484e09-7a95-4e7d-86c7-a10a58268ee2", + "06b4e69e-da53-4340-8354-5a2262034657", + "b1fdf441-ce46-4f22-bb70-dd2e99df1001", + "2166b7dd-10ab-4219-9921-0d8c0f082308", + "86f9a2bd-48c8-4447-b6eb-60916da16aa1", + "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", + "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", + "8ce201f3-34d7-46a2-aed3-282fcb6938ac", + "2d7f76f0-f45e-4563-8be1-280f77b1181a", + "9912fa40-b594-492f-91d0-113a7568bb2b" + ], + "statuses": { + "available": [ + "provider_drop_off" + ] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ] + }, + { + "name": "VSOZ Non-dropzone Caps", + "rule_id": "84e2b85e-7542-4bed-8854-203927ced318", + "rule_type": "count", + "geographies": [ + "e0e4a085-7a50-43e0-afa4-6792ca897c5a" + ], + "statuses": { + "available": [ + "provider_drop_off" + ] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 25 + } + ] + } +``` + +#### Walkthrough + +##### Abstract + +The Venice Special Operations Zone Restrictions published by LADOT !FIXME NEED LINK! specifies a series of valid drop off points within a greater overarching no-dropoff zone. + +##### Policy Design Approach + +The Venice Special Operations Zone Policy consists of two rules, first, a rule which contains geographies representing the 'valid' `provider_drop_off` zones, and a second rule which has the overarching Venice geography. During the evaluation of the policy, a set of vehicles will be provided, we'll refer to this set as `V`. The first rule will match all vehicles which have been `provider_drop_off`'d within one of the given geographies (because we provide no maximum or minimum we will default to an infinitely sized bucket), let's call this group of vehicles `v_1`. When evaluating the second rule, the vehicles which will be considered in the evaluation will be a subset `V \ v_1`. At this point, we are considering a subset which cannot have a vehicle in a valid drop off zone for this policy; and because of this, all vehicles that match with the second rule but cannot fit in its bucket will be considered in violation of the policy. + +##### Side-notes + +This is a very good example of a case where a `rule` is used for pattern matching, and a vehicle (or group of vehicles) being matched with a particular rule should not necessarily result in upstream consequences (fines, warnings, etc...). + +### Venice Beach No-Fly Zone + +``` +{ + "policy_id": "39a653be-7180-4188-b1a6-cae33c280341", + "name": "Prohibited Dockless Zones", + "description": "Prohibited areas for dockless vehicles within the City of Los Angeles for the LADOT Dockless On-Demand Personal Mobility Program", + "provider_ids": null, + "start_date": 1552678594428, + "end_date": null, + "published_date": 1552678594428, + "prev_policies": null, + "rules": [ + { + "name": "Prohibited Dockless Zones", + "rule_id": "8ad39dc3-005b-4348-9d61-c830c54c161b", + "rule_type": "count", + "geographies": [ + "c0591267-bb6a-4f28-a612-ff7f4a8f8b2a" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + } + ] +} +``` + +``` +[{ + "name": "LADOT Mobility Caps: Bird", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "99f7a469-6e3a-4981-9313-c2f6c0bbd5ce", + "provider_ids": ["2411d395-04f2-47c9-ab66-d09e9e3c3251"] + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "8a61de66-d9fa-4cba-a38d-5d948e2373fe", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 1000 + }, + { + "name": "All other DACs", + "rule_id": "0a11a5d0-06ad-45d8-b4ba-c53f24744ff5", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 2500 + }, + { + "name": "Non-DAC", + "rule_id": "57d47e74-6aef-4f41-b0c5-79bb35aa5b9d", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Bolt", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "4c1464b6-490e-4540-adbf-de7b98d8f9fd", + "provider_ids": ["3291c288-c9c8-42f1-bc3e-8502b077cd7f"] + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "5b1a8ca3-a363-4a0f-9b14-fda82f579e41", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "All other DACs", + "rule_id": "2db85564-9660-43ca-ab4a-029af75c7d29", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 250 + }, + { + "name": "Non-DAC", + "rule_id": "96169f21-4c64-4f21-9090-ab0982e909f1", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 250 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Jump", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "221efc03-c3ad-4868-b628-eef93f05e1d6", + "provider_ids": ["c20e08cf-8488-46a6-a66c-5d8fb827f7e0"], + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "734f5974-d153-4473-8eb5-e146dd38d70b", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "All other DACs (bikes)", + "rule_id": "ccd6b299-5c58-412a-ae9d-75f1e077dc1d", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle" + ], + "maximum": 1250 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "4c78e8dd-fec9-4a09-8807-b1f16a1adbbc", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "scooter" + ], + "maximum": 1250 + }, + { + "name": "Non-DAC", + "rule_id": "9680ec38-90c7-43dc-880d-4c4b9cd1f81a", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle" + ], + "maximum": 1500 + }, + { + "name": "Non-DAC", + "rule_id": "dacb5dec-ea0c-4155-bb46-7b4b392d5291", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "scooter" + ], + "maximum": 1500 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Lime", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "f09ad24a-ad0e-4fb0-8770-4fd24e06eb2c", + "provider_ids": "63f13c48-34ff-49d2-aca7-cf6a5b6171c3", + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "d7dc6e5b-cefb-4392-a87d-f990c7b1a21b", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "dc926dc9-62fb-45bf-8655-0651b59655ac", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 2500 + }, + { + "name": "Non-DAC", + "rule_id": "e659737d-e62d-45d6-8c71-ef302c355065", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Lyft", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "284a5199-365e-4b9d-b5d0-842ea7b1d4f7", + "provider_ids": ["e714f168-ce56-4b41-81b7-0b6a4bd26128"], + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "42938a11-db1e-4c38-84f8-fe4406f4b310", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 500 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "9d9e3d55-866e-47d2-a0a5-af7b62aaef68", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 500 + }, + { + "name": "Non-DAC", + "rule_id": "0dfcb73f-c4ab-40bd-bcbc-a6f3878e5350", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Sherpa", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "59f25ae6-3ec7-4642-a594-f8d2f6d97362", + "provider_ids": ["3c95765d-4da6-41c6-b61e-1954472ec6c9"], + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "56f7e527-8b91-42e9-bba3-7bc86d88f720", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 410 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "e1aae22e-8a2a-4f63-8133-f03cc3e770fe", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "Non-DAC", + "rule_id": "2fb022bc-8f6a-4ee3-9d67-50f57866119a", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 260 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Spin", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "784bb9d8-ae82-49a2-83f2-fe01c8e1bb7b", + "provider_ids": ["70aa475d-1fcd-4504-b69c-2eeb2107f7be"] + "start_date": 1558389669540, + "published_date": 1558389669540, + "end_date": null, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "05441326-d626-4817-96c5-54c046279ca6", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 5000 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "71267fb9-b319-4b0d-9544-36cc7eecbc6d", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 2500 + }, + { + "name": "Non-DAC", + "rule_id": "3a84a446-0354-4026-91cb-102d18bdf675", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}, +{ + "name": "LADOT Mobility Caps: Wheels", + "description": "Mobility caps as described in the One-Year Permit", + "policy_id": "65207595-dfdc-4653-bc4c-7cca29f69cb7", + "provider_ids": ["b79f8687-526d-4ae6-80bf-89b4c44dc071"] + "start_date": 1558389669540, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [ + { + "name": "SFV DACs", + "rule_id": "f60af867-9241-4f53-8cfb-4c6c807679f2", + "rule_type": "count", + "geographies": [ + "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "All other DACs (scooters)", + "rule_id": "c046953a-6b34-4a28-992d-e993232ffaa2", + "rule_type": "count", + "geographies": [ + "0c444869-1674-4234-b4f3-ab5685bcf0d9" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 0 + }, + { + "name": "Non-DAC", + "rule_id": "70958c50-aa35-4ac6-8905-850e97f40613", + "rule_type": "count", + "geographies": [ + "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" + ], + "statuses": { + "available": [], + "unavailable": [], + "reserved": [], + "trip": [] + }, + "vehicle_types": [ + "bicycle", + "scooter" + ], + "maximum": 3000 + } + ] +}] +``` + +### Idle Time Example + +Idle time limits example. Scooters and bikes can be in the public right-of-way for up to three days if rentable, one day if not. + +``` +{ + "policy_id": "a2c9a65f-fd85-463e-9564-fc95ea473f7d", + "name": "Idle Times", + "description": "LADOT Idle Time Limitations", + "start_date": 1552678594428, + "end_date": null, + "published_date": 1558389669540, + "prev_policies": null, + "rules": [{ + "name": "Greater LA (rentable)", + "rule_type": "time", + "rule_units": "hours", + "geographies": ["b4bcc213-4888-48ce-a33d-4dd6c3384bda"], + "statuses": { + "available": [], + "reserved": [] + }, + "vehicle_types": ["bicycle", "scooter"], + "maximum": 72 + }, { + "name": "Greater LA (non-rentable)", + "rule_type": "time", + "rule_units": "hours", + "geographies": ["12b3fcf5-22af-4b0d-a169-ac7ac903d3b9"], + "statuses": ["unavailable", "trip"], + "vehicle_types": ["bicycle", "scooter"], + "limit": 24 + }] +} +``` + +### Speed Limits Example + +Speed limits example. Fifteen MPH in greater LA, 10 MPH on Venice Beach on Saturday/Sunday from noon til midnight. + +``` +{ + "policy_id": "95645117-fd85-463e-a2c9-fc95ea47463e", + "name": "Speed Limits", + "description": "LADOT Pilot Speed Limit Limitations", + "start_date": 1552678594428, + "end_date": null, + "published_date": 1552678594428, + "supersedes": null, + "rules": [{ + "name": "Greater LA", + "rule_type": "speed", + "rule_units": "mph" + "geographies": ["b4bcc213-4888-48ce-a33d-4dd6c3384bda"], + "statuses": { + "trip": [] + }, + "vehicle_types": ["bicycle", "scooter"], + "maximum": 15 + }, { + "name": "Venice Beach on weekend afternoons", + "rule_type": "speed", + "rule_units": "mph", + "geographies": ["ec551174-f324-4251-bfed-28d9f3f473fc"], + "statuses": { + "trip": [] + }, + "vehicle_types": ["bicycle", "scooter"], + "days": ["sat", "sun"], + "start_time": "12:00", + "end_time": "23:59", + "maximum": 10, + "messages": { + "en-US": "Remember to stay under 10 MPH on Venice Beach on weekends!”, + "es-US": "¡Recuerda permanecer menos de 10 millas por hora en Venice Beach los fines de semana!" + }, + }] +} +``` diff --git a/geography-author/README.md b/geography-author/README.md new file mode 100644 index 000000000..4f3e678ae --- /dev/null +++ b/geography-author/README.md @@ -0,0 +1,195 @@ +# Mobility Data Specification: Geography Author + +This specification contains a collection of RESTful APIs used to define how to create, update, delete, publish, and read +a Geography or collection thereof. + +- Authors: LADOT +- Date: 21 February 2020 +- Version: beta + +## Table of Contents + +- [Audience](#audience) +- [Background](#background) +- [Distribution](#distribution) +- [Schema](#schema) +- [File Format](#file-format) +- [Endpoints](#endpoints) + + + + +## Background + +The main intended clients of this API are the Policy, Policy Author, and Jurisdiction services. A Policy object may require +a geofence to function properly. A Jurisdiction is by definition a collection of Geography objects. + +Geographical data will be stored as GeoJSON and read from either `geographies.json` or the `/geographies` endpoint, referenced by UUID. + +A Geography may also have an associated GeographyMetadata. To link a Geography to a GeographyMetadata, both objects must have the same UUID. + +A Geography is mutable up until the point it is published, at which point, it becomes immutable. + + + +## Scoping and how it relates to Geography status + +Since an unpublished Geography may not be ready for viewing by a broader audience, unlike published geographies, it requires a narrower audience. The Geography Author Service must implement two read scopes: `geographies:read:published` and `geographies:read:unpublished`. The `geographies:read:unpublished` scope is meant to supersede the `geographies:read:published` scope. A user that has only the `geographies:read:published` scope must be restricted to reading only published geographies. A user that has the `geographies:read:unpublished` scope should be able to read both published and unpublished geographies. GeographyMetada is likewise restricted. + + + +## Schema + + + +### Geography Fields + +| Name | Type | R/O | Description | +| ---------------- | --------- | --- | ----------------------------------------------------------------------------------- | +| `name` | String | R | Name of geography | +| `description` | String | O | Detailed description of geography | +| `geography_id` | UUID | R | Unique ID of geography | +| `geography_json` | UUID | R | The GeoJSON that defines the geographical coordinates. +| `effective_date` | timestamp | O | `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. +| `publish_date` | timestamp | R | Timestamp that the policy was published, i.e. made immutable | +| `prev_geographies` | UUID[] | O | Unique IDs of prior geographies replaced by this one | + + + + +### GeographyMetadata Fields + +| Name | Type | R/O | Description | +| ---------------- | --------- | --- | ----------------------------------------------------------------------------------- | +| `geography_id` | UUID | R | Unique ID of geography | +| `geography_metadata` | JSON | R | An JSON blob that stores arbitrary data about the geography referenced. Keys must be strings. + + + +## File format + +To use flat files rather than REST endpoints, Geography objects should be stored in `geographies.json`. The `geographies.json` file will look like the output of `GET /geographies`. Examples are as follows: + +``` + +Example `geographies.json` +``` +{ + "version": "0.4.0", + "updated:" "1570035222868", + "geographies": [ + { + // GeoJSON 1 + }, + { + // GeoJSON 2 + } + ] +} +``` +``` + + +_Note: A simple tool to validate `geographies.json` will be contributed to the Open Mobility Foundation._ + + + +## REST Endpoints + +The Geography Author API consists of the following endpoints: + +### GET /geographies/:geography_id + +Parameters: + +None. + +Returns: A single Geography. + +Response codes: +- 200 - success +- 401 - unauthorized +- 404 - no geography found +- 403 - user is attempting to read an unpublished geography, but only has the `geographies:read:published` scope. + + +### GET /geographies +Parameters: + +| Name | Type | R/O | Description | +| ------------ | --------- | --- | ---------------------------------------------- | +| `get_published` | string | O | Filter for published geographies. | +| `get_unpublished` | string | O | Filter for unpublished geographies | +| `summary` | string | O | Return geographies, minus the GeoJSON in each geography object | + +Returns: All geography objects, unless either `get_published` or `get_unpublished` was supplied. If both parameters have been supplied, that is an invalid query. If a user does not supply `get_unpublished` but has only the `geographies:read:published` scope, unpublished geographies will be silently filtered out. If a user explicitly requests unpublished geographies without the `geographies:read:unpublished` scope, a 403 will be thrown. +Response codes: +- 200 - success +- 400 - bad query (most likely both `get_published` and `get_unpublished` were both set) +- 401 - unauthorized +- 404 - no geography found +- 403 - user is attempting to read an unpublished geography, but only has the `geographies:read:published` scope. + + +### POST /geographies +To create a geography, POST a Geography in the request body to `/geographies`. + +Response codes: +- 200 - success +- 401 - unauthorized +- 409 - a Geography with the same UUID already exists on the server` + +### PUT /geographies/:geography_id +To edit a geography, PUT a Geography in the request body to this endpoint. + +Response codes: +- 201 - success +- 401 - unauthorized +- 404 - no Geography with this UUID was found on the server + +### DELETE /geographies/:geography_id +This will automatically delete any associated metadata as well. + +Response codes: +- 200 - success +- 405 - Cannot delete a published geography +- 404 - no Geography with this UUID was found on the server + +### PUT /geographies/:geography_id/publish + +Response codes: +- 201 - success +- 401 - unauthorized +- 404 - no Geography with this UUID was found on the server + +### GET /geographies/:geography_id/meta + +Response codes: +- 200 - success +- 401 - unauthorized +- 403 - user lacking `geographies:read:unpublished` attempted to read an unpublished Geography's metadata +- 404 - no Geography with this UUID was found on the server + +### GET /geographies/meta +This behaves just like `GET /geographies`. +Parameters: + +| Name | Type | R/O | Description | +| ------------ | --------- | --- | ---------------------------------------------- | +| `get_published` | string | O | Filter for published geography's metadata. | +| `get_unpublished` | string | O | Filter for unpublished geography's metadata | + +Response codes: +- 200 - success +- 400 - bad query (most likely both `get_published` and `get_unpublished` were both set) +- 401 - unauthorized +- 403 - user lacking `geographies:read:unpublished` attempted to read an unpublished Geography's metadata +- 404 - no Geography with this UUID was found on the server + +### PUT /geographies/:geography_id/meta +Create or edit a geography metadata. The metadata must be in the request body. + +Response codes: +- 201 - success +- 401 - unauthorized +- 404 - no Geography with this UUID was found on the server, metadata cannot be written diff --git a/geography-author/geo.html b/geography-author/geo.html new file mode 100644 index 000000000..205eb6acb --- /dev/null +++ b/geography-author/geo.html @@ -0,0 +1 @@ +

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "The MDS Policy Schema, GET /geographies/{id} payload",
"definitions": {
"GeoJSON.Feature<GeoJSON.Geometry,{[name:string]:any;}>": {
"description": "A feature object which contains a geometry and associated properties.\nhttps://tools.ietf.org/html/rfc7946#section-3.2",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"geometry": {
"anyOf": [
{
"$ref": "#/definitions/GeoJSON.Point"
},
{
"$ref": "#/definitions/GeoJSON.MultiPoint"
},
{
"$ref": "#/definitions/GeoJSON.LineString"
},
{
"$ref": "#/definitions/GeoJSON.MultiLineString"
},
{
"$ref": "#/definitions/GeoJSON.Polygon"
},
{
"$ref": "#/definitions/GeoJSON.MultiPolygon"
},
{
"$ref": "#/definitions/GeoJSON.GeometryCollection"
}
],
"description": "The feature's geometry"
},
"id": {
"description": "A value that uniquely identifies this feature in a\nhttps://tools.ietf.org/html/rfc7946#section-3.2.",
"type": [
"string",
"number"
]
},
"properties": {
"additionalProperties": {},
"description": "Properties associated with this feature.",
"type": "object"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Feature"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.FeatureCollection<GeoJSON.Geometry,{[name:string]:any;}>": {
"description": "A collection of feature objects.\n https://tools.ietf.org/html/rfc7946#section-3.3",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"features": {
"items": {
"$ref": "#/definitions/GeoJSON.Feature<GeoJSON.Geometry,{[name:string]:any;}>"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"FeatureCollection"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.GeometryCollection": {
"description": "Geometry Collection\nhttps://tools.ietf.org/html/rfc7946#section-3.1.8",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"geometries": {
"items": {
"anyOf": [
{
"$ref": "#/definitions/GeoJSON.Point"
},
{
"$ref": "#/definitions/GeoJSON.MultiPoint"
},
{
"$ref": "#/definitions/GeoJSON.LineString"
},
{
"$ref": "#/definitions/GeoJSON.MultiLineString"
},
{
"$ref": "#/definitions/GeoJSON.Polygon"
},
{
"$ref": "#/definitions/GeoJSON.MultiPolygon"
},
{
"$ref": "#/definitions/GeoJSON.GeometryCollection"
}
]
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"GeometryCollection"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.LineString": {
"description": "LineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.4",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"LineString"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiLineString": {
"description": "MultiLineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.5",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiLineString"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiPoint": {
"description": "MultiPoint geometry object.\n https://tools.ietf.org/html/rfc7946#section-3.1.3",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiPoint"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiPolygon": {
"description": "MultiPolygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.7",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiPolygon"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.Point": {
"description": "Point geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.2",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"description": "A Position is an array of coordinates.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.1\nArray should contain between two and three elements.\nThe previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),\nbut the current specification only allows X, Y, and (optionally) Z to be defined.",
"items": {
"type": "number"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Point"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.Polygon": {
"description": "Polygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.6",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Polygon"
],
"type": "string"
}
},
"type": "object"
}
},
"properties": {
"geography_id": {
"examples": [
"3c9604d6-b5ee-11e8-96f8-529269fb1459"
],
"format": "uuid",
"pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$",
"type": "string"
},
"geography_json": {
"$ref": "#/definitions/GeoJSON.FeatureCollection<GeoJSON.Geometry,{[name:string]:any;}>"
}
},
"type": "object"
}

diff --git a/geography-author/get_geography.json b/geography-author/get_geography.json new file mode 100644 index 000000000..83a5e2f68 --- /dev/null +++ b/geography-author/get_geography.json @@ -0,0 +1,1038 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "The MDS Geography Author Schema, GET /geographies/{id} payload", + "definitions": { + "GeoJSON.Feature": { + "description": "A feature object which contains a geometry and associated properties.\nhttps://tools.ietf.org/html/rfc7946#section-3.2", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "geometry": { + "anyOf": [ + { + "$ref": "#/definitions/GeoJSON.Point" + }, + { + "$ref": "#/definitions/GeoJSON.MultiPoint" + }, + { + "$ref": "#/definitions/GeoJSON.LineString" + }, + { + "$ref": "#/definitions/GeoJSON.MultiLineString" + }, + { + "$ref": "#/definitions/GeoJSON.Polygon" + }, + { + "$ref": "#/definitions/GeoJSON.MultiPolygon" + }, + { + "$ref": "#/definitions/GeoJSON.GeometryCollection" + } + ], + "description": "The feature's geometry" + }, + "id": { + "description": "A value that uniquely identifies this feature in a\nhttps://tools.ietf.org/html/rfc7946#section-3.2.", + "type": [ + "string", + "number" + ] + }, + "properties": { + "additionalProperties": {}, + "description": "Properties associated with this feature.", + "type": "object" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "Feature" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.FeatureCollection": { + "description": "A collection of feature objects.\n https://tools.ietf.org/html/rfc7946#section-3.3", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "features": { + "items": { + "$ref": "#/definitions/GeoJSON.Feature" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "FeatureCollection" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.GeometryCollection": { + "description": "Geometry Collection\nhttps://tools.ietf.org/html/rfc7946#section-3.1.8", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "geometries": { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/GeoJSON.Point" + }, + { + "$ref": "#/definitions/GeoJSON.MultiPoint" + }, + { + "$ref": "#/definitions/GeoJSON.LineString" + }, + { + "$ref": "#/definitions/GeoJSON.MultiLineString" + }, + { + "$ref": "#/definitions/GeoJSON.Polygon" + }, + { + "$ref": "#/definitions/GeoJSON.MultiPolygon" + }, + { + "$ref": "#/definitions/GeoJSON.GeometryCollection" + } + ] + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "GeometryCollection" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.LineString": { + "description": "LineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.4", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "LineString" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.MultiLineString": { + "description": "MultiLineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.5", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "MultiLineString" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.MultiPoint": { + "description": "MultiPoint geometry object.\n https://tools.ietf.org/html/rfc7946#section-3.1.3", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "MultiPoint" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.MultiPolygon": { + "description": "MultiPolygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.7", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "MultiPolygon" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.Point": { + "description": "Point geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.2", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "description": "A Position is an array of coordinates.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.1\nArray should contain between two and three elements.\nThe previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),\nbut the current specification only allows X, Y, and (optionally) Z to be defined.", + "items": { + "type": "number" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "Point" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.Polygon": { + "description": "Polygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.6", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "Polygon" + ], + "type": "string" + } + }, + "type": "object" + } + }, + "properties": { + "geography_id": { + "examples": [ + "3c9604d6-b5ee-11e8-96f8-529269fb1459" + ], + "format": "uuid", + "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$", + "type": "string" + }, + "geography_json": { + "$ref": "#/definitions/GeoJSON.FeatureCollection" + } + }, + "type": "object" +} diff --git a/get_geography.json b/get_geography.json new file mode 100644 index 000000000..83a5e2f68 --- /dev/null +++ b/get_geography.json @@ -0,0 +1,1038 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "The MDS Geography Author Schema, GET /geographies/{id} payload", + "definitions": { + "GeoJSON.Feature": { + "description": "A feature object which contains a geometry and associated properties.\nhttps://tools.ietf.org/html/rfc7946#section-3.2", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "geometry": { + "anyOf": [ + { + "$ref": "#/definitions/GeoJSON.Point" + }, + { + "$ref": "#/definitions/GeoJSON.MultiPoint" + }, + { + "$ref": "#/definitions/GeoJSON.LineString" + }, + { + "$ref": "#/definitions/GeoJSON.MultiLineString" + }, + { + "$ref": "#/definitions/GeoJSON.Polygon" + }, + { + "$ref": "#/definitions/GeoJSON.MultiPolygon" + }, + { + "$ref": "#/definitions/GeoJSON.GeometryCollection" + } + ], + "description": "The feature's geometry" + }, + "id": { + "description": "A value that uniquely identifies this feature in a\nhttps://tools.ietf.org/html/rfc7946#section-3.2.", + "type": [ + "string", + "number" + ] + }, + "properties": { + "additionalProperties": {}, + "description": "Properties associated with this feature.", + "type": "object" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "Feature" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.FeatureCollection": { + "description": "A collection of feature objects.\n https://tools.ietf.org/html/rfc7946#section-3.3", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "features": { + "items": { + "$ref": "#/definitions/GeoJSON.Feature" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "FeatureCollection" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.GeometryCollection": { + "description": "Geometry Collection\nhttps://tools.ietf.org/html/rfc7946#section-3.1.8", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "geometries": { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/GeoJSON.Point" + }, + { + "$ref": "#/definitions/GeoJSON.MultiPoint" + }, + { + "$ref": "#/definitions/GeoJSON.LineString" + }, + { + "$ref": "#/definitions/GeoJSON.MultiLineString" + }, + { + "$ref": "#/definitions/GeoJSON.Polygon" + }, + { + "$ref": "#/definitions/GeoJSON.MultiPolygon" + }, + { + "$ref": "#/definitions/GeoJSON.GeometryCollection" + } + ] + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "GeometryCollection" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.LineString": { + "description": "LineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.4", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "LineString" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.MultiLineString": { + "description": "MultiLineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.5", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "MultiLineString" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.MultiPoint": { + "description": "MultiPoint geometry object.\n https://tools.ietf.org/html/rfc7946#section-3.1.3", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "MultiPoint" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.MultiPolygon": { + "description": "MultiPolygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.7", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "MultiPolygon" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.Point": { + "description": "Point geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.2", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "description": "A Position is an array of coordinates.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.1\nArray should contain between two and three elements.\nThe previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),\nbut the current specification only allows X, Y, and (optionally) Z to be defined.", + "items": { + "type": "number" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "Point" + ], + "type": "string" + } + }, + "type": "object" + }, + "GeoJSON.Polygon": { + "description": "Polygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.6", + "properties": { + "bbox": { + "anyOf": [ + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 4, + "type": "array" + }, + { + "additionalItems": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ] + }, + "items": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "number" + } + ], + "minItems": 6, + "type": "array" + } + ], + "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" + }, + "coordinates": { + "items": { + "items": { + "items": { + "type": "number" + }, + "type": "array" + }, + "type": "array" + }, + "type": "array" + }, + "type": { + "description": "Specifies the type of GeoJSON object.", + "enum": [ + "Polygon" + ], + "type": "string" + } + }, + "type": "object" + } + }, + "properties": { + "geography_id": { + "examples": [ + "3c9604d6-b5ee-11e8-96f8-529269fb1459" + ], + "format": "uuid", + "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$", + "type": "string" + }, + "geography_json": { + "$ref": "#/definitions/GeoJSON.FeatureCollection" + } + }, + "type": "object" +} From 54424c3755c5d4db747624300863c930de11ec1e Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Thu, 12 Mar 2020 00:14:14 -0400 Subject: [PATCH 02/11] Removing extraneous files. --- geo.html | 1 - get_geography.json | 1038 -------------------------------------------- 2 files changed, 1039 deletions(-) delete mode 100644 geo.html delete mode 100644 get_geography.json diff --git a/geo.html b/geo.html deleted file mode 100644 index 205eb6acb..000000000 --- a/geo.html +++ /dev/null @@ -1 +0,0 @@ -

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "The MDS Policy Schema, GET /geographies/{id} payload",
"definitions": {
"GeoJSON.Feature<GeoJSON.Geometry,{[name:string]:any;}>": {
"description": "A feature object which contains a geometry and associated properties.\nhttps://tools.ietf.org/html/rfc7946#section-3.2",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"geometry": {
"anyOf": [
{
"$ref": "#/definitions/GeoJSON.Point"
},
{
"$ref": "#/definitions/GeoJSON.MultiPoint"
},
{
"$ref": "#/definitions/GeoJSON.LineString"
},
{
"$ref": "#/definitions/GeoJSON.MultiLineString"
},
{
"$ref": "#/definitions/GeoJSON.Polygon"
},
{
"$ref": "#/definitions/GeoJSON.MultiPolygon"
},
{
"$ref": "#/definitions/GeoJSON.GeometryCollection"
}
],
"description": "The feature's geometry"
},
"id": {
"description": "A value that uniquely identifies this feature in a\nhttps://tools.ietf.org/html/rfc7946#section-3.2.",
"type": [
"string",
"number"
]
},
"properties": {
"additionalProperties": {},
"description": "Properties associated with this feature.",
"type": "object"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Feature"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.FeatureCollection<GeoJSON.Geometry,{[name:string]:any;}>": {
"description": "A collection of feature objects.\n https://tools.ietf.org/html/rfc7946#section-3.3",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"features": {
"items": {
"$ref": "#/definitions/GeoJSON.Feature<GeoJSON.Geometry,{[name:string]:any;}>"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"FeatureCollection"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.GeometryCollection": {
"description": "Geometry Collection\nhttps://tools.ietf.org/html/rfc7946#section-3.1.8",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"geometries": {
"items": {
"anyOf": [
{
"$ref": "#/definitions/GeoJSON.Point"
},
{
"$ref": "#/definitions/GeoJSON.MultiPoint"
},
{
"$ref": "#/definitions/GeoJSON.LineString"
},
{
"$ref": "#/definitions/GeoJSON.MultiLineString"
},
{
"$ref": "#/definitions/GeoJSON.Polygon"
},
{
"$ref": "#/definitions/GeoJSON.MultiPolygon"
},
{
"$ref": "#/definitions/GeoJSON.GeometryCollection"
}
]
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"GeometryCollection"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.LineString": {
"description": "LineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.4",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"LineString"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiLineString": {
"description": "MultiLineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.5",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiLineString"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiPoint": {
"description": "MultiPoint geometry object.\n https://tools.ietf.org/html/rfc7946#section-3.1.3",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiPoint"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiPolygon": {
"description": "MultiPolygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.7",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiPolygon"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.Point": {
"description": "Point geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.2",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"description": "A Position is an array of coordinates.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.1\nArray should contain between two and three elements.\nThe previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),\nbut the current specification only allows X, Y, and (optionally) Z to be defined.",
"items": {
"type": "number"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Point"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.Polygon": {
"description": "Polygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.6",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Polygon"
],
"type": "string"
}
},
"type": "object"
}
},
"properties": {
"geography_id": {
"examples": [
"3c9604d6-b5ee-11e8-96f8-529269fb1459"
],
"format": "uuid",
"pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$",
"type": "string"
},
"geography_json": {
"$ref": "#/definitions/GeoJSON.FeatureCollection<GeoJSON.Geometry,{[name:string]:any;}>"
}
},
"type": "object"
}

diff --git a/get_geography.json b/get_geography.json deleted file mode 100644 index 83a5e2f68..000000000 --- a/get_geography.json +++ /dev/null @@ -1,1038 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "The MDS Geography Author Schema, GET /geographies/{id} payload", - "definitions": { - "GeoJSON.Feature": { - "description": "A feature object which contains a geometry and associated properties.\nhttps://tools.ietf.org/html/rfc7946#section-3.2", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "geometry": { - "anyOf": [ - { - "$ref": "#/definitions/GeoJSON.Point" - }, - { - "$ref": "#/definitions/GeoJSON.MultiPoint" - }, - { - "$ref": "#/definitions/GeoJSON.LineString" - }, - { - "$ref": "#/definitions/GeoJSON.MultiLineString" - }, - { - "$ref": "#/definitions/GeoJSON.Polygon" - }, - { - "$ref": "#/definitions/GeoJSON.MultiPolygon" - }, - { - "$ref": "#/definitions/GeoJSON.GeometryCollection" - } - ], - "description": "The feature's geometry" - }, - "id": { - "description": "A value that uniquely identifies this feature in a\nhttps://tools.ietf.org/html/rfc7946#section-3.2.", - "type": [ - "string", - "number" - ] - }, - "properties": { - "additionalProperties": {}, - "description": "Properties associated with this feature.", - "type": "object" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "Feature" - ], - "type": "string" - } - }, - "type": "object" - }, - "GeoJSON.FeatureCollection": { - "description": "A collection of feature objects.\n https://tools.ietf.org/html/rfc7946#section-3.3", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "features": { - "items": { - "$ref": "#/definitions/GeoJSON.Feature" - }, - "type": "array" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "FeatureCollection" - ], - "type": "string" - } - }, - "type": "object" - }, - "GeoJSON.GeometryCollection": { - "description": "Geometry Collection\nhttps://tools.ietf.org/html/rfc7946#section-3.1.8", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "geometries": { - "items": { - "anyOf": [ - { - "$ref": "#/definitions/GeoJSON.Point" - }, - { - "$ref": "#/definitions/GeoJSON.MultiPoint" - }, - { - "$ref": "#/definitions/GeoJSON.LineString" - }, - { - "$ref": "#/definitions/GeoJSON.MultiLineString" - }, - { - "$ref": "#/definitions/GeoJSON.Polygon" - }, - { - "$ref": "#/definitions/GeoJSON.MultiPolygon" - }, - { - "$ref": "#/definitions/GeoJSON.GeometryCollection" - } - ] - }, - "type": "array" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "GeometryCollection" - ], - "type": "string" - } - }, - "type": "object" - }, - "GeoJSON.LineString": { - "description": "LineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.4", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "coordinates": { - "items": { - "items": { - "type": "number" - }, - "type": "array" - }, - "type": "array" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "LineString" - ], - "type": "string" - } - }, - "type": "object" - }, - "GeoJSON.MultiLineString": { - "description": "MultiLineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.5", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "coordinates": { - "items": { - "items": { - "items": { - "type": "number" - }, - "type": "array" - }, - "type": "array" - }, - "type": "array" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "MultiLineString" - ], - "type": "string" - } - }, - "type": "object" - }, - "GeoJSON.MultiPoint": { - "description": "MultiPoint geometry object.\n https://tools.ietf.org/html/rfc7946#section-3.1.3", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "coordinates": { - "items": { - "items": { - "type": "number" - }, - "type": "array" - }, - "type": "array" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "MultiPoint" - ], - "type": "string" - } - }, - "type": "object" - }, - "GeoJSON.MultiPolygon": { - "description": "MultiPolygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.7", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "coordinates": { - "items": { - "items": { - "items": { - "items": { - "type": "number" - }, - "type": "array" - }, - "type": "array" - }, - "type": "array" - }, - "type": "array" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "MultiPolygon" - ], - "type": "string" - } - }, - "type": "object" - }, - "GeoJSON.Point": { - "description": "Point geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.2", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "coordinates": { - "description": "A Position is an array of coordinates.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.1\nArray should contain between two and three elements.\nThe previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),\nbut the current specification only allows X, Y, and (optionally) Z to be defined.", - "items": { - "type": "number" - }, - "type": "array" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "Point" - ], - "type": "string" - } - }, - "type": "object" - }, - "GeoJSON.Polygon": { - "description": "Polygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.6", - "properties": { - "bbox": { - "anyOf": [ - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 4, - "type": "array" - }, - { - "additionalItems": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ] - }, - "items": [ - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - }, - { - "type": "number" - } - ], - "minItems": 6, - "type": "array" - } - ], - "description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5" - }, - "coordinates": { - "items": { - "items": { - "items": { - "type": "number" - }, - "type": "array" - }, - "type": "array" - }, - "type": "array" - }, - "type": { - "description": "Specifies the type of GeoJSON object.", - "enum": [ - "Polygon" - ], - "type": "string" - } - }, - "type": "object" - } - }, - "properties": { - "geography_id": { - "examples": [ - "3c9604d6-b5ee-11e8-96f8-529269fb1459" - ], - "format": "uuid", - "pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$", - "type": "string" - }, - "geography_json": { - "$ref": "#/definitions/GeoJSON.FeatureCollection" - } - }, - "type": "object" -} From 996eb29dac28f5f3fc5b05847127fb22ca711b03 Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Thu, 12 Mar 2020 00:43:12 -0400 Subject: [PATCH 03/11] Updating README --- geography-author/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/geography-author/README.md b/geography-author/README.md index 4f3e678ae..4c041cbf0 100644 --- a/geography-author/README.md +++ b/geography-author/README.md @@ -1,7 +1,6 @@ # Mobility Data Specification: Geography Author -This specification contains a collection of RESTful APIs used to define how to create, update, delete, publish, and read -a Geography or collection thereof. +This specification contains a collection of RESTful APIs used to define how to create, update, delete, publish, and read Geographies and GeographyMetadata. - Authors: LADOT - Date: 21 February 2020 From 28df0bf483c828807a5306736367acf1f579b3de Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Tue, 14 Apr 2020 21:59:09 -0400 Subject: [PATCH 04/11] Adding minor note for expected response body and content header versioning. --- geography-author/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geography-author/README.md b/geography-author/README.md index 4c041cbf0..4acec308e 100644 --- a/geography-author/README.md +++ b/geography-author/README.md @@ -95,6 +95,8 @@ _Note: A simple tool to validate `geographies.json` will be contributed to the O ## REST Endpoints +Responses must set the `Content-Type` header, as specified in the [Provider versioning](../provider/README.md#versioning) section. They must also specify the API version in the JSON-formatted response body, under the `version` key. + The Geography Author API consists of the following endpoints: ### GET /geographies/:geography_id From bc6f7233fafcf2067fb43781d8baf232b2ea145c Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 29 Apr 2020 19:22:51 -0400 Subject: [PATCH 05/11] Minor feedback on wording. --- geography-author/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/geography-author/README.md b/geography-author/README.md index 4acec308e..f0a9e9680 100644 --- a/geography-author/README.md +++ b/geography-author/README.md @@ -20,10 +20,9 @@ This specification contains a collection of RESTful APIs used to define how to c ## Background -The main intended clients of this API are the Policy, Policy Author, and Jurisdiction services. A Policy object may require -a geofence to function properly. A Jurisdiction is by definition a collection of Geography objects. +The main intended consumers of Geography objects are the Policy, Policy Author, and Jurisdiction services. A Policy object may require a geofence to function properly. A Jurisdiction is by definition a collection of Geography objects. These services may read and write Geography objects through making calls to an implementation of the following REST API, but it is not necessary to do so. -Geographical data will be stored as GeoJSON and read from either `geographies.json` or the `/geographies` endpoint, referenced by UUID. +Geographical data will be stored as a GeoJSON FeatureCollection and read from either `geographies.json` or the `/geographies` endpoint, referenced by UUID. A Geography may also have an associated GeographyMetadata. To link a Geography to a GeographyMetadata, both objects must have the same UUID. @@ -48,7 +47,7 @@ Since an unpublished Geography may not be ready for viewing by a broader audienc | `name` | String | R | Name of geography | | `description` | String | O | Detailed description of geography | | `geography_id` | UUID | R | Unique ID of geography | -| `geography_json` | UUID | R | The GeoJSON that defines the geographical coordinates. +| `geography_json` | UUID | R | The GeoJSON FeatureCollection that defines the geographical coordinates. | `effective_date` | timestamp | O | `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. | `publish_date` | timestamp | R | Timestamp that the policy was published, i.e. made immutable | | `prev_geographies` | UUID[] | O | Unique IDs of prior geographies replaced by this one | From 51b752a6d05584f261d35f91a7c732d54a71c38a Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Fri, 15 May 2020 00:03:55 -0400 Subject: [PATCH 06/11] Removing redundant background info. --- geography-author/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/geography-author/README.md b/geography-author/README.md index f0a9e9680..0a46272a0 100644 --- a/geography-author/README.md +++ b/geography-author/README.md @@ -20,11 +20,7 @@ This specification contains a collection of RESTful APIs used to define how to c ## Background -The main intended consumers of Geography objects are the Policy, Policy Author, and Jurisdiction services. A Policy object may require a geofence to function properly. A Jurisdiction is by definition a collection of Geography objects. These services may read and write Geography objects through making calls to an implementation of the following REST API, but it is not necessary to do so. - -Geographical data will be stored as a GeoJSON FeatureCollection and read from either `geographies.json` or the `/geographies` endpoint, referenced by UUID. - -A Geography may also have an associated GeographyMetadata. To link a Geography to a GeographyMetadata, both objects must have the same UUID. +The Geography Author service is intended to define the write endpoints relevant to Geographies. Read-only endpoints are covered in the Geography service. This service is also intended to provide a specification for managing GeographyMetadata. For more background information, see the Geography spec. A Geography is mutable up until the point it is published, at which point, it becomes immutable. From 5fb71a46240774cf02ab244beaf96aaf050e31e9 Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Fri, 15 May 2020 00:24:47 -0400 Subject: [PATCH 07/11] Better structure --- geography-author/README.md | 77 ++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/geography-author/README.md b/geography-author/README.md index 0a46272a0..8f7e5fee7 100644 --- a/geography-author/README.md +++ b/geography-author/README.md @@ -22,8 +22,6 @@ This specification contains a collection of RESTful APIs used to define how to c The Geography Author service is intended to define the write endpoints relevant to Geographies. Read-only endpoints are covered in the Geography service. This service is also intended to provide a specification for managing GeographyMetadata. For more background information, see the Geography spec. -A Geography is mutable up until the point it is published, at which point, it becomes immutable. - ## Scoping and how it relates to Geography status @@ -94,49 +92,24 @@ Responses must set the `Content-Type` header, as specified in the [Provider vers The Geography Author API consists of the following endpoints: -### GET /geographies/:geography_id - -Parameters: - -None. - -Returns: A single Geography. - -Response codes: -- 200 - success -- 401 - unauthorized -- 404 - no geography found -- 403 - user is attempting to read an unpublished geography, but only has the `geographies:read:published` scope. - - -### GET /geographies -Parameters: - -| Name | Type | R/O | Description | -| ------------ | --------- | --- | ---------------------------------------------- | -| `get_published` | string | O | Filter for published geographies. | -| `get_unpublished` | string | O | Filter for unpublished geographies | -| `summary` | string | O | Return geographies, minus the GeoJSON in each geography object | - -Returns: All geography objects, unless either `get_published` or `get_unpublished` was supplied. If both parameters have been supplied, that is an invalid query. If a user does not supply `get_unpublished` but has only the `geographies:read:published` scope, unpublished geographies will be silently filtered out. If a user explicitly requests unpublished geographies without the `geographies:read:unpublished` scope, a 403 will be thrown. -Response codes: -- 200 - success -- 400 - bad query (most likely both `get_published` and `get_unpublished` were both set) -- 401 - unauthorized -- 404 - no geography found -- 403 - user is attempting to read an unpublished geography, but only has the `geographies:read:published` scope. - ### POST /geographies To create a geography, POST a Geography in the request body to `/geographies`. Response codes: -- 200 - success +- 201 - success - 401 - unauthorized - 409 - a Geography with the same UUID already exists on the server` ### PUT /geographies/:geography_id -To edit a geography, PUT a Geography in the request body to this endpoint. +#### Path Parameters + +| Name | Type | R/O | Description | +| ------------- | ------------------------------------------------------------- | --- | --------------------------------------------------- | +| geography_id | [UUID](../common/DataDefinitions.md#unique-identifiers-uuids) | R | Unique identifier for a single specific Geography. | + +#### Body Parameters +Submit a Geography object in the body of the request. Response codes: - 201 - success @@ -145,6 +118,12 @@ Response codes: ### DELETE /geographies/:geography_id This will automatically delete any associated metadata as well. +#### Path Parameters + +| Name | Type | R/O | Description | +| ------------- | ------------------------------------------------------------- | --- | --------------------------------------------------- | +| geography_id | [UUID](../common/DataDefinitions.md#unique-identifiers-uuids) | R | Unique identifier for a single specific Geography. | + Response codes: - 200 - success @@ -152,6 +131,11 @@ Response codes: - 404 - no Geography with this UUID was found on the server ### PUT /geographies/:geography_id/publish +#### Path Parameters + +| Name | Type | R/O | Description | +| ------------- | ------------------------------------------------------------- | --- | --------------------------------------------------- | +| geography_id | [UUID](../common/DataDefinitions.md#unique-identifiers-uuids) | R | Unique identifier for a single specific Geography. | Response codes: - 201 - success @@ -159,6 +143,24 @@ Response codes: - 404 - no Geography with this UUID was found on the server ### GET /geographies/:geography_id/meta +Returns a GeographyMetadata object. + +#### Path Parameters + +| Name | Type | R/O | Description | +| ------------- | ------------------------------------------------------------- | --- | --------------------------------------------------- | +| geography_id | [UUID](../common/DataDefinitions.md#unique-identifiers-uuids) | R | Unique identifier for a single specific Geography. | + +Response body format: +```js +{ + version: '0.1.0', + geography_metadata: { + geography_id: UUID, + geography_metadata: JSON + } +} +``` Response codes: - 200 - success @@ -168,7 +170,8 @@ Response codes: ### GET /geographies/meta This behaves just like `GET /geographies`. -Parameters: + +#### Query String Parameters | Name | Type | R/O | Description | | ------------ | --------- | --- | ---------------------------------------------- | From 01ef5faa5f3e8b9753bcc393194ce1d7559d244a Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 1 Jun 2022 16:53:14 -0400 Subject: [PATCH 08/11] Updating example geography --- geography-author/Examples.md | 1140 +++++----------------------------- 1 file changed, 150 insertions(+), 990 deletions(-) diff --git a/geography-author/Examples.md b/geography-author/Examples.md index 947e322b7..dfd302944 100644 --- a/geography-author/Examples.md +++ b/geography-author/Examples.md @@ -1,1003 +1,163 @@ # Examples -## Current LADOT Policies +## Sample Geography -### Venice Special Operations Zone - - - -#### Raw Policy JSON ``` { - "name": "LADOT Venice Beach Special Operations Zone Global Caps", - "description": "Global cap rule for Venice (aggregate number of vehicles across all providers)", - "policy_id": "16e3fca1-f771-440d-9f9c-713e364ffbf5", - "provider_ids": null, - "start_date": 1562043637000, - "published_date": 1562043637000, - "end_date": null, - "prev_policies": [ - "8c3fa8e2-e0eb-4773-a52f-7aada073da46", - "eda761e0-ef67-4531-b5ff-504efc8bacb3" - ], - "rules": [ - { - "name": "Venice Beach Special Operations Zone Global Cap", - "rule_id": "81b1bc92-65b7-4434-8ada-2feeb0b7b223", - "rule_type": "count", - "geographies": [ - "e0e4a085-7a50-43e0-afa4-6792ca897c5a" - ], - "statuses": { - "available": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 750, - "value_url": "https://api.ladot.io/compliance/count/81b1bc92-65b7-4434-8ada-2feeb0b7b223" - } - ] - }, - { - "name": "LADOT Venice Global Caps", - "description": "Global cap rule for the Venice (aggregate number of vehicles across all providers)", - "policy_id": "808f7c4e-83e2-456d-9e49-655a461d393f", - "provider_ids": null, - "start_date": 1562043637000, - "end_date": null, - "published_date": 1562043637000, - "prev_policies": [ - "8c3fa8e2-e0eb-4773-a52f-7aada073da46", - "eda761e0-ef67-4531-b5ff-504efc8bacb3", - "7813bb2c-20a2-45a9-9913-2ea9b6d194d3" - ], - "rules": [ - { - "name": "Greater Venice Area Global Cap", - "rule_id": "6d8f73ed-ba12-4715-af0b-1276b32b54a4", - "rule_type": "count", - "geographies": [ - "3abf8e10-a380-45bb-bfd4-ec5b21b1b0b6" - ], - "statuses": { - "available": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 1500, - "value_url": "https://api.ladot.io/compliance/count/6d8f73ed-ba12-4715-af0b-1276b32b54a4" - } - ] - }, - { - "name": "VSOZ: Provider Caps", - "description": "LADOT Venice Special Ops Zone Provider Caps", - "policy_id": "94cd621c-bf29-430e-a0b8-9362a330b268", - "provider_ids": null, - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "VSOZ Cap", - "rule_id": "a9ce5330-323b-4ee6-b16e-21040dd5d8b2", - "rule_type": "count", - "geographies": [ - "e0e4a085-7a50-43e0-afa4-6792ca897c5a" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 150 - } - ] - }, - { - "name": "VSOZ: Drop-off Caps", - "description": "LADOT Venice Special Ops Zone Drop-off Caps", - "policy_id": "5ba40320-b187-4c51-bd52-3dad0a60f0cc", - "provider_ids": null, - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "Drop-off Caps", - "rule_id": "03f36e3b-a513-4f1c-a0bf-2fa882f25b22", - "rule_type": "count", - "geographies": [ - "6dc968c7-19f4-421c-b9d1-683dd3cdb632", - "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", - "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", - "fe9c910a-7aca-4a42-9d63-e014b3c243d7", - "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", - "c7553640-730f-4ae1-a422-68bac4b849cc", - "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", - "b539054b-541a-43b3-a182-58a0bd0958fd", - "73779ce8-e0fb-48c0-96ba-a1e7f7738279", - "aa4dc424-09e4-48f3-8471-df5186927016", - "f5f4a15d-447f-4969-aedb-a0e94ae5b183", - "456c25f0-a9ce-4ff3-8610-3cee919a3539", - "0a484e09-7a95-4e7d-86c7-a10a58268ee2", - "06b4e69e-da53-4340-8354-5a2262034657", - "b1fdf441-ce46-4f22-bb70-dd2e99df1001", - "2166b7dd-10ab-4219-9921-0d8c0f082308", - "86f9a2bd-48c8-4447-b6eb-60916da16aa1", - "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", - "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", - "8ce201f3-34d7-46a2-aed3-282fcb6938ac", - "2d7f76f0-f45e-4563-8be1-280f77b1181a", - "9912fa40-b594-492f-91d0-113a7568bb2b" - ], - "statuses": { - "available": [ - "provider_drop_off" + "geography_id": "4562e5c6-f45a-49f5-9624-e0245df33a77", + "name": "DTLA Summit", + "description": "DTLA Summit Geography", + "effective_date": null, + "publish_date": 1654110517514, + "prev_geographies": null, + "geography_json": { + "type": "FeatureCollection", + "features": [ + { + "id": 0, + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -80.29276807885115, + 25.690499103756913 + ], + [ + -80.29307233717515, + 25.696723785514006 + ], + [ + -80.29714081273444, + 25.696652525956825 + ], + [ + -80.29709402325298, + 25.695567993750476 + ], + [ + -80.29909961683475, + 25.69553213837387 + ], + [ + -80.29914790616114, + 25.696461802643437 + ], + [ + -80.30522247523685, + 25.696303064951856 + ], + [ + -80.30582623890989, + 25.71086567569952 + ], + [ + -80.30995350269964, + 25.710640025238277 + ], + [ + -80.31008937159906, + 25.714357716374327 + ], + [ + -80.30206599737198, + 25.714604345014806 + ], + [ + -80.3020857896452, + 25.718475851251725 + ], + [ + -80.32325888235198, + 25.717665746440336 + ], + [ + -80.33923315953439, + 25.700680928508586 + ], + [ + -80.34982848902975, + 25.687744259710115 + ], + [ + -80.3641163779246, + 25.67190993666834 + ], + [ + -80.36162111763045, + 25.67009735365998 + ], + [ + -80.3584547615184, + 25.67271469163187 + ], + [ + -80.3201226973295, + 25.67392302568636 + ], + [ + -80.31830637975425, + 25.677683233416026 + ], + [ + -80.31417038224639, + 25.68312350846313 + ], + [ + -80.30815845875138, + 25.688895192192714 + ], + [ + -80.30480817197349, + 25.689178236978382 + ], + [ + -80.30470347550848, + 25.691914301901114 + ], + [ + -80.29276807885115, + 25.690499103756913 + ] ] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 5 - } - ] - }, - { - "name": "VSOZ: Dropzone Caps", - "description": "LADOT Venice Special Ops Zone Drop-off Caps", - "policy_id": "ac467d72-c539-4a32-9759-69cc9dc86944", - "provider_ids": null, - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "Dropzone Caps", - "rule_id": "37308204-936a-4db0-b9b9-0fa00e9dc868", - "rule_type": "count", - "geographies": [ - "6dc968c7-19f4-421c-b9d1-683dd3cdb632", - "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", - "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", - "fe9c910a-7aca-4a42-9d63-e014b3c243d7", - "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", - "c7553640-730f-4ae1-a422-68bac4b849cc", - "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", - "b539054b-541a-43b3-a182-58a0bd0958fd", - "73779ce8-e0fb-48c0-96ba-a1e7f7738279", - "aa4dc424-09e4-48f3-8471-df5186927016", - "f5f4a15d-447f-4969-aedb-a0e94ae5b183", - "456c25f0-a9ce-4ff3-8610-3cee919a3539", - "0a484e09-7a95-4e7d-86c7-a10a58268ee2", - "06b4e69e-da53-4340-8354-5a2262034657", - "b1fdf441-ce46-4f22-bb70-dd2e99df1001", - "2166b7dd-10ab-4219-9921-0d8c0f082308", - "86f9a2bd-48c8-4447-b6eb-60916da16aa1", - "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", - "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", - "8ce201f3-34d7-46a2-aed3-282fcb6938ac", - "2d7f76f0-f45e-4563-8be1-280f77b1181a", - "9912fa40-b594-492f-91d0-113a7568bb2b" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 10 - } - ] - }, - { - "name": "VSOZ: Non-dropzone Caps", - "description": "LADOT Venice Special Ops Zone: Each Operator may deploy up to 25 vehicles outside of the 22 deployment zones.", - "policy_id": "64c1adb3-67df-4888-98ac-70598173cc21", - "provider_ids": null, - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": [ - "dd9ace3e-14c8-461b-b5e7-1326505ff176" - ], - "rules": [ - { - "name": "Valid Provider Drop Offs", - "rule_id": "e0c44896-676b-483b-8c1e-a9914ef79746", - "rule_type": "count", - "geographies": [ - "6dc968c7-19f4-421c-b9d1-683dd3cdb632", - "2a4fbdb9-ff76-4060-aa92-1d37e26732e8", - "9bb19cd1-2530-4f7f-8de0-80e7326a3e32", - "fe9c910a-7aca-4a42-9d63-e014b3c243d7", - "7beb1d83-66e7-4654-8c6b-6710fa26d1bd", - "c7553640-730f-4ae1-a422-68bac4b849cc", - "e42f7e97-b5e6-4ebe-8ddc-05fc806ce54e", - "b539054b-541a-43b3-a182-58a0bd0958fd", - "73779ce8-e0fb-48c0-96ba-a1e7f7738279", - "aa4dc424-09e4-48f3-8471-df5186927016", - "f5f4a15d-447f-4969-aedb-a0e94ae5b183", - "456c25f0-a9ce-4ff3-8610-3cee919a3539", - "0a484e09-7a95-4e7d-86c7-a10a58268ee2", - "06b4e69e-da53-4340-8354-5a2262034657", - "b1fdf441-ce46-4f22-bb70-dd2e99df1001", - "2166b7dd-10ab-4219-9921-0d8c0f082308", - "86f9a2bd-48c8-4447-b6eb-60916da16aa1", - "d5d889c5-b6b9-4b83-bbcb-f5209d8dbcc3", - "5a5b5ffa-5f9f-4db8-ba09-72c5deaac41a", - "8ce201f3-34d7-46a2-aed3-282fcb6938ac", - "2d7f76f0-f45e-4563-8be1-280f77b1181a", - "9912fa40-b594-492f-91d0-113a7568bb2b" - ], - "statuses": { - "available": [ - "provider_drop_off" - ] - }, - "vehicle_types": [ - "bicycle", - "scooter" ] }, - { - "name": "VSOZ Non-dropzone Caps", - "rule_id": "84e2b85e-7542-4bed-8854-203927ced318", - "rule_type": "count", - "geographies": [ - "e0e4a085-7a50-43e0-afa4-6792ca897c5a" - ], - "statuses": { - "available": [ - "provider_drop_off" + "properties": {} + }, + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -118.28704833984375, + 34.03615966431561 + ], + [ + -118.17993164062499, + 34.03615966431561 + ], + [ + -118.17993164062499, + 34.06176136129718 + ], + [ + -118.28704833984375, + 34.06176136129718 + ], + [ + -118.28704833984375, + 34.03615966431561 + ] ] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 25 + ] } - ] - } -``` - -#### Walkthrough - -##### Abstract - -The Venice Special Operations Zone Restrictions published by LADOT !FIXME NEED LINK! specifies a series of valid drop off points within a greater overarching no-dropoff zone. - -##### Policy Design Approach - -The Venice Special Operations Zone Policy consists of two rules, first, a rule which contains geographies representing the 'valid' `provider_drop_off` zones, and a second rule which has the overarching Venice geography. During the evaluation of the policy, a set of vehicles will be provided, we'll refer to this set as `V`. The first rule will match all vehicles which have been `provider_drop_off`'d within one of the given geographies (because we provide no maximum or minimum we will default to an infinitely sized bucket), let's call this group of vehicles `v_1`. When evaluating the second rule, the vehicles which will be considered in the evaluation will be a subset `V \ v_1`. At this point, we are considering a subset which cannot have a vehicle in a valid drop off zone for this policy; and because of this, all vehicles that match with the second rule but cannot fit in its bucket will be considered in violation of the policy. - -##### Side-notes - -This is a very good example of a case where a `rule` is used for pattern matching, and a vehicle (or group of vehicles) being matched with a particular rule should not necessarily result in upstream consequences (fines, warnings, etc...). - -### Venice Beach No-Fly Zone - -``` -{ - "policy_id": "39a653be-7180-4188-b1a6-cae33c280341", - "name": "Prohibited Dockless Zones", - "description": "Prohibited areas for dockless vehicles within the City of Los Angeles for the LADOT Dockless On-Demand Personal Mobility Program", - "provider_ids": null, - "start_date": 1552678594428, - "end_date": null, - "published_date": 1552678594428, - "prev_policies": null, - "rules": [ - { - "name": "Prohibited Dockless Zones", - "rule_id": "8ad39dc3-005b-4348-9d61-c830c54c161b", - "rule_type": "count", - "geographies": [ - "c0591267-bb6a-4f28-a612-ff7f4a8f8b2a" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 0 - } - ] -} -``` - -``` -[{ - "name": "LADOT Mobility Caps: Bird", - "description": "Mobility caps as described in the One-Year Permit", - "policy_id": "99f7a469-6e3a-4981-9313-c2f6c0bbd5ce", - "provider_ids": ["2411d395-04f2-47c9-ab66-d09e9e3c3251"] - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "SFV DACs", - "rule_id": "8a61de66-d9fa-4cba-a38d-5d948e2373fe", - "rule_type": "count", - "geographies": [ - "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 1000 - }, - { - "name": "All other DACs", - "rule_id": "0a11a5d0-06ad-45d8-b4ba-c53f24744ff5", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 2500 - }, - { - "name": "Non-DAC", - "rule_id": "57d47e74-6aef-4f41-b0c5-79bb35aa5b9d", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 3000 - } - ] -}, -{ - "name": "LADOT Mobility Caps: Bolt", - "description": "Mobility caps as described in the One-Year Permit", - "policy_id": "4c1464b6-490e-4540-adbf-de7b98d8f9fd", - "provider_ids": ["3291c288-c9c8-42f1-bc3e-8502b077cd7f"] - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "SFV DACs", - "rule_id": "5b1a8ca3-a363-4a0f-9b14-fda82f579e41", - "rule_type": "count", - "geographies": [ - "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 0 - }, - { - "name": "All other DACs", - "rule_id": "2db85564-9660-43ca-ab4a-029af75c7d29", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 250 - }, - { - "name": "Non-DAC", - "rule_id": "96169f21-4c64-4f21-9090-ab0982e909f1", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 250 - } - ] -}, -{ - "name": "LADOT Mobility Caps: Jump", - "description": "Mobility caps as described in the One-Year Permit", - "policy_id": "221efc03-c3ad-4868-b628-eef93f05e1d6", - "provider_ids": ["c20e08cf-8488-46a6-a66c-5d8fb827f7e0"], - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "SFV DACs", - "rule_id": "734f5974-d153-4473-8eb5-e146dd38d70b", - "rule_type": "count", - "geographies": [ - "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 0 - }, - { - "name": "All other DACs (bikes)", - "rule_id": "ccd6b299-5c58-412a-ae9d-75f1e077dc1d", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle" - ], - "maximum": 1250 - }, - { - "name": "All other DACs (scooters)", - "rule_id": "4c78e8dd-fec9-4a09-8807-b1f16a1adbbc", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "scooter" - ], - "maximum": 1250 - }, - { - "name": "Non-DAC", - "rule_id": "9680ec38-90c7-43dc-880d-4c4b9cd1f81a", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle" - ], - "maximum": 1500 - }, - { - "name": "Non-DAC", - "rule_id": "dacb5dec-ea0c-4155-bb46-7b4b392d5291", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "scooter" - ], - "maximum": 1500 - } - ] -}, -{ - "name": "LADOT Mobility Caps: Lime", - "description": "Mobility caps as described in the One-Year Permit", - "policy_id": "f09ad24a-ad0e-4fb0-8770-4fd24e06eb2c", - "provider_ids": "63f13c48-34ff-49d2-aca7-cf6a5b6171c3", - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "SFV DACs", - "rule_id": "d7dc6e5b-cefb-4392-a87d-f990c7b1a21b", - "rule_type": "count", - "geographies": [ - "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 0 - }, - { - "name": "All other DACs (scooters)", - "rule_id": "dc926dc9-62fb-45bf-8655-0651b59655ac", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 2500 - }, - { - "name": "Non-DAC", - "rule_id": "e659737d-e62d-45d6-8c71-ef302c355065", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 3000 - } - ] -}, -{ - "name": "LADOT Mobility Caps: Lyft", - "description": "Mobility caps as described in the One-Year Permit", - "policy_id": "284a5199-365e-4b9d-b5d0-842ea7b1d4f7", - "provider_ids": ["e714f168-ce56-4b41-81b7-0b6a4bd26128"], - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "SFV DACs", - "rule_id": "42938a11-db1e-4c38-84f8-fe4406f4b310", - "rule_type": "count", - "geographies": [ - "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 500 - }, - { - "name": "All other DACs (scooters)", - "rule_id": "9d9e3d55-866e-47d2-a0a5-af7b62aaef68", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 500 - }, - { - "name": "Non-DAC", - "rule_id": "0dfcb73f-c4ab-40bd-bcbc-a6f3878e5350", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 3000 - } - ] -}, -{ - "name": "LADOT Mobility Caps: Sherpa", - "description": "Mobility caps as described in the One-Year Permit", - "policy_id": "59f25ae6-3ec7-4642-a594-f8d2f6d97362", - "provider_ids": ["3c95765d-4da6-41c6-b61e-1954472ec6c9"], - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "SFV DACs", - "rule_id": "56f7e527-8b91-42e9-bba3-7bc86d88f720", - "rule_type": "count", - "geographies": [ - "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 410 - }, - { - "name": "All other DACs (scooters)", - "rule_id": "e1aae22e-8a2a-4f63-8133-f03cc3e770fe", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 0 - }, - { - "name": "Non-DAC", - "rule_id": "2fb022bc-8f6a-4ee3-9d67-50f57866119a", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 260 - } - ] -}, -{ - "name": "LADOT Mobility Caps: Spin", - "description": "Mobility caps as described in the One-Year Permit", - "policy_id": "784bb9d8-ae82-49a2-83f2-fe01c8e1bb7b", - "provider_ids": ["70aa475d-1fcd-4504-b69c-2eeb2107f7be"] - "start_date": 1558389669540, - "published_date": 1558389669540, - "end_date": null, - "prev_policies": null, - "rules": [ - { - "name": "SFV DACs", - "rule_id": "05441326-d626-4817-96c5-54c046279ca6", - "rule_type": "count", - "geographies": [ - "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 5000 - }, - { - "name": "All other DACs (scooters)", - "rule_id": "71267fb9-b319-4b0d-9544-36cc7eecbc6d", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 2500 - }, - { - "name": "Non-DAC", - "rule_id": "3a84a446-0354-4026-91cb-102d18bdf675", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 3000 - } - ] -}, -{ - "name": "LADOT Mobility Caps: Wheels", - "description": "Mobility caps as described in the One-Year Permit", - "policy_id": "65207595-dfdc-4653-bc4c-7cca29f69cb7", - "provider_ids": ["b79f8687-526d-4ae6-80bf-89b4c44dc071"] - "start_date": 1558389669540, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [ - { - "name": "SFV DACs", - "rule_id": "f60af867-9241-4f53-8cfb-4c6c807679f2", - "rule_type": "count", - "geographies": [ - "e3ed0a0e-61d3-4887-8b6a-4af4f3769c14" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 0 - }, - { - "name": "All other DACs (scooters)", - "rule_id": "c046953a-6b34-4a28-992d-e993232ffaa2", - "rule_type": "count", - "geographies": [ - "0c444869-1674-4234-b4f3-ab5685bcf0d9" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 0 - }, - { - "name": "Non-DAC", - "rule_id": "70958c50-aa35-4ac6-8905-850e97f40613", - "rule_type": "count", - "geographies": [ - "1f943d59-ccc9-4d91-b6e2-0c5e771cbc49" - ], - "statuses": { - "available": [], - "unavailable": [], - "reserved": [], - "trip": [] - }, - "vehicle_types": [ - "bicycle", - "scooter" - ], - "maximum": 3000 - } - ] -}] -``` - -### Idle Time Example - -Idle time limits example. Scooters and bikes can be in the public right-of-way for up to three days if rentable, one day if not. - -``` -{ - "policy_id": "a2c9a65f-fd85-463e-9564-fc95ea473f7d", - "name": "Idle Times", - "description": "LADOT Idle Time Limitations", - "start_date": 1552678594428, - "end_date": null, - "published_date": 1558389669540, - "prev_policies": null, - "rules": [{ - "name": "Greater LA (rentable)", - "rule_type": "time", - "rule_units": "hours", - "geographies": ["b4bcc213-4888-48ce-a33d-4dd6c3384bda"], - "statuses": { - "available": [], - "reserved": [] - }, - "vehicle_types": ["bicycle", "scooter"], - "maximum": 72 - }, { - "name": "Greater LA (non-rentable)", - "rule_type": "time", - "rule_units": "hours", - "geographies": ["12b3fcf5-22af-4b0d-a169-ac7ac903d3b9"], - "statuses": ["unavailable", "trip"], - "vehicle_types": ["bicycle", "scooter"], - "limit": 24 - }] -} -``` - -### Speed Limits Example - -Speed limits example. Fifteen MPH in greater LA, 10 MPH on Venice Beach on Saturday/Sunday from noon til midnight. - -``` -{ - "policy_id": "95645117-fd85-463e-a2c9-fc95ea47463e", - "name": "Speed Limits", - "description": "LADOT Pilot Speed Limit Limitations", - "start_date": 1552678594428, - "end_date": null, - "published_date": 1552678594428, - "supersedes": null, - "rules": [{ - "name": "Greater LA", - "rule_type": "speed", - "rule_units": "mph" - "geographies": ["b4bcc213-4888-48ce-a33d-4dd6c3384bda"], - "statuses": { - "trip": [] - }, - "vehicle_types": ["bicycle", "scooter"], - "maximum": 15 - }, { - "name": "Venice Beach on weekend afternoons", - "rule_type": "speed", - "rule_units": "mph", - "geographies": ["ec551174-f324-4251-bfed-28d9f3f473fc"], - "statuses": { - "trip": [] - }, - "vehicle_types": ["bicycle", "scooter"], - "days": ["sat", "sun"], - "start_time": "12:00", - "end_time": "23:59", - "maximum": 10, - "messages": { - "en-US": "Remember to stay under 10 MPH on Venice Beach on weekends!”, - "es-US": "¡Recuerda permanecer menos de 10 millas por hora en Venice Beach los fines de semana!" - }, - }] + } + ] + } } ``` From 1ce9aed475b314378b28183bef0049f27ca7e0cb Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 1 Jun 2022 17:03:25 -0400 Subject: [PATCH 09/11] minor fixes --- geography-author/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geography-author/README.md b/geography-author/README.md index 8f7e5fee7..287f9bfb0 100644 --- a/geography-author/README.md +++ b/geography-author/README.md @@ -41,7 +41,7 @@ Since an unpublished Geography may not be ready for viewing by a broader audienc | `name` | String | R | Name of geography | | `description` | String | O | Detailed description of geography | | `geography_id` | UUID | R | Unique ID of geography | -| `geography_json` | UUID | R | The GeoJSON FeatureCollection that defines the geographical coordinates. +| `geography_json` | UUID | R | The GeoJSON FeatureCollection that defines the geospatial area. | `effective_date` | timestamp | O | `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. | `publish_date` | timestamp | R | Timestamp that the policy was published, i.e. made immutable | | `prev_geographies` | UUID[] | O | Unique IDs of prior geographies replaced by this one | From f6680b8f75df1b30ea7a68e6f6dbacb5ffb6acec Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 1 Jun 2022 17:17:48 -0400 Subject: [PATCH 10/11] minor fixes --- geography-author/geo.html | 1 - 1 file changed, 1 deletion(-) delete mode 100644 geography-author/geo.html diff --git a/geography-author/geo.html b/geography-author/geo.html deleted file mode 100644 index 205eb6acb..000000000 --- a/geography-author/geo.html +++ /dev/null @@ -1 +0,0 @@ -

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "The MDS Policy Schema, GET /geographies/{id} payload",
"definitions": {
"GeoJSON.Feature<GeoJSON.Geometry,{[name:string]:any;}>": {
"description": "A feature object which contains a geometry and associated properties.\nhttps://tools.ietf.org/html/rfc7946#section-3.2",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"geometry": {
"anyOf": [
{
"$ref": "#/definitions/GeoJSON.Point"
},
{
"$ref": "#/definitions/GeoJSON.MultiPoint"
},
{
"$ref": "#/definitions/GeoJSON.LineString"
},
{
"$ref": "#/definitions/GeoJSON.MultiLineString"
},
{
"$ref": "#/definitions/GeoJSON.Polygon"
},
{
"$ref": "#/definitions/GeoJSON.MultiPolygon"
},
{
"$ref": "#/definitions/GeoJSON.GeometryCollection"
}
],
"description": "The feature's geometry"
},
"id": {
"description": "A value that uniquely identifies this feature in a\nhttps://tools.ietf.org/html/rfc7946#section-3.2.",
"type": [
"string",
"number"
]
},
"properties": {
"additionalProperties": {},
"description": "Properties associated with this feature.",
"type": "object"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Feature"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.FeatureCollection<GeoJSON.Geometry,{[name:string]:any;}>": {
"description": "A collection of feature objects.\n https://tools.ietf.org/html/rfc7946#section-3.3",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"features": {
"items": {
"$ref": "#/definitions/GeoJSON.Feature<GeoJSON.Geometry,{[name:string]:any;}>"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"FeatureCollection"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.GeometryCollection": {
"description": "Geometry Collection\nhttps://tools.ietf.org/html/rfc7946#section-3.1.8",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"geometries": {
"items": {
"anyOf": [
{
"$ref": "#/definitions/GeoJSON.Point"
},
{
"$ref": "#/definitions/GeoJSON.MultiPoint"
},
{
"$ref": "#/definitions/GeoJSON.LineString"
},
{
"$ref": "#/definitions/GeoJSON.MultiLineString"
},
{
"$ref": "#/definitions/GeoJSON.Polygon"
},
{
"$ref": "#/definitions/GeoJSON.MultiPolygon"
},
{
"$ref": "#/definitions/GeoJSON.GeometryCollection"
}
]
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"GeometryCollection"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.LineString": {
"description": "LineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.4",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"LineString"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiLineString": {
"description": "MultiLineString geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.5",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiLineString"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiPoint": {
"description": "MultiPoint geometry object.\n https://tools.ietf.org/html/rfc7946#section-3.1.3",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiPoint"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.MultiPolygon": {
"description": "MultiPolygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.7",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"MultiPolygon"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.Point": {
"description": "Point geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.2",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2
n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"description": "A Position is an array of coordinates.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.1\nArray should contain between two and three elements.\nThe previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values),\nbut the current specification only allows X, Y, and (optionally) Z to be defined.",
"items": {
"type": "number"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Point"
],
"type": "string"
}
},
"type": "object"
},
"GeoJSON.Polygon": {
"description": "Polygon geometry object.\nhttps://tools.ietf.org/html/rfc7946#section-3.1.6",
"properties": {
"bbox": {
"anyOf": [
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 4,
"type": "array"
},
{
"additionalItems": {
"anyOf": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
]
},
"items": [
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
},
{
"type": "number"
}
],
"minItems": 6,
"type": "array"
}
],
"description": "Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections.\nThe value of the bbox member is an array of length 2*n where n is the number of dimensions\nrepresented in the contained geometries, with all axes of the most southwesterly point\nfollowed by all axes of the more northeasterly point.\nThe axes order of a bbox follows the axes order of geometries.\nhttps://tools.ietf.org/html/rfc7946#section-5"
},
"coordinates": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"type": "array"
},
"type": {
"description": "Specifies the type of GeoJSON object.",
"enum": [
"Polygon"
],
"type": "string"
}
},
"type": "object"
}
},
"properties": {
"geography_id": {
"examples": [
"3c9604d6-b5ee-11e8-96f8-529269fb1459"
],
"format": "uuid",
"pattern": "^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$",
"type": "string"
},
"geography_json": {
"$ref": "#/definitions/GeoJSON.FeatureCollection<GeoJSON.Geometry,{[name:string]:any;}>"
}
},
"type": "object"
}

From 8f8ec9d8b363e8dda4601ec22d123456573c6c9f Mon Sep 17 00:00:00 2001 From: Jane Huang Date: Wed, 1 Jun 2022 17:20:13 -0400 Subject: [PATCH 11/11] minor fixes --- geography-author/.geo.html.swp | Bin 0 -> 8192 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 geography-author/.geo.html.swp diff --git a/geography-author/.geo.html.swp b/geography-author/.geo.html.swp new file mode 100644 index 0000000000000000000000000000000000000000..d6d8fb816a417d1a08169e8cce90779681f1af9e GIT binary patch literal 8192 zcmeIuI}ULZ#@fz;#76r8353^@1!8Qp^#-28qj)A|6DT*d#{AQ4 z_TSk_=JTD?-ZQqA%i5YUroW&5qjJXKi?M`?P{u>$QLy7YH4lPY84oB^e7MPh_Jxbo z&M0UKGV^m~M&Bv6+cySEE{y3)Gk`g79VM~bEUKE*R)2tWV=5P$##AOHafKmY;| KfB*!3K;R2sjw_o0 literal 0 HcmV?d00001