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

Commit

Permalink
Simplified GeoDataFrame subsets cannot provide detailed geometry [#768](
Browse files Browse the repository at this point in the history
  • Loading branch information
forman committed Sep 25, 2018
1 parent 30fc31f commit 2035d94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Changes in 2.0.0-dev.20 (in development)

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

## Changes in 2.0.0-dev.19
Expand Down
7 changes: 3 additions & 4 deletions src/renderer/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1456,17 +1456,16 @@ export function notifySelectedEntityChange(viewId: string, layer: LayerState | n

if (selectedEntity
&& isNumber(selectedEntity._simp)
&& isNumber(selectedEntity._resId)) {
&& isNumber(selectedEntity._resId)
&& isNumber(selectedEntity._idx)) {
const isGeometrySimplified = (selectedEntity._simp & 0x01) != 0;
if (isGeometrySimplified) {
const workspace = selectors.workspaceSelector(getState());
if (workspace) {
const resId = selectedEntity._resId;
const featureIndex = +selectedEntity._idx;
const baseUrl = selectors.webAPIRestUrlSelector(getState());
const baseDir = workspace.baseDir;
// TODO #477 (nf): how can we know that +selectedEntity.id *is really* the feature index
// within the collection?
const featureIndex = +selectedEntity.id;
const featureUrl = getFeatureUrl(baseUrl, baseDir, {resId}, featureIndex);
reloadEntityWithOriginalGeometry(selectedEntity, featureUrl, (layer as any).style);
}
Expand Down
2 changes: 2 additions & 0 deletions src/renderer/containers/globe-view-layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ const createResourceGeoJSONDataSourceImpl: ResourceGeoJSONDataSourceFactory =
if (feature
&& isNumber(feature._simp)
&& isNumber(feature._resId)
&& isNumber(feature._idx)
&& !!(entity.point || entity.billboard || entity.label)) {

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

0 comments on commit 2035d94

Please sign in to comment.