Skip to content

Adding new layers behaves strangely in general, throws errors for GeoTiffs #1118

@mfisher87

Description

@mfisher87

JupyterGIS version

0.13.1

Description

Tested on the ReadTheDocs deployment and locally with same behavior. I tried recording a demo, but had some problems. Linux life 🙄

Reproduction:

  1. New project
  2. Add a vector tile layer. Do not click OK!
  3. Vector tile layer present in layers panel 😲
  4. Click "cancel"
  5. Vector tile layer still present

Or

  1. Add GeoTIFF layer
  2. GeoTIFF layer present in layers panel 😲
  3. Click browse
  4. Error: Error Adding Custom GeoTiff Layer. Failed to add Custom GeoTiff Layer: Invalid file format for tiff content.
  5. Click OK
  6. See bugged file browser
  7. Click cancel
  8. Click browse
  9. See working file browser
  10. Select a GeoTIFF
  11. Click OK
  12. A second GeoTIFF layer is added to the layers panel
  13. Only the 2nd GeoTIFF has data.

Project file below. Note that the VectorTile and GeoTIFF layers have no source information.

{
  "layerTree": [
    "da049453-a4a2-4978-9094-f18ba264ebf4",
    "5caeb03e-d416-4930-86b4-48dfde79afa3",
    "dea6a6ef-2741-45e5-9f92-4746e9220268"
  ],
  "layers": {
    "5caeb03e-d416-4930-86b4-48dfde79afa3": {
      "name": "Custom GeoTiff Layer",
      "parameters": {
        "opacity": 1.0,
        "source": "1bd41376-3841-4eeb-9a3a-ed6a0eaa95d1",
        "symbologyState": {
          "alphaBand": 4.0,
          "band": 1.0,
          "blueBand": 3.0,
          "colorRamp": "viridis",
          "greenBand": 2.0,
          "interpolation": "linear",
          "mode": "equal interval",
          "nClasses": "9",
          "redBand": 1.0,
          "renderType": "Single Symbol"
        }
      },
      "type": "WebGlLayer",
      "visible": true
    },
    "da049453-a4a2-4978-9094-f18ba264ebf4": {
      "name": "Custom Vector Tile Layer",
      "parameters": {
        "color": {},
        "opacity": 1.0,
        "source": "b37ddc4f-43e7-4349-a69f-3c6217bbe4e0",
        "symbologyState": {}
      },
      "type": "VectorTileLayer",
      "visible": true
    },
    "dea6a6ef-2741-45e5-9f92-4746e9220268": {
      "name": "Custom GeoTiff Layer",
      "parameters": {
        "opacity": 1.0,
        "source": "1c6e7374-4dd6-4c22-bc96-3d56cf790929",
        "symbologyState": {
          "alphaBand": 4.0,
          "band": 1.0,
          "blueBand": 3.0,
          "colorRamp": "viridis",
          "greenBand": 2.0,
          "interpolation": "linear",
          "mode": "equal interval",
          "nClasses": "9",
          "redBand": 1.0,
          "renderType": "Single Symbol"
        }
      },
      "type": "WebGlLayer",
      "visible": true
    }
  },
  "metadata": {},
  "options": {
    "bearing": 0.0,
    "extent": [
      -20037508.34278924,
      -10998461.038975678,
      20037508.34278924,
      10998461.038975678
    ],
    "latitude": 0.0,
    "longitude": 0.0,
    "pitch": 0.0,
    "projection": "EPSG:3857",
    "zoom": 2.4522412404308187
  },
  "schemaVersion": "0.5.0",
  "sources": {
    "1bd41376-3841-4eeb-9a3a-ed6a0eaa95d1": {
      "name": "Custom GeoTiff Source",
      "parameters": {
        "interpolate": false,
        "normalize": true,
        "urls": [
          {}
        ],
        "wrapX": false
      },
      "type": "GeoTiffSource"
    },
    "1c6e7374-4dd6-4c22-bc96-3d56cf790929": {
      "name": "Custom GeoTiff Source",
      "parameters": {
        "interpolate": false,
        "normalize": true,
        "urls": [
          {}
        ],
        "wrapX": false
      },
      "type": "GeoTiffSource"
    },
    "b37ddc4f-43e7-4349-a69f-3c6217bbe4e0": {
      "name": "Custom Vector Tile Layer Source",
      "parameters": {
        "attribution": "",
        "maxZoom": 24.0,
        "minZoom": 0.0,
        "provider": "",
        "url": "",
        "urlParameters": {}
      },
      "type": "VectorTileSource"
    }
  },
  "stories": {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions