[FWTools] gdalbuildvrt does not support positive NS resolution

Even Rouault even.rouault at mines-paris.org
Sun Dec 19 07:04:31 EST 2010


Le dimanche 19 décembre 2010 12:21:59, spider plant a écrit :

The issue is that setting GCPs with gdal_translate isn't sufficient to 
georeference the image. You need to run gdalwarp afterwards so the GCPs are 
used to compute a geotransformation matrix.

gdalwarp map1.tiff map1_warped.tiff
gdalwarp map2.tiff map2_warped.tiff
gdalbuildvrt -overwrite maps_merged.vrt map1.tiff map2.tiff

I'm a bit surprised by the error message you get. With latest gdalbuildvrt, I 
get something more explicit :

Warning 6: gdalbuildvrt does not support ungeoreferenced image. Skipping XXXX

> Hi, I'm trying to stitch several map tiles together into a big image and
> then warp it. However I'm getting error like this from gdalbuildvrt...
> 
> Warning 6: gdalbuildvrt does not support positive NS resolution. Skipping
> map1.tiff
> 
> Searches for this error suggest its got something to do with north not
> being up. But its not clear what this means. (My maps are in the northern
> hemisphere).
> 
> I wondered if I am georeferencing the maps incorrectly. Am I right is
> saying that top-left is (0,0) and the y-axis points downward for pixel
> coordinates within the map? (I cant find anywhere where this is
> documented.) I also tried y-axis pointing upward (giving -ve y-values) as
> this is what quantumGIS seems to use.
> 
> 
> COMMANDS I USE....
> 
> gdal_translate.exe -a_srs EPSG:27700
> -gcp 0 400 241538.5 134628.66666667
> -gcp 600 0 244713.5 136745.33333333
> -gcp 0 0 241538.5 136745.33333333
> -gcp 600 400 244713.5 134628.66666667
> ./map1.png ./map1.tiff
> 
> gdal_translate.exe -a_srs EPSG:27700
> -gcp 0 400 241538.5 132512
> -gcp 600 0 244713.5 134628.66666667
> -gcp 0 0 241538.5 134628.66666667
> -gcp 600 400 244713.5 132512
> ./map2.png ./map2.tiff
> 
> gdalbuildvrt -overwrite maps_merged.vrt map1.tiff map2.tiff
> 
> 
> OUTPUT OF GDALINFO ON MAP1.TIFF....
> 
> Driver: GTiff/GeoTIFF
> Files: map1.tiff
> Size is 600, 400
> Coordinate System is `'
> GCP Projection =
> PROJCS["OSGB 1936 / British National Grid",
>     GEOGCS["OSGB 1936",
>         DATUM["OSGB_1936",
>             SPHEROID["Airy 1830",6377563.396,299.3249646000044,
>                 AUTHORITY["EPSG","7001"]],
>             AUTHORITY["EPSG","6277"]],
>         PRIMEM["Greenwich",0],
>         UNIT["degree",0.0174532925199433],
>         AUTHORITY["EPSG","4277"]],
>     PROJECTION["Transverse_Mercator"],
>     PARAMETER["latitude_of_origin",49],
>     PARAMETER["central_meridian",-2],
>     PARAMETER["scale_factor",0.9996012717],
>     PARAMETER["false_easting",400000],
>     PARAMETER["false_northing",-100000],
>     UNIT["metre",1,
>         AUTHORITY["EPSG","9001"]],
>     AUTHORITY["EPSG","27700"]]
> GCP[  0]: Id=1, Info=
>           (0,400) -> (241538.5,134628.66666667,0)
> GCP[  1]: Id=2, Info=
>           (600,0) -> (244713.5,136745.33333333,0)
> GCP[  2]: Id=3, Info=
>           (0,0) -> (241538.5,136745.33333333,0)
> GCP[  3]: Id=4, Info=
>           (600,400) -> (244713.5,134628.66666667,0)
> Metadata:
>   AREA_OR_POINT=Area
> Image Structure Metadata:
>   INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left  (    0.0,    0.0)
> Lower Left  (    0.0,  400.0)
> Upper Right (  600.0,    0.0)
> Lower Right (  600.0,  400.0)
> Center      (  300.0,  200.0)
> Band 1 Block=600x3 Type=Byte, ColorInterp=Red
>   Mask Flags: PER_DATASET ALPHA
> Band 2 Block=600x3 Type=Byte, ColorInterp=Green
>   Mask Flags: PER_DATASET ALPHA
> Band 3 Block=600x3 Type=Byte, ColorInterp=Blue
>   Mask Flags: PER_DATASET ALPHA
> Band 4 Block=600x3 Type=Byte, ColorInterp=Alpha


More information about the FWTools mailing list