Sometimes raw raster data coming with raw format which does not include any projection infomation in metadata. Using such raw data is difficult for further processing; therfore, it could be very useful to convert them to the format such as Geotiff which is usable for different purposes. On the other hand, due to large valume of the high resolution raster dataset, they are distributed in the tiles so that each tile covers only a special zone while making a mosaic out of several tiles to further analysis is compulsary.
One of the computer software library for reading and writing raster and vector geospatial data formats, which is released under the permissive X/MIT style free software license by the Open Source Geospatial Foundation is GDAL (Geospatial Data Abstraction Library). This library includes tools for both raster (gdal_translate, gdal_warp etc.) & vector (ogr2ogr, ogrmerge etc.). However, it is well-known for its tools for dealing with big raster datasets.
In this sample code, this powerful library was used to convert the SID (MrSID – Multi-resolution Seamless Image Database) to GeoTiff & to create mosaic out of the converted raster tiles. Finally, to generate a perview of the produced mosaic with low volume.
Fig. 1: One tile of the orthophoto image
Conversion of SID to GeoTiff
in the first step, it is required to use loop in bash to read and conver each SID tile to GeoTiff one.
Getting the list of converted files
Making mosaic out of file’s list
Creation of the preview from produced mosaic
Fig. 2: Created preview of the mosaic image