Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit 2035d94

Browse files
committed
Simplified GeoDataFrame subsets cannot provide detailed geometry [#768](CCI-Tools/cate#768).
1 parent 30fc31f commit 2035d94

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Changes in 2.0.0-dev.20 (in development)
22

3-
* GUI doesn't reopen after closing it [#765](https://github.com/CCI-Tools/cate/issues/765).
3+
* Fixed: Simplified GeoDataFrame subsets cannot provide detailed geometry [#768](https://github.com/CCI-Tools/cate/issues/768).
4+
* Fixed: GUI doesn't reopen after closing it [#765](https://github.com/CCI-Tools/cate/issues/765).
45
* On exit, warn user for unsaved changes.
56

67
## Changes in 2.0.0-dev.19

src/renderer/actions.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,17 +1456,16 @@ export function notifySelectedEntityChange(viewId: string, layer: LayerState | n
14561456

14571457
if (selectedEntity
14581458
&& isNumber(selectedEntity._simp)
1459-
&& isNumber(selectedEntity._resId)) {
1459+
&& isNumber(selectedEntity._resId)
1460+
&& isNumber(selectedEntity._idx)) {
14601461
const isGeometrySimplified = (selectedEntity._simp & 0x01) != 0;
14611462
if (isGeometrySimplified) {
14621463
const workspace = selectors.workspaceSelector(getState());
14631464
if (workspace) {
14641465
const resId = selectedEntity._resId;
1466+
const featureIndex = +selectedEntity._idx;
14651467
const baseUrl = selectors.webAPIRestUrlSelector(getState());
14661468
const baseDir = workspace.baseDir;
1467-
// TODO #477 (nf): how can we know that +selectedEntity.id *is really* the feature index
1468-
// within the collection?
1469-
const featureIndex = +selectedEntity.id;
14701469
const featureUrl = getFeatureUrl(baseUrl, baseDir, {resId}, featureIndex);
14711470
reloadEntityWithOriginalGeometry(selectedEntity, featureUrl, (layer as any).style);
14721471
}

src/renderer/containers/globe-view-layers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ const createResourceGeoJSONDataSourceImpl: ResourceGeoJSONDataSourceFactory =
233233
if (feature
234234
&& isNumber(feature._simp)
235235
&& isNumber(feature._resId)
236+
&& isNumber(feature._idx)
236237
&& !!(entity.point || entity.billboard || entity.label)) {
237238

238239
// TODO #477 (nf): Generalize this code. This is for Glaciers CCI.
@@ -262,6 +263,7 @@ const createResourceGeoJSONDataSourceImpl: ResourceGeoJSONDataSourceFactory =
262263
// Cesium will turn _simp and _resId into ES6 Property instances (get/set).
263264
_simp: feature._simp,
264265
_resId: feature._resId,
266+
_idx: feature._idx,
265267
point: {
266268
// Style for points symbolizing a more complex geometry
267269
color: pointColor,

0 commit comments

Comments
 (0)