[gdal-dev] gdalwarp of multiresolution vrt problem
Christophe MAZO- <Soc.Ext.>
christophe.mazo at external.thalesgroup.com
Thu Nov 19 06:23:47 EST 2009
Hi,
I am trying to use VRT files and gdalwarp to mosaic and tile
multiresolution images. I use two images at different resolutions which
overlap and compute the mosaic using gdalbuildvrt.
The vrt produced has wrong "y resolution and y size", so I first edit
the y coordinates of the vrt (ticket 3198). Then, I use gdalwarp with
cubic interpolation to cut a portion of the mosaic where the input
images overlap.
The image produced shows a slight offset in position and scaling between
the two input images in the mosaic and no cubic interpolation of the
background image.
I run the following commands:
*gdalbuildvrt mosaic.vrt -resolution highest imageL00.jpg imageL06.jpg
gdalwarp mosaic.vrt -r CUBIC -te 0 0 0.03 0.03 cut_vrt.jpg*
The same calculation works perfectly when using directly gdalwarp
without vrt:
*gdalwarp imageL00.jpg imageL06.jpg -r CUBIC -te 0 0 0.03 0.03 cut_warp.jpg*
Any idea of what I am doing wrong?
Many thanks,
Christophe.
More details on the images used:
D:\Geo_Images\multi_Resolution_Data\test\bug_report>gdalinfo imageL06.jpg
Driver: JPEG/JPEG JFIF
Files: imageL06.jpg
imageL06.jpg.aux.xml
Size is 1024, 1024
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 = (0.000000000000000,0.015625000000000)
Pixel Size = (0.000015258789063,-0.000015258789063)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
SOURCE_COLOR_SPACE=YCbCr
INTERLEAVE=PIXEL
COMPRESSION=JPEG
Corner Coordinates:
Upper Left ( 0.0000000, 0.0156250) ( 0d 0'0.01"E, 0d 0'56.25"N)
Lower Left ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.01"N)
Upper Right ( 0.0156250, 0.0156250) ( 0d 0'56.25"E, 0d 0'56.25"N)
Lower Right ( 0.0156250, 0.0000000) ( 0d 0'56.25"E, 0d 0'0.01"N)
Center ( 0.0078125, 0.0078125) ( 0d 0'28.13"E, 0d 0'28.13"N)
Band 1 Block=1024x1 Type=Byte, ColorInterp=Red
Metadata:
LAYER_TYPE=athematic
Image Structure Metadata:
COMPRESSION=JPEG
Band 2 Block=1024x1 Type=Byte, ColorInterp=Green
Metadata:
LAYER_TYPE=athematic
Image Structure Metadata:
COMPRESSION=JPEG
Band 3 Block=1024x1 Type=Byte, ColorInterp=Blue
Metadata:
LAYER_TYPE=athematic
Image Structure Metadata:
COMPRESSION=JPEG
D:\Geo_Images\multi_Resolution_Data\test\bug_report>gdalinfo imageL00.jpg
Driver: JPEG/JPEG JFIF
Files: imageL00.jpg
imageL00.jpg.aux.xml
Size is 1024, 1024
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 = (0.000000000000000,1.000000000000000)
Pixel Size = (0.000976562500000,-0.000976562500000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
SOURCE_COLOR_SPACE=YCbCr
INTERLEAVE=PIXEL
COMPRESSION=JPEG
Corner Coordinates:
Upper Left ( 0.0000000, 1.0000000) ( 0d 0'0.01"E, 1d 0'0.00"N)
Lower Left ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.01"N)
Upper Right ( 1.0000000, 1.0000000) ( 1d 0'0.00"E, 1d 0'0.00"N)
Lower Right ( 1.0000000, 0.0000000) ( 1d 0'0.00"E, 0d 0'0.01"N)
Center ( 0.5000000, 0.5000000) ( 0d30'0.00"E, 0d30'0.00"N)
Band 1 Block=1024x1 Type=Byte, ColorInterp=Red
Metadata:
LAYER_TYPE=athematic
Image Structure Metadata:
COMPRESSION=JPEG
Band 2 Block=1024x1 Type=Byte, ColorInterp=Green
Metadata:
LAYER_TYPE=athematic
Image Structure Metadata:
COMPRESSION=JPEG
Band 3 Block=1024x1 Type=Byte, ColorInterp=Blue
Metadata:
LAYER_TYPE=athematic
Image Structure Metadata:
COMPRESSION=JPEG
D:\Geo_Images\multi_Resolution_Data\test\bug_report>gdalinfo mosaic.vrt
Driver: VRT/Virtual Raster
Files: mosaic.vrt
Size is 65536, 65536
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 = (0.000000000000000,1.000000000000000)
Pixel Size = (0.000015258789063,-0.000015258789063)
Corner Coordinates:
Upper Left ( 0.0000000, 1.0000000) ( 0d 0'0.01"E, 1d 0'0.00"N)
Lower Left ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.01"N)
Upper Right ( 1.0000000, 1.0000000) ( 1d 0'0.00"E, 1d 0'0.00"N)
Lower Right ( 1.0000000, 0.0000000) ( 1d 0'0.00"E, 0d 0'0.01"N)
Center ( 0.5000000, 0.5000000) ( 0d30'0.00"E, 0d30'0.00"N)
Band 1 Block=128x128 Type=Byte, ColorInterp=Red
Band 2 Block=128x128 Type=Byte, ColorInterp=Green
Band 3 Block=128x128 Type=Byte, ColorInterp=Blue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091119/34a32f7a/attachment.html
More information about the gdal-dev
mailing list