I have a bunch of geotiffs without SRS. It is possible to fix the SRS using GDAL command:
gdal_translate -a_srs EPSG:25832 srcfile targetfile
How can I replace the GDAL command using geotrellis code ?
I have a bunch of geotiffs without SRS. It is possible to fix the SRS using GDAL command:
gdal_translate -a_srs EPSG:25832 srcfile targetfile
How can I replace the GDAL command using geotrellis code ?
import geotrellis.proj4._
import geotrellis.raster.io.geotiff._
val fileName: String = ???
val tif = SinglebandGeoTiff(fileName)
val targetCrs = CRS.fromName("EPSG:25832”)
val reprojected = tif.projectedRaster.reproject(targetCrs)
GeoTiff(reprojected.raster, reprojected.crs).write("/Users/eugene/reprojected.tif")
You can use MultibandGeoTiff
if you're working with multiple bands.