Skip to content

Commit

Permalink
geosolutions-it#9830: Support for IFC 3d model in MS
Browse files Browse the repository at this point in the history
- indicate the projection code into the warning popup in case adding ifc model with non-supported projection
  • Loading branch information
mahmoudadel54 committed Feb 22, 2024
1 parent c485410 commit 7bc23e8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
8 changes: 4 additions & 4 deletions web/client/api/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ export const getCapabilities = (url) => {
// todo: getting bbox needs to enhance to get the accurate bbox of the ifc model
let bbox = {
bounds: {
minx: properties.longitude || 0 - 0.001,
miny: properties.latitude || 0 - 0.001,
maxx: properties.longitude || 0 + 0.001,
maxy: properties.latitude || 0 + 0.001
minx: (properties.longitude || 0) - 0.001,
miny: (properties.latitude || 0) - 0.001,
maxx: (properties.longitude || 0) + 0.001,
maxy: (properties.latitude || 0) + 0.001
},
crs: 'EPSG:4326'
};
Expand Down
11 changes: 7 additions & 4 deletions web/client/epics/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,10 @@ export default (API) => ({
...layer,
bbox: {
bounds: {
minx: longitude || 0 - 0.001,
miny: latitude || 0 - 0.001,
maxx: longitude || 0 + 0.001,
maxy: latitude || 0 + 0.001
minx: (longitude || 0) - 0.001,
miny: (latitude || 0) - 0.001,
maxx: (longitude || 0) + 0.001,
maxy: (latitude || 0) + 0.001
},
crs: 'EPSG:4326'
},
Expand All @@ -324,6 +324,9 @@ export default (API) => ({
title: "notification.warning",
message: properties?.projectedCrsNotSupported ? "layerProperties.modelLayer.warnings.projectedCrsNotSupported" : "layerProperties.modelLayer.warnings.projectedCrsNotProvided",
autoDismiss: 15,
values: {
modelProjection: properties?.projectedCrsNotSupported ? `(${properties?.projectedCrs})` : ""
},
position: "tc"
})]
);
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"height": "Höhe (m)",
"heading": "Kurswinkel (DD)",
"warnings": {
"projectedCrsNotSupported": "Das Modell wird aus folgenden Gründen in der Mitte der aktuellen Ansicht platziert: Das Modell verfügt über eine CRS-Projektion, diese wird jedoch nicht unterstützt.",
"projectedCrsNotSupported": "Das Modell wird aus folgenden Gründen in der Mitte der aktuellen Ansicht platziert: Das Modell verfügt über eine CRS-Projektion {modelProjection}, diese wird jedoch nicht unterstützt.",
"projectedCrsNotProvided": "Das Modell wird aus folgenden Gründen in der Mitte der aktuellen Ansicht platziert: Das Modell verfügt über keine definierte CRS-Projektion."
}
},
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"height": "Height (m)",
"heading": "Heading (DD)",
"warnings": {
"projectedCrsNotSupported": "The model is placed on the center of the current view because: the model has a CRS projection but it is not supported.",
"projectedCrsNotSupported": "The model is placed on the center of the current view because: the model has a CRS projection {modelProjection} but it is not supported.",
"projectedCrsNotProvided": "The model is placed on the center of the current view because: the model has no defined CRS projection."
}
},
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"height": "Altura (m)",
"heading": "Ángulo de rumbo (DD)",
"warnings": {
"projectedCrsNotSupported": "El modelo se coloca en el centro de la vista actual porque: el modelo tiene una proyección CRS pero no es soportado",
"projectedCrsNotSupported": "El modelo se coloca en el centro de la vista actual porque: el modelo tiene una proyección CRS {modelProjection} pero no es soportado",
"projectedCrsNotProvided": "El modelo se coloca en el centro de la vista actual porque: el modelo no tiene una proyección CRS definida."
}
},
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"height": "Hauteur (m)",
"heading": "Angle de cap (DD)",
"warnings": {
"projectedCrsNotSupported": "Le modèle est placé au centre de la vue actuelle car: le modèle a une projection CRS, mais elle n'est pas prise en charge.",
"projectedCrsNotSupported": "Le modèle est placé au centre de la vue actuelle car: le modèle a une projection CRS {modelProjection}, mais elle n'est pas prise en charge.",
"projectedCrsNotProvided": "Le modèle est placé au centre de la vue actuelle car: le modèle n'a pas de projection CRS définie."
}
},
Expand Down
2 changes: 1 addition & 1 deletion web/client/translations/data.it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"height": "Altezza (m)",
"heading": "Angolo di rotta (DD)",
"warnings": {
"projectedCrsNotSupported": "Il modello è posizionato al centro della vista corrente perché: il modello ha una proiezione CRS, ma non è supportata.",
"projectedCrsNotSupported": "Il modello è posizionato al centro della vista corrente perché: il modello ha una proiezione CRS {modelProjection}, ma non è supportata.",
"projectedCrsNotProvided": "Il modello è posizionato al centro della vista corrente perché: il modello non ha una proiezione CRS definita."
}
},
Expand Down

0 comments on commit 7bc23e8

Please sign in to comment.