From b4bef1116b8bb5fba0feac6b7b937a6af56afd09 Mon Sep 17 00:00:00 2001 From: alebinson Date: Thu, 25 Jun 2026 12:17:33 +0300 Subject: [PATCH] feat: support 3d sr --- src/common/i18n/en.json | 6 ++++- src/common/i18n/he.json | 6 ++++- .../layer-details/entity.dialog.tsx | 2 +- .../models/Layer3DRecordModel.base.ts | 4 ++- src/discrete-layer/models/ProductTypeEnum.ts | 10 +++++-- src/discrete-layer/models/RootStore.base.ts | 1 + .../mc-enums-fetcher.component.tsx | 27 ++++++++++++++++--- 7 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/common/i18n/en.json b/src/common/i18n/en.json index f31325064..96a107794 100644 --- a/src/common/i18n/en.json +++ b/src/common/i18n/en.json @@ -345,6 +345,7 @@ "field-names.3d.productName": "Name", "field-names.3d.productVersion": "Version #", "field-names.3d.productType": "Type", + "field-names.3d.productSubType": "Sub Type", "field-names.3d.description": "Description", "field-names.3d.creationDate": "Created", "field-names.3d.updateDate": "Updated in catalog", @@ -820,7 +821,10 @@ "ProductType.quantized_mesh_dsm": "QuantizedMeshDSM", "ProductType.quantized_mesh_dtm_best": "QuantizedMeshDTMBest", "ProductType.quantized_mesh_dsm_best": "QuantizedMeshDSMBest", - "ProductType.photo_realistic_3d": "3DPhotoRealistic", + "ProductType.photo_realistic": "3DPhotoRealistic", + "ProductType.photo_realistic_best": "3DPhotoRealisticBest", + "ProductType.semantic": "Semantic", + "ProductType.semantic_mesh": "SemanticMesh", "ProductType.point_cloud": "PointCloud", "RecordStatus.published": "Published", diff --git a/src/common/i18n/he.json b/src/common/i18n/he.json index cf55a4a4d..7b46e47d1 100644 --- a/src/common/i18n/he.json +++ b/src/common/i18n/he.json @@ -345,6 +345,7 @@ "field-names.3d.productName": "שם", "field-names.3d.productVersion": "מס' גירסה", "field-names.3d.productType": "סוג", + "field-names.3d.productSubType": "תת סוג", "field-names.3d.description": "תיאור", "field-names.3d.creationDate": "יצירה", "field-names.3d.updateDate": "עדכון פרטים", @@ -820,7 +821,10 @@ "ProductType.quantized_mesh_dsm": "QuantizedMeshDSM", "ProductType.quantized_mesh_dtm_best": "QuantizedMeshDTMBest", "ProductType.quantized_mesh_dsm_best": "QuantizedMeshDSMBest", - "ProductType.photo_realistic_3d": "3DPhotoRealistic", + "ProductType.photo_realistic": "3DPhotoRealistic", + "ProductType.photo_realistic_best": "3DPhotoRealisticBest", + "ProductType.semantic": "Semantic", + "ProductType.semantic_mesh": "SemanticMesh", "ProductType.point_cloud": "PointCloud", "RecordStatus.published": "מפורסם", diff --git a/src/discrete-layer/components/layer-details/entity.dialog.tsx b/src/discrete-layer/components/layer-details/entity.dialog.tsx index 042664b12..240240677 100644 --- a/src/discrete-layer/components/layer-details/entity.dialog.tsx +++ b/src/discrete-layer/components/layer-details/entity.dialog.tsx @@ -93,7 +93,7 @@ export const buildRecord = ( Layer3DRecordModelKeys.forEach((key) => { record[key as string] = undefined; }); - record.productType = ProductType.PHOTO_REALISTIC_3D; + record.productType = ProductType.PHOTO_REALISTIC; record.productStatus = RecordStatus.UNPUBLISHED; record['__typename'] = Layer3DRecordModel.properties['__typename'].name.replaceAll('"', ''); break; diff --git a/src/discrete-layer/models/Layer3DRecordModel.base.ts b/src/discrete-layer/models/Layer3DRecordModel.base.ts index 52732d433..165a1075b 100644 --- a/src/discrete-layer/models/Layer3DRecordModel.base.ts +++ b/src/discrete-layer/models/Layer3DRecordModel.base.ts @@ -27,6 +27,7 @@ export const Layer3DRecordModelBase = ModelBase // ASSAF: MUST REMAIN STRING productVersion: types.union(types.undefined, types.null, types.string), productType: types.union(types.undefined, ProductTypeEnumType), + productSubType: types.union(types.undefined, types.null, types.string), description: types.union(types.undefined, types.null, types.string), creationDate: types.union(types.undefined, types.null, types.frozen()), updateDate: types.union(types.undefined, types.null, types.frozen()), @@ -75,6 +76,7 @@ export class Layer3DRecordModelSelector extends QueryBuilder { get productName() { return this.__attr(`productName`) } get productVersion() { return this.__attr(`productVersion`) } get productType() { return this.__attr(`productType`) } + get productSubType() { return this.__attr(`productSubType`) } get description() { return this.__attr(`description`) } get creationDate() { return this.__attr(`creationDate`) } get updateDate() { return this.__attr(`updateDate`) } @@ -114,4 +116,4 @@ export function selectFromLayer3DRecord() { return new Layer3DRecordModelSelector() } -export const layer3DRecordModelPrimitives = selectFromLayer3DRecord().type.productId.productName.productVersion.productType.description.creationDate.updateDate.sourceDateStart.sourceDateEnd.minResolutionMeter.maxResolutionMeter.maxAccuracyCE90.absoluteAccuracyLE90.accuracySE90.relativeAccuracySE90.visualAccuracy.sensors.footprint.heightRangeFrom.heightRangeTo.srsId.srsName.region.classification.productionSystem.productionSystemVer.producerName.minFlightAlt.maxFlightAlt.geographicArea.productBoundingBox.productSource.productStatus.insertDate.wktGeometry.keywords.id.links(linkModelPrimitives) +export const layer3DRecordModelPrimitives = selectFromLayer3DRecord().type.productId.productName.productVersion.productType.productSubType.description.creationDate.updateDate.sourceDateStart.sourceDateEnd.minResolutionMeter.maxResolutionMeter.maxAccuracyCE90.absoluteAccuracyLE90.accuracySE90.relativeAccuracySE90.visualAccuracy.sensors.footprint.heightRangeFrom.heightRangeTo.srsId.srsName.region.classification.productionSystem.productionSystemVer.producerName.minFlightAlt.maxFlightAlt.geographicArea.productBoundingBox.productSource.productStatus.insertDate.wktGeometry.keywords.id.links(linkModelPrimitives) diff --git a/src/discrete-layer/models/ProductTypeEnum.ts b/src/discrete-layer/models/ProductTypeEnum.ts index bb017f933..0201bf9e3 100644 --- a/src/discrete-layer/models/ProductTypeEnum.ts +++ b/src/discrete-layer/models/ProductTypeEnum.ts @@ -24,7 +24,10 @@ QUANTIZED_MESH_DTM="QUANTIZED_MESH_DTM", QUANTIZED_MESH_DSM="QUANTIZED_MESH_DSM", QUANTIZED_MESH_DTM_BEST="QUANTIZED_MESH_DTM_BEST", QUANTIZED_MESH_DSM_BEST="QUANTIZED_MESH_DSM_BEST", -PHOTO_REALISTIC_3D="PHOTO_REALISTIC_3D", +PHOTO_REALISTIC="PHOTO_REALISTIC", +PHOTO_REALISTIC_BEST="PHOTO_REALISTIC_BEST", +SEMANTIC="SEMANTIC", +SEMANTIC_MESH="SEMANTIC_MESH", POINT_CLOUD="POINT_CLOUD" } @@ -48,6 +51,9 @@ export const ProductTypeEnumType = types.enumeration("ProductType", [ "QUANTIZED_MESH_DSM", "QUANTIZED_MESH_DTM_BEST", "QUANTIZED_MESH_DSM_BEST", - "PHOTO_REALISTIC_3D", + "PHOTO_REALISTIC", + "PHOTO_REALISTIC_BEST", + "SEMANTIC", + "SEMANTIC_MESH", "POINT_CLOUD", ]) diff --git a/src/discrete-layer/models/RootStore.base.ts b/src/discrete-layer/models/RootStore.base.ts index 41d074608..448920b0e 100644 --- a/src/discrete-layer/models/RootStore.base.ts +++ b/src/discrete-layer/models/RootStore.base.ts @@ -347,6 +347,7 @@ export type Layer3DRecordInput = { productName: string productVersion?: string productType: ProductType + productSubType?: string description?: string creationDate?: any updateDate?: any diff --git a/src/discrete-layer/views/components/data-fetchers/mc-enums-fetcher.component.tsx b/src/discrete-layer/views/components/data-fetchers/mc-enums-fetcher.component.tsx index 600578ed4..c1810b446 100644 --- a/src/discrete-layer/views/components/data-fetchers/mc-enums-fetcher.component.tsx +++ b/src/discrete-layer/views/components/data-fetchers/mc-enums-fetcher.component.tsx @@ -58,8 +58,11 @@ export const MCEnumsFetcher: React.FC = observer(() => { QUANTIZED_MESH_DSM, QUANTIZED_MESH_DTM_BEST, QUANTIZED_MESH_DSM_BEST, - PHOTO_REALISTIC_3D, + PHOTO_REALISTIC, + PHOTO_REALISTIC_BEST, POINT_CLOUD, + SEMANTIC, + SEMANTIC_MESH, } = ProductType; enums['LayerRasterRecord'] = { @@ -193,8 +196,14 @@ export const MCEnumsFetcher: React.FC = observer(() => { parent: 'QuantizedMeshBestRecord', parentDomain: RecordType.RECORD_DEM, }; - enums[PHOTO_REALISTIC_3D] = { - ...enums[PHOTO_REALISTIC_3D], + enums[PHOTO_REALISTIC] = { + ...enums[PHOTO_REALISTIC], + icon: 'mc-icon-Map-3D', + parent: 'Layer3DRecord', + parentDomain: RecordType.RECORD_3D, + }; + enums[PHOTO_REALISTIC_BEST] = { + ...enums[PHOTO_REALISTIC_BEST], icon: 'mc-icon-Map-3D', parent: 'Layer3DRecord', parentDomain: RecordType.RECORD_3D, @@ -205,6 +214,18 @@ export const MCEnumsFetcher: React.FC = observer(() => { parent: 'Layer3DRecord', parentDomain: RecordType.RECORD_3D, }; + enums[SEMANTIC] = { + ...enums[SEMANTIC], + icon: 'mc-icon-Map-3D', + parent: 'Layer3DRecord', + parentDomain: RecordType.RECORD_3D, + }; + enums[SEMANTIC_MESH] = { + ...enums[SEMANTIC_MESH], + icon: 'mc-icon-Map-3D', + parent: 'Layer3DRecord', + parentDomain: RecordType.RECORD_3D, + }; const { UNPUBLISHED } = RecordStatus;