[Talk-br] Georeferencing CBERS image

Jean-Guilhem Cailton jgc em arkemie.com
Quarta Junho 23 17:25:18 BST 2010


Samuel,

This is what I did to georeference the image (probably quicker for you 
to do this than download it from my computer) :

1. Download from http://imagens.dgi.inpe.br/cdsr/vgeorge472433/ an unzip 
CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.tif 
<http://imagens.dgi.inpe.br/cdsr/vgeorge472433/CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.tif.zip>, 


2. Reproject it to epsg:4326 :
gdalwarp -t_srs epsg:4326 CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.tif 
CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.epsg4326.tif

3. Remove the localisation info (useful for me to get the control points 
in image pixel coordinates, might not be necessary for you now):
tiffcp CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.epsg4326.tif 
CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.epsg4326.raw.tif

4. Associate control points (file gcp1.opts is attached, see below how I 
made it) with the image :
gdal_translate --optfile gcp1.opts -a_srs epsg:4326 
CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.epsg4326.raw.tif 
CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.epsg4326.raw.gcp1.tif

5. Warp the image based on the control points (-r lanczos option is 
optional) :
gdalwarp -r lanczos 
CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.epsg4326.raw.gcp1.tif 
CBERS_2B_HRC_20091009_146_C_111_2_L2_BAND1.epsg4326.raw.gcp1.lanczos.tif

That's it.


The longest part is to define the control points.

QGis has a georeferencing plugin (and an OSM plugin), but I couldn't get 
it to work to the end for me, so I only used it to match image pixel 
coordinates with long/lat coordinates, using characteristic features 
from the image also present in OSM, while at the same time using JOSM to 
spot the features that looked most accurate from gps tracks. Then I 
edited the file saved from QGis, to put it in the format usable by 
gdal_translate.

If people would like to help in georeferencing, producing this GCP file 
for a given image would be most helpful, since it is otherwise a 
mechanical process to apply it to the image. If needed, I could try to 
give more explanations on this.

Best wishes,

Jean-Guilhem


-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://lists.openstreetmap.org/pipermail/talk-br/attachments/20100623/e4397514/attachment.html>
-------------- Próxima Parte ----------
Um texto embutido e sem conjunto de caracteres especificado foi limpo...
Nome: gcp1.opts
Url: <http://lists.openstreetmap.org/pipermail/talk-br/attachments/20100623/e4397514/attachment.ksh>


More information about the Talk-br mailing list