|
4 | 4 | "cell_type": "markdown", |
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | | - "<a href=\"https://colab.research.google.com/github/kili-technology/kili-python-sdk/blob/main/recipes/importing_multilayer_geosat_assets.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" |
| 7 | + "<a href=\"https://colab.research.google.com/github/kili-technology/kili-python-sdk/blob/main/recipes/importing_multilayer_geospatial_assets.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" |
8 | 8 | ] |
9 | 9 | }, |
10 | 10 | { |
11 | 11 | "cell_type": "markdown", |
12 | 12 | "metadata": {}, |
13 | 13 | "source": [ |
14 | | - "# How to import multi-layer geosat assets to a Kili project\n", |
| 14 | + "# Importing Multi-Layer Geospatial Images into a Kili Project\n", |
15 | 15 | "\n", |
16 | | - "In this tutorial, we will learn how to import multi-layer geosat assets to your project.\n", |
| 16 | + "In this tutorial, we will learn how to import multi-layer geospatial assets to your project.\n", |
17 | 17 | "\n", |
18 | 18 | "Here are the steps that we will follow:\n", |
19 | 19 | "\n", |
|
112 | 112 | "}\n", |
113 | 113 | "\n", |
114 | 114 | "project = kili.create_project(\n", |
115 | | - " title=\"[Kili SDK Notebook]: Importing multi-layer Geosatellite asset\",\n", |
| 115 | + " title=\"[Kili SDK Notebook]: Importing multi-layer Geospatial asset\",\n", |
116 | 116 | " description=\"Project Description\",\n", |
117 | 117 | " input_type=\"IMAGE\",\n", |
118 | 118 | " json_interface=interface,\n", |
|
127 | 127 | "\n", |
128 | 128 | "### Download geotiff file examples\n", |
129 | 129 | "\n", |
130 | | - "Before adding assets you need to download our geotiff examples and add them in a geosat folder, created in the same folder as where you run your python script. It is mandatory to use local files and not urls for geosatellite files." |
| 130 | + "Before adding assets you need to download our geotiff examples and add them in a geospatial folder, created in the same folder as where you run your python script. It is mandatory to use local files and not urls for geospatial files." |
131 | 131 | ] |
132 | 132 | }, |
133 | 133 | { |
|
139 | 139 | "import os\n", |
140 | 140 | "import urllib.request\n", |
141 | 141 | "\n", |
142 | | - "if not os.path.exists(\"geosat\"):\n", |
143 | | - " os.makedirs(\"geosat\")\n", |
| 142 | + "if not os.path.exists(\"geospatial\"):\n", |
| 143 | + " os.makedirs(\"geospatial\")\n", |
144 | 144 | "urllib.request.urlretrieve(\n", |
145 | | - " \"https://storage.googleapis.com/label-public-staging/asset-test-sample/geosat/a.tiff\",\n", |
146 | | - " \"geosat/a.tiff\",\n", |
| 145 | + " \"https://storage.googleapis.com/label-public-staging/asset-test-sample/geospatial/a.tiff\",\n", |
| 146 | + " \"geospatial/a.tiff\",\n", |
147 | 147 | ")\n", |
148 | 148 | "urllib.request.urlretrieve(\n", |
149 | | - " \"https://storage.googleapis.com/label-public-staging/asset-test-sample/geosat/b.tiff\",\n", |
150 | | - " \"geosat/b.tiff\",\n", |
| 149 | + " \"https://storage.googleapis.com/label-public-staging/asset-test-sample/geospatial/b.tiff\",\n", |
| 150 | + " \"geospatial/b.tiff\",\n", |
151 | 151 | ")" |
152 | 152 | ] |
153 | 153 | }, |
|
171 | 171 | "multi_layer_content_array = [\n", |
172 | 172 | " [\n", |
173 | 173 | " {\n", |
174 | | - " \"path\": \"geosat/a.tiff\",\n", |
| 174 | + " \"path\": \"geospatial/a.tiff\",\n", |
175 | 175 | " \"name\": \"Layer 1\",\n", |
176 | 176 | " \"isBaseLayer\": False,\n", |
177 | 177 | " },\n", |
178 | 178 | " {\n", |
179 | | - " \"path\": \"geosat/b.tiff\",\n", |
| 179 | + " \"path\": \"geospatial/b.tiff\",\n", |
180 | 180 | " \"name\": \"Layer 2\",\n", |
181 | 181 | " \"isBaseLayer\": False,\n", |
182 | 182 | " },\n", |
|
215 | 215 | "In this example 4 arguments are used for the `append_many_to_dataset` function :\n", |
216 | 216 | "\n", |
217 | 217 | "1. `project_id`: the id of the project to which you want to add the asset\n", |
218 | | - "1. `multi_layer_content_array`: it is a list of dictionnaries representing the layers created from geosatellite files like GEOTIFFS. For each GEOTIFF you have to set the `path` to the GEOTIFF, the `name` that will be used in kili for the layer and the boolean `isBaseLayer` to define if it's a base layer (only one visible at a time) or an overlay layer (a layer that will be displayed on top of the base layer). This last one is optional and by default if no parameter is set, we consider it is a base layer.\n", |
| 218 | + "1. `multi_layer_content_array`: it is a list of dictionnaries representing the layers created from geospatial files like GEOTIFFS. For each GEOTIFF you have to set the `path` to the GEOTIFF, the `name` that will be used in kili for the layer and the boolean `isBaseLayer` to define if it's a base layer (only one visible at a time) or an overlay layer (a layer that will be displayed on top of the base layer). This last one is optional and by default if no parameter is set, we consider it is a base layer.\n", |
219 | 219 | "1. `json_metadata_array`: This one contains the processing parameters that will be used when processing the files. 3 parameters can be set there :\n", |
220 | 220 | " 1. `epsg`: This one defines the projection (<https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset>) to which we will reproject the dataset. Our frontend supports only two projections : `EPSG:4326` and `EPSG:3857`. If this parameter is not set we will keep the projection of the initial file if it is one of these two, else we will reproject it by default to `EPSG:3857`. By default, we advise to not set this parameter but if you need to use your GEOTIFFS with some tile server (as with openstreetmap here) you will need to reproject it to the same EPSG as the one used by the tile server as our application supports only one EPSG for the whole asset. For your information most of the well known tile server (openstreetmap, googlemaps, etc) are using `EPSG:3857`.\n", |
221 | 221 | " 1. `maxZoom` and `minZoom`: these defines limits of zoom for your GEOTIFF files. This is especially useful for files that will be tiled by our server (file size > 30MB). By default we generate all the zooms until the one of the original file but if you want to limit to specific zoom levels you can constrain them with these parameters.\n", |
|
0 commit comments