Re: [gdal-dev] Warping onto an image with only GCPs with Python

2012-01-13 Thread Brian Case
Anton, you can get the extents of the modis swath file from the metadata. you have to use the the geolocation arrays to create a grid from the swath file. the further left and right from the center of the image the more area the single pixel in the swath file covers. also modis is a pushbroom sen

[gdal-dev] Warping onto an image with only GCPs with Python

2012-01-13 Thread Anton Korosov
Dear Brian, thank you very much for your reply! The '-geoloc' switch does produce the error about points failing to transform but the principal limitation is that I cannot use the '-te' switch because I cannot know the extent in advance. My task is to overlay one image (either projected like

Re: [gdal-dev] Warping onto an image with only GCPs with Python

2012-01-12 Thread Brian Case
Anton EOS_SWATH has 2 geolocation arrays, you might try the -geoloc switch to gdalwarp, otherwise it creates a handfull of gcps from the arrays, if you get a error about points failing to transform, set the output extent with the -te switch. also you could try the swath2grid application in https:

[gdal-dev] Warping onto an image with only GCPs with Python

2012-01-12 Thread Anton Korosov
Hello everyone! Some time ago I've asked about problems with gdalwarp (the e-mails below). I tried to utilize Python binding instead but got the same results. This brief script overlays the Europe map (GeoTIFF with geotransform) onto a MERIS images (PDS file with GCPs). But the result looks

Re: [gdal-dev] Warping onto an image with only GCPs

2011-12-16 Thread Anton Korosov
Hi! I'm not sure but probably my question is related to the one below. I'm trying to mosaic one MODIS images onto another with GDAL: gdal_translate HDF4_EOS:EOS_SWATH:"/Data/sat/GDAL_test/MYD021KM.A2011228.0925.005.2011229003113.hdf":MODIS_SWATH_Type_L1B:EV_1KM_RefSB -b 1 /data/modis1.tif gd

[gdal-dev] Warping onto an image with only GCPs

2011-12-15 Thread Knut-Frode Dagestad
Hi, Hróbjartur Þorsteinsson explained to me a near-hidden feature of GDAL, namely to reproject one image onto the coverage of another. Given two images: imageA.tiff imageB.tiff Then an empty image can be created from image A with e.g. $ gdal_translate -ot Float32 -scale 0 0 999 999 -a_nodata