====== Tools → Raster Manager ====== This application allows users to manipulate raster data. There is a command line interface (CLI) that can be used to execute some raster operations like: * see raster details (number of bands, bands informations, ...) * see informations about raster blocking * make a copy of a raster file * raster conversions (jpg to png, tiff to jpg, ...) * change raster resolution * extract a specific band of a raster * reproject the raster * trim a raster ===== Design ===== This tools is organized in two modules: * **core:** this module controls all application functions. * **console:** the CLI application that can be used to execute raster operations. ==== Command Line Parameters ==== === Functions === * **info:** Tool show Raster Informations * **copy:** Tool that make a copy of the **input** raster. * In this tool, the **output** parameter is required. * **reproject:** Tool that reproject a raster based in the **srid** passed. * **convert:** Tool that convert a raster based in the **extension** passed. * If you pass the **output**, the image will have these output path (including name and extension). * Else, if you pass the **extension**, the image will have the sabe name, but the extension passed. * **resolution:** Tool that change the raster resolution based in the **method** and **scale** passed. * **trim:** Tool that trim a raster based in the **envelope** passed. * **block-info:** Tool that show informations about **input** raster blocking. === Parameters === * **input:** Parameter for all tools. It's the full path of the raster, including the file name and extension. * **output:** Parameter containing the full path of the output raster, including the file name and extension. * It's used by the tools (copy, reproject, ...). Some tools overwrite the input raster if the **output** doesn't be declared. * **band:** Parameter that receive a list of bands indexes that the user would like to copy. * **method:** Method used to change resolution * 1 for NearestNeighbor * 2 for Bilinear * 3 for Bicubic * **scale:** Parameter that receive a scale integer for the tool is based. * For example: with a **scale** equal 2, all raster grid cells dimensions will be multiplied to 2. * But if **scale** equal -2, all raster grid cells dimensions will be divided to 2. * **srid:** Parameter that receive a srid code for the tool is based. * **extension:** Parameter that receive a extension for the tool is based. * **envelope:** Parameter that receive four doubles representind a envelope (box). * The order of passing parameters is: llx lly urx ury * Example: --envelope -40 -30 -20 5 * **band-type:** Parameter that define witch type the output raster will have. * (Not implemented yet!) ==== Class Diagram ==== ==== RasterManager ==== ===== From Theory to Practice ===== ==== Info Tool ==== * To Show informations about the **input** raster --info --input "D:\MyRasters\raster.tif" ==== Copy Tool ==== * To copy a raster --copy --input "D:\MyRasters\raster.tif" --output "D:\MyRasters\raster_copy.tif" * To copy specifc raster bands --copy --input "D:\MyRasters\raster.tif" --output "D:\MyRasters\raster_copy.tif" --band 2 3 * To copy raster changing the band type (Not implemented yet!) --copy --input "D:\MyRasters\raster.tif" --output "D:\MyRasters\raster_copy.tif" --band-type 4 ==== Reproject Tool ==== * To reproject a raster (overwriting the input raster) --reproject --input "D:\MyRasters\raster.tif" --srid 29181 * To reproject a raster (new raster) --reproject --input "D:\MyRasters\raster.tif" --output "D:\MyRasters\raster_reprojected.tif" --srid 29181 ==== Convert Tool ==== * To convert a raster --convert --input "D:\MyRasters\raster.tif" --extension jpg * To convert a raster (specifc output) --convert --input "D:\MyRasters\raster.tif" "D:\MyRasters\raster_converted.jpg" ==== Resolution Tool ==== * To change the resolution ( *2 ) (overwriting the input raster) --resolution --input "D:\MyRasters\raster.tif" --method 1 --scale 2 * To change the resolution ( *-2 ) (overwriting the input raster) --resolution --input "D:\MyRasters\raster.tif" --method 1 --scale -2 * To change the resolution ( *2) (new raster) --resolution --input "D:\MyRasters\raster.tif" --output "D:\MyRasters\raster_new.tif" --method 1 --scale -2 ==== Trim Tool ==== * To trim a raster (overwriting the input raster) --trim --input "D:\MyRasters\raster.tif" --envelope -40 -30 -20 5 * To trim a raster (new raster) --trim --input "D:\MyRasters\raster.tif" --output "D:\MyRasters\raster_trimmed.tif" --envelope -40 -30 -20 5 ==== Block Info Tool ==== * To show raster blocking informations --block-info --input "D:\MyRasters\raster.tif" ===== Module Summary ===== ===== Final Remarks ===== * **COLOCAR UMA LISTA DE TODAS AS PENDENCIAS E MELHORIAS FUTURAS PREVISTAS E DESEJADAS** - Acrescentar um método puramente virtual na fábrica do raster com a seguinte assinatura: * virtual std::map getCapabilities() const = 0; - Documentar na wii quais os valores padrões de chave que são retorndos: * supported_formats -> lista de valores separadas por virgula - Acrescentar um método getCapabilities à classe Raster ===== References =====