gdalbuildvrt you can use the
-te option to set the extents of the VRT by giving xmin ymin xmax ymax values in georeferenced units . All pixels outside the extents area will be ignored, thus it is useful to set a rectangular extent and hide map borders (eg. for scanned maps). This way is quite faster than crop source files and generate new ones. In addition the source file is not touched and image quality and structure is preserved
Command line example:
gdalbuildvrt -a_srs EPSG:25830 -te 447000 4673223 481902 4692780 output_file.vrt input_file.ecw
( the -a_srs option included in the example is not mandatory, I have included it to give a context )
To do this it would be necessary to add a new line in the Advanced options section of the VRT builder UI with something like
Set extents (-te)
and a box to write the
xmin ymin xmax ymax values
This text could be added to Tips
- Use the (-te) option to set the extents of the VRT by giving xmin ymin xmax ymax values in georeferenced units. All pixels outside the extents area will be ignored. This is useful to hide map borders.
Another approach would be to add a generic User options line with a free box where the user could write options for gdalbuildvrt command line when needed. With this one there is no need to add more specefic options to the UI.
May be both lines (Set Extents and User options) could be considered
The Set Extents option could be also useful for qmaptool