TransWikia.com

Extracting certain portion of a geotiff with node-gdal

Geographic Information Systems Asked by atemiz88 on January 5, 2021

I use node server. And I want send coordinates of an area then extract related portion of the geotiff file (dem) using node-gdal.

Is it possible to do this with node-gdal?

One Answer

Gdal_translate allows you to export to another raster, clipping on the way out by either pixel/lines or geo-referenced co-ordinates:

-srcwin xoff yoff xsize ysize: Selects a subwindow from the source image for copying based on pixel/line location.

-projwin ulx uly lrx lry: Selects a subwindow from the source image for copying (like -srcwin) but with the corners given in georeferenced coordinates (by default expressed in the SRS of the dataset. Can be changed with -projwin_srs). Note: in GDAL 2.1.0 and 2.1.1, using -projwin with coordinates not aligned with pixels will result in a sub-pixel shift. This has been corrected in later versions. When selecting non-nearest neighbour resampling, starting with GDAL 2.1.0, sub-pixel accuracy is however used to get better results.

Answered by ProudGIS on January 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP