From 8eb30ac974d772c9d5fb23a5eaba6e5769bd5989 Mon Sep 17 00:00:00 2001 From: Cy Rossignol Date: Wed, 22 Jan 2025 19:31:29 -0800 Subject: [PATCH 01/11] Add TDEI dataset metadata types --- types/tdei.ts | 89 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 7 deletions(-) diff --git a/types/tdei.ts b/types/tdei.ts index 1839fc7..f397d0b 100644 --- a/types/tdei.ts +++ b/types/tdei.ts @@ -1,5 +1,86 @@ export type TdeiRoleAssignment = string; +// +// Dataset metadata schema +// https://raw.githubusercontent.com/TaskarCenterAtUW/TDEI-osw-datasvc-ts/master/schema/metadata.schema.json +// + +export interface TdeiDatasetMetadataDatasetDetail { + name: string; + version: string; + collected_by: string; + collection_date: string; + data_source: '3rdParty' | 'TDEITools' | 'InHouse'; + schema_version: string; + description?: string | null; + custom_metadata?: Record | null; + valid_from?: string | null; + valid_to?: string | null; + collection_method?: 'manual' | 'transform' | 'generated' | 'AV' | 'others' | null; + dataset_area?: object | null; +} + +export interface TdeiDatasetMetadataDataProvenance { + full_dataset_name: string; + other_published_locations?: string | null; + dataset_update_frequency_months?: number | null; + schema_validation_run?: boolean | null; + schema_validation_run_description?: string | null; + allow_crowd_contributions?: boolean | null; + location_inaccuracy_factors?: string | null; +} + +export interface TdeiDatasetMetadataDatasetSummary { + collection_name?: string | null; + department_name?: string | null; + city?: string | null; + region?: string | null; + county?: string | null; + key_limitations?: string | null; + release_notes?: string | null; + challenges?: string | null; +} + +export interface TdeiDatasetMetadataMaintenance { + official_maintainer?: string[] | null; + last_updated?: string | null; + update_frequency?: string | null; + authorization_chain?: string | null; + maintenance_funded?: boolean | null; + funding_details?: string | null; +} + +export interface TdeiDatasetMetadataMethodology { + point_data_collection_device?: string | null; + node_locations_and_attributes_editing_software?: string | null; + data_collected_by_people?: boolean | null; + data_collectors?: string | null; + data_captured_automatically?: boolean | null; + automated_collection?: string | null; + data_collectors_organization?: string | null; + data_collector_compensation?: string | null; + preprocessing_location?: string | null; + preprocessing_by?: string | null; + preprocessing_steps?: string | null; + data_collection_preprocessing_documentation?: boolean | null; + documentation_uri?: string | null; + validation_process_exists?: boolean | null; + validation_process_description?: string | null; + validation_conducted_by?: string | null; + excluded_data?: string | null; + excluded_data_reason?: string | null; +} + +/** Full upload metadata envelope sent to the TDEI API. */ +export interface TdeiDatasetMetadata { + dataset_detail: TdeiDatasetMetadataDatasetDetail; + data_provenance?: TdeiDatasetMetadataDataProvenance; + dataset_summary?: TdeiDatasetMetadataDatasetSummary; + maintenance?: TdeiDatasetMetadataMaintenance; + methodology?: TdeiDatasetMetadataMethodology; +} + + /** Shape returned by the TDEI project-group-roles API */ export interface TdeiProjectGroupApiResponse { tdei_project_group_id: string; @@ -32,13 +113,7 @@ export interface TdeiDatasetApiResponse { tdei_service_id: string; service_name?: string; }; - metadata: { - dataset_detail: { - name: string; - version?: string; - dataset_area?: object; - }; - }; + metadata: TdeiDatasetMetadata; } export interface TdeiDatasetItem { From cb4a6ea05b410b4c109bdacc89e03c8998939cd5 Mon Sep 17 00:00:00 2001 From: Cy Rossignol Date: Thu, 23 Jan 2025 12:06:55 -0800 Subject: [PATCH 02/11] Add changesets option when exporting to TDEI --- pages/workspace/[id]/export/tdei.vue | 36 +++++- services/export/tdei.ts | 177 +++++++++++++++++++++++---- services/osm.ts | 9 +- services/tdei.ts | 27 ++-- 4 files changed, 209 insertions(+), 40 deletions(-) diff --git a/pages/workspace/[id]/export/tdei.vue b/pages/workspace/[id]/export/tdei.vue index e6ba869..6ee1a12 100644 --- a/pages/workspace/[id]/export/tdei.vue +++ b/pages/workspace/[id]/export/tdei.vue @@ -84,6 +84,32 @@ Dataset Version +
+ +
+
+ Attaches a changeset.zip to the export which + contains a manifest.json summary metadata file + and a changesets/ directory with one + {id}.json file per change history entry. +
+
+
+ +
+
+ Adds an {id}.osc file alongside each + {id}.json containing unprocessed + osmChange XML + for use with third-party OpenStreetMap tools. +
+