Please ignore this thread. I've finally figured out that it was an error in code on my part. I thought that my code was reading the .map file, when in fact it was reading the GeoTIFF file that had been converted from the .map/ozf2 earlier in the program. My humble apologies.
(I may post a new thread later regarding why the GeoTIFF is not georeferenced correctly). Thanks for your tolerance. :-) Nik. On 12/11/2012, at 12:45 PM, Nik Sands <nix...@nixanz.com> wrote: > I still don't have any resolution to this issue, but thanks to feedback from > one list reader, I've been prompted to find out some more information... > > gdalinfo produces the following output, which is contrary to what my > application produces: > > Coordinate System is `LOCAL_CS[""Ozi" projection "(UTM) Universal > Transverse Mercator"",UNIT["Meter",1]]' > > So I need to figure out why my application is not getting this from the same > file. > > Note that my build of GDAL is from a recent version of the trunk (September, > 2012): > > $ gdalinfo --version > GDAL 2.0dev, released 2011/12/29 > > And was built for Mac OS X using the following configure (which I noted at > the time for future reference as it took me ages to get this to work :-): > > ./configure \ > --with-macosx-framework \ > --with-threads \ > --disable-static \ > --without-pg \ > --without-grass \ > --without-libgrass \ > --without-cfitsio \ > --without-pcraster \ > --without-netcdf \ > --without-ogdi \ > --without-fme \ > --without-hdf4 \ > --without-hdf5 \ > --without-jasper \ > --without-kakadu \ > --without-bsb \ > --without-grib \ > --without-mysql \ > --without-ingres \ > --without-xerces \ > --without-odbc \ > --without-curl \ > --without-sqlite3 \ > --without-idb \ > --without-sde \ > CFLAGS="-Os -arch i386 -arch x86_64" \ > CXXFLAGS="-Os -arch i386 -arch x86_64" \ > LDFLAGS="-arch i386 -arch x86_64" > > > > On 07/11/2012, at 11:11 AM, Nik Sands <nix...@nixanz.com> wrote: > >> Hi all, >> >> My application is reading in ozi file pairs (.ozf2/.map), warping them and >> saving out as GeoTIFF or other file formats using GDAL. It works fine for >> my own ozf files, but not for the files sent to me by one of my users (who >> apparently has a large number of files they want to use). >> >> It has been unable to get a useful spatial reference system from the ozi >> file pair (.ozf2/.map) sent to me (.map content below). The following code: >> >> ------------------ >> OGRSpatialReferenceH srcSRS = OSRNewSpatialReference(pszSrcWKT); >> char *srcWKT; >> >> OSRExportToWkt(srcSRS, &srcWKT); >> printf("\n%s\n\n", srcWKT); >> ------------------ >> >> produces the following output: >> >> ------------------ >> LOCAL_CS["unnamed",UNIT["unknown",1]] >> ------------------ >> >> Can somebody please help me to use GDAL to obtain a valid spatial reference >> system from this .map file (content below)? >> >> Note that I'm using a fairly recent build of GDAL trunk that includes all >> the ozi datums, etc, including "Australian Geodetic 1966" and it is able to >> get a valid SRS from my own files that use the same ozi datum. >> >> The complete content of the ozi .map file in question is below. >> >> Thanks in anticipation, >> Nik. >> >> >> OziExplorer Map Data File Version 2.2 >> r2256.jgw >> D:\Documents and Settings\nelsonp\My Documents\General >> Admin\Personal\Tasmania 1 to 25,000\North West OZF2\r2256.ozf2 >> 1 ,Map Code, >> Australian Geodetic 1966,WGS 84, 0.0000, 0.0000,WGS 84 >> Reserved 1 >> Reserved 2 >> Magnetic Variation,,,E >> Map Projection,(UTM) Universal Transverse >> Mercator,PolyCal,No,AutoCalOnly,No,BSBUseWPX,No >> Point01,xy, 0, 0,in, deg, , ,, , ,, grid, >> 55,219999.09067205,5570000.7412442,S >> Point02,xy, 1000, 1000,in, deg, , ,, , ,, grid, >> 55,223259.16350298,5566740.6684133,S >> Point03,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point04,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point05,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point06,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point07,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point08,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point09,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point10,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point11,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point12,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point13,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point14,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point15,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point16,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point17,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point18,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point19,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point20,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point21,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point22,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point23,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point24,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point25,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point26,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point27,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point28,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point29,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Point30,xy, , ,in, deg, , ,, , ,, grid, , >> , , >> Projection Setup, 0.000000000, -120.000000000, 0.999600000, >> 0.00, -4000000.00, 34.000000000, 40.500000000,,, >> Map Feature = MF ; Map Comment = MC These follow if they exist >> Track File = TF These follow if they exist >> Moving Map Parameters = MM? These follow if they exist >> MM0,Yes >> MMPNUM,4 >> MMPXY,1,0,0 >> MMPXY,2,6136,0 >> MMPXY,3,6136,3069 >> MMPXY,4,0,3069 >> MMPLL,1, 143.721340, -39.973660 >> MMPLL,2, 143.955261, -39.980047 >> MMPLL,3, 143.951253, -40.070068 >> MMPLL,4, 143.717025, -40.063661 >> MM1B,3.251882 >> MOP,Map Open Position,0,0 >> IWH,Map Image Width/Height,6136,3069 >> >> _______________________________________________ >> gdal-dev mailing list >> gdal-dev@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/gdal-dev > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev