Skip to content

Doc: Add DTM tutorial #12792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 31, 2025
Merged

Doc: Add DTM tutorial #12792

merged 5 commits into from
Jul 31, 2025

Conversation

geographika
Copy link
Collaborator

@geographika geographika commented Jul 24, 2025

A first draft of a tutorial working with a DTM and the GDAL raster commands. Tested on Linux and Windows (PowerShell), using the "traditional" tools and the new GDAL CLI. A few additional glossary items have also been added. Images included in the docs have been shrunk to keep the doc size down. Both the traditional tools and GDAL CLI worked flawlessly.

Preview online at https://gdal--12792.org.readthedocs.build/en/12792/tutorials/raster_dtm_tut.html

Please let me know if there are any errors / misconceptions / better ways to do things.

Notes/questions:

  • The geometry type needs to be set with -nlt POLYGON using ogr2ogr. This does not seem to be necessary using gdal vector pipeline
  • I think --allow-bbox-outside-source is required as the projections for the vector and raster datasets differ (rather than the polygon is outside the raster extent).
  • The final image would look better with a white background. I think this would require creating a new image?

@geographika geographika added funded through GSP Work funded through the GDAL Sponsorship Program documentation Issues and contributions to the documentation content labels Jul 24, 2025
@dbaston
Copy link
Member

dbaston commented Jul 29, 2025

The geometry type needs to be set with -nlt POLYGON using ogr2ogr. This does not seem to be necessary using gdal vector pipeline

I would add set-geom-type --geometry-type MultiPolygon to the pipeline for consistency. If you leave the geometry type as-is (MultiSurface) then gdalwarp will complain about it.

The final image would look better with a white background. I think this would require creating a new image?

Or a transparent background? I think it's OK to manipulate the images for display.

Do we have any concerns about the image sizes?

geographika and others added 2 commits July 30, 2025 14:12
@geographika
Copy link
Collaborator Author

Thanks @dbaston for the thorough review - I've updated the PR with your suggestions.

I would add set-geom-type --geometry-type MultiPolygon to the pipeline for consistency. If you leave the geometry type as-is (MultiSurface) then gdalwarp will complain about it.

Done.

The final image would look better with a white background. I think this would require creating a new image?

Or a transparent background? I think it's OK to manipulate the images for display.

Do we have any concerns about the image sizes?

I have updated to use a transparent background, and reduced vertical exaggeration - and much happier with the output!
All images for the docs have been reduced in size and compressed using pillow. In total, all images for the tutorial are 374 KB.

@rouault rouault merged commit 7e1eba0 into OSGeo:master Jul 31, 2025
2 checks passed
@rouault rouault added this to the 3.12.0 milestone Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues and contributions to the documentation content funded through GSP Work funded through the GDAL Sponsorship Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants