Thanks for the reply. Firstly, it did resolve my problem, so thanks very much
for this information.
However, I don't get that warning with gdalinfo (see below). But I set the
environment variable in my code, and it did resolve the problem for me there
which is all that matters, I guess. :-)
I'm curious though, how does the quality of an image affect this? I had
assumed that transforms would work on on pixel x,y coordinates irrespective of
the colour values of those pixels.
Anyhow, thanks again for your help. Much appreciated.
Cheers,
Nik.
----------------------------------
$ env | grep OZI
$ gdalinfo Cradle\ Mountain_ozf.map
Driver: OZI/OziExplorer Image File
Files: Cradle Mountain_ozf.map
Size is 6535, 11880
Coordinate System is:
PROJCS["UTM Zone 55, Southern Hemisphere",
GEOGCS["GDA94",
DATUM["Geocentric_Datum_of_Australia_1994",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6283"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
...
...
...
----------------------------------
On 29/11/2012, at 10:08 PM, Jean-Claude Repetto <[email protected]> wrote:
> Le 28/11/2012 22:54, Nik Sands a écrit :
>
>> After applying the suggested patch, it no longer errors out in the same way,
>> however, I now get another error just a little further on in my code.
>>
>> ---------------------------------
>> Failed to get geo-transform (error 3) for file: Cradle Mountain_ozf.map
>> ---------------------------------
>>
>> I'm afraid this is a bit beyond me, so if you can help, I'd be very grateful.
>
> Did you notice that gdalinfo reports the same error ?
>
> $ gdalinfo --debug on -noct Cradle\ Mountain_ozf.map
> GDAL: GDALLoadOziMapFile(Cradle Mountain_ozf.map) found file, wasn't able to
> derive a first order geotransform. Using points as GCPs.
> GDAL: GDALOpen(Cradle Mountain_ozf.map, this=0x155a4a0) succeeds as OZI.
> Driver: OZI/OziExplorer Image File
> GDAL: GDALDefaultOverviews::OverviewScan()
> Files: Cradle Mountain_ozf.map
> Size is 6535, 11880
> Coordinate System is `'
> GCP Projection =
> PROJCS["UTM Zone 55, Southern Hemisphere",
> GEOGCS["GDA94",
> DATUM["Geocentric_Datum_of_Australia_1994",
> SPHEROID["GRS 1980",6378137,298.257222101,
> AUTHORITY["EPSG","7019"]],
> TOWGS84[0,0,0,0,0,0,0],
> AUTHORITY["EPSG","6283"]],
> PRIMEM["Greenwich",0,
> AUTHORITY["EPSG","8901"]],
> UNIT["degree",0.0174532925199433,
> AUTHORITY["EPSG","9122"]],
> AUTHORITY["EPSG","4283"]],
> PROJECTION["Transverse_Mercator"],
> PARAMETER["latitude_of_origin",0],
> PARAMETER["central_meridian",147],
> PARAMETER["scale_factor",0.9996],
> PARAMETER["false_easting",500000],
> PARAMETER["false_northing",10000000],
> UNIT["Meter",1]]
> GCP[ 0]: Id=, Info=
> (749,50) -> (410000,5397000,0)
> GCP[ 1]: Id=, Info=
> (4697,38) -> (415000,5397000,0)
> GCP[ 2]: Id=, Info=
> (4668,11128) -> (415000,5383000,0)
> GCP[ 3]: Id=, Info=
> (757,11164) -> (410000,5383000,0)
> GCP[ 4]: Id=, Info=
> (1532,5600) -> (411000,5390000,0)
> GCP[ 5]: Id=, Info=
> (3112,1611) -> (413000,5395000,0)
> GCP[ 6]: Id=, Info=
> (3894,7962) -> (414000,5387000,0)
> GCP[ 7]: Id=, Info=
> (3890,4794) -> (414000,5391000,0)
> GCP[ 8]: Id=, Info=
> (2318,9563) -> (412000,5385000,0)
> Corner Coordinates:
> Upper Left ( 0.0, 0.0)
> Lower Left ( 0.0,11880.0)
> Upper Right ( 6535.0, 0.0)
> Lower Right ( 6535.0,11880.0)
> Center ( 3267.5, 5940.0)
> Band 1 Block=64x64 Type=Byte, ColorInterp=Palette
> Overviews: 1634x2970, 654x1188, 327x594, 163x297, 65x119
> Color Table (RGB with 256 entries)
> GDAL: GDALClose(Cradle Mountain_ozf.map, this=0x155a4a0)
>
>
> This is because the quality of the scan is very bad. Look at the text "No
> Camping Allowed", that appears almost twice. You can ask GDAL to ignore the
> problem by setting the environment variable OZI_APPROX_GEOTRANSFORM to the
> value YES (In this case, you can drop the patch I sent you yesterday) :
>
> $ OZI_APPROX_GEOTRANSFORM=YES gdalinfo -noct Cradle\ Mountain_ozf.map Driver:
> OZI/OziExplorer Image File
> Files: Cradle Mountain_ozf.map
> Size is 6535, 11880
> Coordinate System is:
> PROJCS["UTM Zone 55, Southern Hemisphere",
> GEOGCS["GDA94",
> DATUM["Geocentric_Datum_of_Australia_1994",
> SPHEROID["GRS 1980",6378137,298.257222101,
> AUTHORITY["EPSG","7019"]],
> TOWGS84[0,0,0,0,0,0,0],
> AUTHORITY["EPSG","6283"]],
> PRIMEM["Greenwich",0,
> AUTHORITY["EPSG","8901"]],
> UNIT["degree",0.0174532925199433,
> AUTHORITY["EPSG","9122"]],
> AUTHORITY["EPSG","4283"]],
> PROJECTION["Transverse_Mercator"],
> PARAMETER["latitude_of_origin",0],
> PARAMETER["central_meridian",147],
> PARAMETER["scale_factor",0.9996],
> PARAMETER["false_easting",500000],
> PARAMETER["false_northing",10000000],
> UNIT["Meter",1]]
> GeoTransform =
> 409038.6971553778, 1.27227951543291, 0.00115086216077703
> 5397071.561063163, -0.008135856054426157, -1.260559301556319
> Corner Coordinates:
> Upper Left ( 409038.697, 5397071.561) (145d54'32.19"E, 41d34'22.31"S)
> Lower Left ( 409052.369, 5382096.117) (145d54'24.58"E, 41d42'27.83"S)
> Upper Right ( 417353.044, 5397018.393) (146d 0'31.13"E, 41d34'27.29"S)
> Lower Right ( 417366.716, 5382042.949) (146d 0'24.27"E, 41d42'32.82"S)
> Center ( 413202.707, 5389557.255) (145d57'28.05"E, 41d38'27.60"S)
> Band 1 Block=64x64 Type=Byte, ColorInterp=Palette
> Overviews: 1634x2970, 654x1188, 327x594, 163x297, 65x119
> Color Table (RGB with 256 entries)
>
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev