Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions source/notebooks/L5/clipping-raster.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -258,33 +258,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"- Next we need to parse the EPSG value from the CRS so that we can create a `Proj4` -string using `PyCRS` library (to ensure that the projection information is saved correctly)."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"32634\n"
]
}
],
"source": [
"# Parse EPSG code\n",
"epsg_code = int(data.crs.data['init'][5:])\n",
"print(epsg_code)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- Now we need to update the metadata with new dimensions, transform (affine) and CRS (as Proj4 text):"
"- Now we need to update the metadata with new dimensions, transform (affine):"
]
},
{
Expand All @@ -297,7 +271,6 @@
" \"height\": out_img.shape[1],\n",
" \"width\": out_img.shape[2],\n",
" \"transform\": out_transform,\n",
" \"crs\": pycrs.parser.from_epsg_code(epsg_code).to_proj4()}\n",
" )"
]
},
Expand Down