1 - Verificar as informações da imagem a ser reprojetada e recortada:
GRASS 7.0.svn (gramame):~ > gdalinfo Geoprocessamento/raster/srtm/SB-25-Y-C.tif
Driver: GTiff/GeoTIFF
Files: Geoprocessamento/raster/srtm/SB-25-Y-C.tif
Size is 1800, 1200
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]]
Origin = (-36.000415601243731,-7.000415916030761)
Pixel Size = (0.000833333353512,-0.000833333353512)
Metadata:
TIFFTAG_SOFTWARE=IMAGINE TIFF Support
Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved
@(#)$RCSfile: etif.c $ $Revision: 1.10.1.9 $ $Date: 2003/11/13 19:25:49EST $
TIFFTAG_XRESOLUTION=1
TIFFTAG_YRESOLUTION=1
TIFFTAG_RESOLUTIONUNIT=1 (unitless)
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( -36.0004156, -7.0004159) ( 36d 0' 1.50"W, 7d 0' 1.50"S)
Lower Left ( -36.0004156, -8.0004159) ( 36d 0' 1.50"W, 8d 0' 1.50"S)
Upper Right ( -34.5004156, -7.0004159) ( 34d30' 1.50"W, 7d 0' 1.50"S)
Lower Right ( -34.5004156, -8.0004159) ( 34d30' 1.50"W, 8d 0' 1.50"S)
Center ( -35.2504156, -7.5004159) ( 35d15' 1.50"W, 7d30' 1.50"S)
Band 1 Block=1800x2 Type=UInt16, ColorInterp=Gray
GRASS 7.0.svn (gramame):~ > g.region -p
projection: 1 (UTM)
zone: -25
datum: sam69
ellipsoid: sam69
north: 9206640
south: 9180540
west: 259380
east: 300780
nsres: 90
ewres: 90
rows: 290
cols: 460
cells: 133400
GRASS 7.0.svn (gramame):~ > eval `g.region -g`
4 - Verificar o resultado do comando anterior com o comando "echo", observe que é exibido o retângulo envolvente da região definida como default:
GRASS 7.0.svn (gramame):~ > echo "$w $s $e $n"
259380 9180540 300780 9206640
5 - Verificar a projeção definida na location:
GRASS 7.0.svn (gramame):~ > g.proj -wf
PROJCS["UTM Zone 25, Southern Hemisphere",GEOGCS["sam69",DATUM["South_American_Datum_1969",SPHEROID["South_American_Datum_1969",6378160,298.25]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]
6 - Usar o comando "gdalwarp" para recortar e reprojetar a imagem a partir da projeção definida no grass e do retângulo envolvente da region:
GRASS 7.0.svn (gramame):~ > gdalwarp -t_srs "`g.proj -wf`" -te $w $s $e $n \
Geoprocessamento/raster/srtm/SB-25-Y-C.tif \
Geoprocessamento/raster/srtm/srtm_clip_utm25.tif
Creating output file that is 450P x 283L.
Processing input file Geoprocessamento/raster/srtm/SB-25-Y-C.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
7 - Verificar a imagem reprojetada e cortada:
GRASS 7.0.svn (gramame):~ > gdalinfo Geoprocessamento/raster/srtm/srtm_clip_utm25.tif
Driver: GTiff/GeoTIFF
Files: Geoprocessamento/raster/srtm/srtm_clip_utm25.tif
Size is 450, 283
Coordinate System is:
PROJCS["UTM Zone 25, Southern Hemisphere",
GEOGCS["sam69",
DATUM["South_American_Datum_1969",
SPHEROID["South_American_Datum_1969",6378160,298.25,
AUTHORITY["EPSG","7036"]],
AUTHORITY["EPSG","6291"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-33],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",10000000],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (259380.000000000000000,9206640.000000000000000)
Pixel Size = (92.000000000000000,-92.226148409893995)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 259380.000, 9206640.000) ( 35d10'43.72"W, 7d10'19.95"S)
Lower Left ( 259380.000, 9180540.000) ( 35d10'47.83"W, 7d24'29.27"S)
Upper Right ( 300780.000, 9206640.000) ( 34d48'14.67"W, 7d10'25.80"S)
Lower Right ( 300780.000, 9180540.000) ( 34d48'18.07"W, 7d24'35.32"S)
Center ( 280080.000, 9193590.000) ( 34d59'31.09"W, 7d17'27.72"S)
Band 1 Block=450x9 Type=UInt16, ColorInterp=Gray
8 - Importar a imagem reprojetada e cortada:
GRASS 7.0.svn (gramame):~ > r.in.gdal input=Geoprocessamento/raster/srtm/srtm_clip_utm25.tif output=mde
Projection of input dataset and current location appear to match
100%
r.in.gdal complete. Raster map
Um abraço e até o próximo post :)
Nenhum comentário:
Postar um comentário