Skip to content

Commit

Permalink
Merge pull request #82 from rouault/fix_81
Browse files Browse the repository at this point in the history
Fix test failures with PROJ 9.1.1
  • Loading branch information
rouault committed Nov 26, 2022
2 parents 881164f + 468e2a1 commit 671f6d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
7 changes: 6 additions & 1 deletion libgeotiff/bin/listgeo.c
Expand Up @@ -29,6 +29,7 @@ void Usage()
" -tfw: Generate a .tfw (ESRI TIFF World) file for the target file.\n"
" -proj4: Report PROJ.4 equivalent projection definition.\n"
" -no_norm: Don't report 'normalized' parameter values.\n"
" -no_corners: Don't report corner coordinates.\n"
" filename: Name of the GeoTIFF file to report on.\n" );

exit( 1 );
Expand All @@ -42,6 +43,7 @@ int main(int argc, char *argv[])
int i, norm_print_flag = 1, proj4_print_flag = 0;
int tfw_flag = 0, inv_flag = 0, dec_flag = 0;
int st_test_flag = 0;
int corners = 1;

/*
* Handle command line options.
Expand All @@ -50,6 +52,8 @@ int main(int argc, char *argv[])
{
if( strcmp(argv[i],"-no_norm") == 0 )
norm_print_flag = 0;
else if( strcmp(argv[i],"-no_corners") == 0 )
corners = 0;
else if( strcmp(argv[i],"-tfw") == 0 )
tfw_flag = 1;
else if( strcmp(argv[i],"-proj4") == 0 )
Expand Down Expand Up @@ -130,7 +134,8 @@ int main(int argc, char *argv[])

TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &xsize );
TIFFGetField( tif, TIFFTAG_IMAGELENGTH, &ysize );
GTIFPrintCorners( gtif, &defn, stdout, xsize, ysize, inv_flag, dec_flag );
if( corners )
GTIFPrintCorners( gtif, &defn, stdout, xsize, ysize, inv_flag, dec_flag );
}

}
Expand Down
4 changes: 2 additions & 2 deletions libgeotiff/test/testlistgeo
Expand Up @@ -59,11 +59,11 @@ $EXE ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ProjectedCSTypeGeoKey_28191_cassini_soldner.tif" >> ${OUT}
$EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif >>${OUT}
$EXE -no_corners ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo cassini_soldner.tif" >> ${OUT}
$EXE ${DATA_DIR}/cassini_soldner.tif >>${OUT}
$EXE -no_corners ${DATA_DIR}/cassini_soldner.tif >>${OUT}
echo "" >>${OUT}

echo "Testing listgeo ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif" >> ${OUT}
Expand Down
14 changes: 0 additions & 14 deletions libgeotiff/test/testlistgeo_out.dist
Expand Up @@ -299,13 +299,6 @@ Ellipsoid: 7010/Clarke 1880 (Benoit) (6378300.79,6356566.43)
Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
Projection Linear Units: 9001/metre (1.000000m)

Corner Coordinates:
Upper Left ( 440720.000, 3751320.000) ( 40d47'28.08"E, 64d13'29.57"N)
Lower Left ( 440720.000, 3751260.000) ( 40d47'27.69"E, 64d13'27.64"N)
Upper Right ( 440780.000, 3751320.000) ( 40d47'32.51"E, 64d13'29.40"N)
Lower Right ( 440780.000, 3751260.000) ( 40d47'32.12"E, 64d13'27.47"N)
Center ( 440750.000, 3751290.000) ( 40d47'30.10"E, 64d13'28.52"N)

Testing listgeo cassini_soldner.tif
Geotiff_Information:
Version: 1
Expand Down Expand Up @@ -348,13 +341,6 @@ Projection Method: CT_CassiniSoldner
ProjFalseNorthingGeoKey: 126867.909000 m
Projection Linear Units: 9001/metre (1.000000m)

Corner Coordinates:
Upper Left ( 440720.000, 3751320.000) ( 40d47'28.08"E, 64d13'29.57"N)
Lower Left ( 440720.000, 3751260.000) ( 40d47'27.69"E, 64d13'27.64"N)
Upper Right ( 440780.000, 3751320.000) ( 40d47'32.51"E, 64d13'29.40"N)
Lower Right ( 440780.000, 3751260.000) ( 40d47'32.12"E, 64d13'27.47"N)
Center ( 440750.000, 3751290.000) ( 40d47'30.10"E, 64d13'28.52"N)

Testing listgeo ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif
Geotiff_Information:
Version: 1
Expand Down

0 comments on commit 671f6d5

Please sign in to comment.