Package list libgeotiff / 59777cb
New upstream version 1.6.0~rc1 Bas Couwenberg 1 year, 5 months ago
43 changed file(s) with 1816 addition(s) and 507 deletion(s). Raw diff Collapse all Expand all
1717
1818 # Version information
1919 set(PROJECT_VERSION_MAJOR 1)
20 set(PROJECT_VERSION_MINOR 5)
21 set(PROJECT_VERSION_PATCH 1)
20 set(PROJECT_VERSION_MINOR 6)
21 set(PROJECT_VERSION_PATCH 0)
2222 set(PROJECT_VERSION
2323 "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
2424 set(GeoTIFF_VERSION ${PROJECT_VERSION})
2828 # libgeotiff.so.2 -> libgeotiff.so.2.2.0
2929 # libgeotiff.so.2.2.0
3030 set(LINK_SOVERSION "5")
31 set(LINK_VERSION "5.0.0")
31 set(LINK_VERSION "5.0.1")
3232
3333 string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
3434 string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
235235 epsg_proj.inc
236236 epsg_vertcs.inc
237237 geokeys.inc
238 geokeys_v1_1.inc
238239 libxtiff/xtiffio.h)
239240
240241 SET(GEOTIFF_MAN_PAGES
1010 TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
1111 endif
1212
13 AM_CFLAGS = -I./libxtiff $(PROJ_CFLAGS) $(TIFF_CFLAGS)
13 AM_CFLAGS = -I$(srcdir)/libxtiff $(PROJ_CFLAGS) $(TIFF_CFLAGS)
1414
1515 include_HEADERS = geotiff.h \
1616 geotiffio.h \
3131 epsg_pcs.inc \
3232 epsg_proj.inc \
3333 epsg_vertcs.inc \
34 geokeys.inc
34 geokeys.inc \
35 geokeys_v1_1.inc
3536
3637 nodist_include_HEADERS = geo_config.h
3738
5152 geo_strtod.c \
5253 geotiff_proj4.c
5354
54 libgeotiff_la_LDFLAGS = -version-info 5:1:0
55 libgeotiff_la_LDFLAGS = -version-info 6:0:1 ${NOUNDEFINED}
5556
5657 libgeotiff_la_LIBADD = libxtiff/libxtiff.la
5758
365365 LDFLAGS = @LDFLAGS@
366366 LIBOBJS = @LIBOBJS@
367367 LIBS = @LIBS@
368 LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
369 LIBTIFF_LIBS = @LIBTIFF_LIBS@
368370 LIBTOOL = @LIBTOOL@
369371 LIPO = @LIPO@
370372 LN_S = @LN_S@
376378 MKDIR_P = @MKDIR_P@
377379 NM = @NM@
378380 NMEDIT = @NMEDIT@
381 NOUNDEFINED = @NOUNDEFINED@
379382 OBJDUMP = @OBJDUMP@
380383 OBJEXT = @OBJEXT@
381384 OTOOL = @OTOOL@
388391 PACKAGE_URL = @PACKAGE_URL@
389392 PACKAGE_VERSION = @PACKAGE_VERSION@
390393 PATH_SEPARATOR = @PATH_SEPARATOR@
394 PKG_CONFIG = @PKG_CONFIG@
395 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
396 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
397 PROJ_CFLAGS = @PROJ_INCLUDE@
391398 PROJ_INCLUDE = @PROJ_INCLUDE@
399 PROJ_LIBS = @PROJ_LIBS@
392400 RANLIB = @RANLIB@
393401 RELEASE_VERSION = @RELEASE_VERSION@
394402 SED = @SED@
479487 @DX_COND_doc_TRUE@ $(DX_CLEAN_PDF) \
480488 @DX_COND_doc_TRUE@ $(DX_CLEAN_LATEX)
481489
482 PROJ_CFLAGS = @PROJ_INCLUDE@
483490 @TIFF_IS_CONFIG_TRUE@TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
484 AM_CFLAGS = -I./libxtiff $(PROJ_CFLAGS) $(TIFF_CFLAGS)
491 AM_CFLAGS = -I$(srcdir)/libxtiff $(PROJ_CFLAGS) $(TIFF_CFLAGS)
485492 include_HEADERS = geotiff.h \
486493 geotiffio.h \
487494 geovalues.h \
501508 epsg_pcs.inc \
502509 epsg_proj.inc \
503510 epsg_vertcs.inc \
504 geokeys.inc
511 geokeys.inc \
512 geokeys_v1_1.inc
505513
506514 nodist_include_HEADERS = geo_config.h
507515 libgeotiff_la_SOURCES = cpl_serv.c \
520528 geo_strtod.c \
521529 geotiff_proj4.c
522530
523 libgeotiff_la_LDFLAGS = -version-info 5:0:0
531 libgeotiff_la_LDFLAGS = -version-info 6:0:1 ${NOUNDEFINED}
524532 libgeotiff_la_LIBADD = libxtiff/libxtiff.la
525533 lib_LTLIBRARIES = libgeotiff.la
526534 EXTRA_DIST = autogen.sh \
0 libgeotiff 1.6.0
1 ----------------
2
3 New features:
4 * Add support for OGC GeoTIFF 1.1
5 * Expose GTIFGetPCSInfoEx(), GTIFGetProjTRFInfoEx(), GTIFGetGCSInfoEx(), GTIFGetDatumInfoEx(), GTIFGetEllipsoidInfoEx(), GTIFGetPMInfoEx(), GTIFGetUOMLengthInfoEx() and GTIFGetUOMAngleInfoEx() so that users can specify their own PROJ context
6 * Add GTIFKeyGetASCII(), GTIFKeyGetSHORT() and GTIFKeyGetDOUBLE() as safer variants of GTIFKeyGet() with type checking
7 * autotools build: enable build in a separate tree from source (#37) (fixes #28)
8 * Use pkg-config for libtiff detection
9
10 Bug fixes:
11 * GTIFDecToDMS(): fix rounding issue (refs #16)
12 * geo_names.c: Silence warning in GetNameFromDatabase
13 * cpl_serv.h: add parenthesis in macro definitions
14 * Fix spelling errors
15 * geo_normalize.c: set UOMLength from GeogLinearUnits (for geocentic CRS) (GDAL #1595)
16 * testlistgeo: remove hardcoded path in test output (fixes https://github.com/OSGeo/libgeotiff/issues/16#issuecomment-502267406)
17 * Adapt test script for PROJ 6.2 EPSG database (fixes #22)
18 * Use unix EOL for cmake related files (fixes #14)
19 * configure.ac: drop dead code
20 * geo_normalize.c: avoid look up of user-defined geokeys that cause PROJ warnings (fixes GDAL #2321)
21 * listgeo: fix corner coordinates for images with RasterPixelIsPoint (#36)
22
023 libgeotiff 1.5.1
124 ----------------
225
1010 or the download archive at:
1111
1212 http://download.osgeo.org/geotiff/
13
14 Mailing List
15 ------------
16
17 To ask questions and to follow release announcements, subscribe at:
18
19 https://lists.osgeo.org/mailman/listinfo/geotiff
1320
1421
1522 Use of LIBTIFF
3037 PROJ 6 or later is a required dependency of libgeotiff 1.5 or later.
3138 The latest version of PROJ can be found at
3239
33 https://proj4.org/
40 https://proj4.org/
3441
3542
3643 Building LIBGEOTIFF:
1818 You have another version of autoconf. It may work, but is not guaranteed to.
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23 dnl serial 11 (pkg-config-0.29.1)
24 dnl
25 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
27 dnl
28 dnl This program is free software; you can redistribute it and/or modify
29 dnl it under the terms of the GNU General Public License as published by
30 dnl the Free Software Foundation; either version 2 of the License, or
31 dnl (at your option) any later version.
32 dnl
33 dnl This program is distributed in the hope that it will be useful, but
34 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
35 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36 dnl General Public License for more details.
37 dnl
38 dnl You should have received a copy of the GNU General Public License
39 dnl along with this program; if not, write to the Free Software
40 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41 dnl 02111-1307, USA.
42 dnl
43 dnl As a special exception to the GNU General Public License, if you
44 dnl distribute this file as part of a program that contains a
45 dnl configuration script generated by Autoconf, you may include it under
46 dnl the same distribution terms that you use for the rest of that
47 dnl program.
48
49 dnl PKG_PREREQ(MIN-VERSION)
50 dnl -----------------------
51 dnl Since: 0.29
52 dnl
53 dnl Verify that the version of the pkg-config macros are at least
54 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
55 dnl installed version of pkg-config, this checks the developer's version
56 dnl of pkg.m4 when generating configure.
57 dnl
58 dnl To ensure that this macro is defined, also add:
59 dnl m4_ifndef([PKG_PREREQ],
60 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
61 dnl
62 dnl See the "Since" comment for each macro you use to see what version
63 dnl of the macros you require.
64 m4_defun([PKG_PREREQ],
65 [m4_define([PKG_MACROS_VERSION], [0.29.1])
66 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
67 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
68 ])dnl PKG_PREREQ
69
70 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
71 dnl ----------------------------------
72 dnl Since: 0.16
73 dnl
74 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
75 dnl first found in the path. Checks that the version of pkg-config found
76 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
77 dnl used since that's the first version where most current features of
78 dnl pkg-config existed.
79 AC_DEFUN([PKG_PROG_PKG_CONFIG],
80 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
81 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
82 m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
83 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
84 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
85 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
86
87 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
88 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
89 fi
90 if test -n "$PKG_CONFIG"; then
91 _pkg_min_version=m4_default([$1], [0.9.0])
92 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
93 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
94 AC_MSG_RESULT([yes])
95 else
96 AC_MSG_RESULT([no])
97 PKG_CONFIG=""
98 fi
99 fi[]dnl
100 ])dnl PKG_PROG_PKG_CONFIG
101
102 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
103 dnl -------------------------------------------------------------------
104 dnl Since: 0.18
105 dnl
106 dnl Check to see whether a particular set of modules exists. Similar to
107 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
108 dnl
109 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
110 dnl only at the first occurence in configure.ac, so if the first place
111 dnl it's called might be skipped (such as if it is within an "if", you
112 dnl have to call PKG_CHECK_EXISTS manually
113 AC_DEFUN([PKG_CHECK_EXISTS],
114 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
115 if test -n "$PKG_CONFIG" && \
116 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
117 m4_default([$2], [:])
118 m4_ifvaln([$3], [else
119 $3])dnl
120 fi])
121
122 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
123 dnl ---------------------------------------------
124 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
125 dnl pkg_failed based on the result.
126 m4_define([_PKG_CONFIG],
127 [if test -n "$$1"; then
128 pkg_cv_[]$1="$$1"
129 elif test -n "$PKG_CONFIG"; then
130 PKG_CHECK_EXISTS([$3],
131 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
132 test "x$?" != "x0" && pkg_failed=yes ],
133 [pkg_failed=yes])
134 else
135 pkg_failed=untried
136 fi[]dnl
137 ])dnl _PKG_CONFIG
138
139 dnl _PKG_SHORT_ERRORS_SUPPORTED
140 dnl ---------------------------
141 dnl Internal check to see if pkg-config supports short errors.
142 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
143 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
144 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
145 _pkg_short_errors_supported=yes
146 else
147 _pkg_short_errors_supported=no
148 fi[]dnl
149 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
150
151
152 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
153 dnl [ACTION-IF-NOT-FOUND])
154 dnl --------------------------------------------------------------
155 dnl Since: 0.4.0
156 dnl
157 dnl Note that if there is a possibility the first call to
158 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
159 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
160 AC_DEFUN([PKG_CHECK_MODULES],
161 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
162 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
163 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
164
165 pkg_failed=no
166 AC_MSG_CHECKING([for $1])
167
168 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
169 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
170
171 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
172 and $1[]_LIBS to avoid the need to call pkg-config.
173 See the pkg-config man page for more details.])
174
175 if test $pkg_failed = yes; then
176 AC_MSG_RESULT([no])
177 _PKG_SHORT_ERRORS_SUPPORTED
178 if test $_pkg_short_errors_supported = yes; then
179 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
180 else
181 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
182 fi
183 # Put the nasty error message in config.log where it belongs
184 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
185
186 m4_default([$4], [AC_MSG_ERROR(
187 [Package requirements ($2) were not met:
188
189 $$1_PKG_ERRORS
190
191 Consider adjusting the PKG_CONFIG_PATH environment variable if you
192 installed software in a non-standard prefix.
193
194 _PKG_TEXT])[]dnl
195 ])
196 elif test $pkg_failed = untried; then
197 AC_MSG_RESULT([no])
198 m4_default([$4], [AC_MSG_FAILURE(
199 [The pkg-config script could not be found or is too old. Make sure it
200 is in your PATH or set the PKG_CONFIG environment variable to the full
201 path to pkg-config.
202
203 _PKG_TEXT
204
205 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
206 ])
207 else
208 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
209 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
210 AC_MSG_RESULT([yes])
211 $3
212 fi[]dnl
213 ])dnl PKG_CHECK_MODULES
214
215
216 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
217 dnl [ACTION-IF-NOT-FOUND])
218 dnl ---------------------------------------------------------------------
219 dnl Since: 0.29
220 dnl
221 dnl Checks for existence of MODULES and gathers its build flags with
222 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
223 dnl and VARIABLE-PREFIX_LIBS from --libs.
224 dnl
225 dnl Note that if there is a possibility the first call to
226 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
227 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
228 dnl configure.ac.
229 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
230 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
231 _save_PKG_CONFIG=$PKG_CONFIG
232 PKG_CONFIG="$PKG_CONFIG --static"
233 PKG_CHECK_MODULES($@)
234 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
235 ])dnl PKG_CHECK_MODULES_STATIC
236
237
238 dnl PKG_INSTALLDIR([DIRECTORY])
239 dnl -------------------------
240 dnl Since: 0.27
241 dnl
242 dnl Substitutes the variable pkgconfigdir as the location where a module
243 dnl should install pkg-config .pc files. By default the directory is
244 dnl $libdir/pkgconfig, but the default can be changed by passing
245 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
246 dnl parameter.
247 AC_DEFUN([PKG_INSTALLDIR],
248 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
249 m4_pushdef([pkg_description],
250 [pkg-config installation directory @<:@]pkg_default[@:>@])
251 AC_ARG_WITH([pkgconfigdir],
252 [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
253 [with_pkgconfigdir=]pkg_default)
254 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
255 m4_popdef([pkg_default])
256 m4_popdef([pkg_description])
257 ])dnl PKG_INSTALLDIR
258
259
260 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
261 dnl --------------------------------
262 dnl Since: 0.27
263 dnl
264 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
265 dnl module should install arch-independent pkg-config .pc files. By
266 dnl default the directory is $datadir/pkgconfig, but the default can be
267 dnl changed by passing DIRECTORY. The user can override through the
268 dnl --with-noarch-pkgconfigdir parameter.
269 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
270 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
271 m4_pushdef([pkg_description],
272 [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
273 AC_ARG_WITH([noarch-pkgconfigdir],
274 [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
275 [with_noarch_pkgconfigdir=]pkg_default)
276 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
277 m4_popdef([pkg_default])
278 m4_popdef([pkg_description])
279 ])dnl PKG_NOARCH_INSTALLDIR
280
281
282 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
283 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
284 dnl -------------------------------------------
285 dnl Since: 0.28
286 dnl
287 dnl Retrieves the value of the pkg-config variable for the given module.
288 AC_DEFUN([PKG_CHECK_VAR],
289 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
290 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
291
292 _PKG_CONFIG([$1], [variable="][$3]["], [$2])
293 AS_VAR_COPY([$1], [pkg_cv_][$1])
294
295 AS_VAR_IF([$1], [""], [$5], [$4])dnl
296 ])dnl PKG_CHECK_VAR
21297
22298 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
23299 #
0 ###############################################################################
1 #
2 # CMake configuration file to build GeoTIFF utility programs
3 #
4 # Author: Mateusz Loskot <mateusz@loskot.net>
5 #
6 ###############################################################################
7
8 INCLUDE_DIRECTORIES(
9 .
10 ${CMAKE_SOURCE_DIR})
11
12 IF(WIN32 AND MSVC)
13 SET(GETOPT_SOURCE getopt.c)
14 ENDIF()
15 ###############################################################################
16 # Collect programs to build
17
18 SET(GEOTIFF_UTILITIES makegeo listgeo applygeo)
19
20 MESSAGE(STATUS "Adding GeoTIFF utilities to build")
21
22 FOREACH(utility ${GEOTIFF_UTILITIES})
23 ADD_EXECUTABLE(${utility} ${utility}.c ${GETOPT_SOURCE})
24 TARGET_LINK_LIBRARIES(${utility} xtiff ${GEOTIFF_LIBRARY_TARGET})
25 ENDFOREACH()
26
27 ADD_EXECUTABLE(geotifcp geotifcp.c ${GETOPT_SOURCE})
28 TARGET_LINK_LIBRARIES(geotifcp
29 xtiff
30 ${GEOTIFF_LIBRARY_TARGET}
31 ${JPEG_LIBRARIES}
32 ${ZLIB_LIBRARIES})
33
34 SET(GEOTIFF_UTILITIES ${GEOTIFF_UTILITIES} geotifcp )
35
36 MESSAGE(STATUS "Adding GeoTIFF utilities to build - done: ${GEOTIFF_UTILITIES}")
37
38 ###############################################################################
39 # Targets installation
40
41 INSTALL(TARGETS ${GEOTIFF_UTILITIES}
42 RUNTIME DESTINATION ${GEOTIFF_BIN_DIR}
43 LIBRARY DESTINATION ${GEOTIFF_LIB_DIR}
44 ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR})
0 ###############################################################################
1 #
2 # CMake configuration file to build GeoTIFF utility programs
3 #
4 # Author: Mateusz Loskot <mateusz@loskot.net>
5 #
6 ###############################################################################
7
8 INCLUDE_DIRECTORIES(
9 .
10 ${CMAKE_SOURCE_DIR})
11
12 IF(WIN32 AND MSVC)
13 SET(GETOPT_SOURCE getopt.c)
14 ENDIF()
15 ###############################################################################
16 # Collect programs to build
17
18 SET(GEOTIFF_UTILITIES makegeo listgeo applygeo)
19
20 MESSAGE(STATUS "Adding GeoTIFF utilities to build")
21
22 FOREACH(utility ${GEOTIFF_UTILITIES})
23 ADD_EXECUTABLE(${utility} ${utility}.c ${GETOPT_SOURCE})
24 TARGET_LINK_LIBRARIES(${utility} xtiff ${GEOTIFF_LIBRARY_TARGET})
25 ENDFOREACH()
26
27 ADD_EXECUTABLE(geotifcp geotifcp.c ${GETOPT_SOURCE})
28 TARGET_LINK_LIBRARIES(geotifcp
29 xtiff
30 ${GEOTIFF_LIBRARY_TARGET}
31 ${JPEG_LIBRARIES}
32 ${ZLIB_LIBRARIES})
33
34 SET(GEOTIFF_UTILITIES ${GEOTIFF_UTILITIES} geotifcp )
35
36 MESSAGE(STATUS "Adding GeoTIFF utilities to build - done: ${GEOTIFF_UTILITIES}")
37
38 ###############################################################################
39 # Targets installation
40
41 INSTALL(TARGETS ${GEOTIFF_UTILITIES}
42 RUNTIME DESTINATION ${GEOTIFF_BIN_DIR}
43 LIBRARY DESTINATION ${GEOTIFF_LIB_DIR}
44 ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR})
1111 TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
1212 endif
1313
14 AM_CFLAGS = -I../ -I../libxtiff $(TIFF_CFLAGS) @PROJ_INCLUDE@
14 AM_CFLAGS = -I../ -I$(srcdir)/.. -I$(srcdir)/../libxtiff $(TIFF_CFLAGS) @PROJ_INCLUDE@
1515
1616 LDADD = ../libgeotiff.la
1717
250250 LDFLAGS = @LDFLAGS@
251251 LIBOBJS = @LIBOBJS@
252252 LIBS = @LIBS@
253 LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
254 LIBTIFF_LIBS = @LIBTIFF_LIBS@
253255 LIBTOOL = @LIBTOOL@
254256 LIPO = @LIPO@
255257 LN_S = @LN_S@
261263 MKDIR_P = @MKDIR_P@
262264 NM = @NM@
263265 NMEDIT = @NMEDIT@
266 NOUNDEFINED = @NOUNDEFINED@
264267 OBJDUMP = @OBJDUMP@
265268 OBJEXT = @OBJEXT@
266269 OTOOL = @OTOOL@
273276 PACKAGE_URL = @PACKAGE_URL@
274277 PACKAGE_VERSION = @PACKAGE_VERSION@
275278 PATH_SEPARATOR = @PATH_SEPARATOR@
279 PKG_CONFIG = @PKG_CONFIG@
280 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
281 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
282 PROJ_CFLAGS = @PROJ_CFLAGS@
276283 PROJ_INCLUDE = @PROJ_INCLUDE@
284 PROJ_LIBS = @PROJ_LIBS@
277285 RANLIB = @RANLIB@
278286 RELEASE_VERSION = @RELEASE_VERSION@
279287 SED = @SED@
343351 listgeo_SOURCES = listgeo.c
344352 applygeo_SOURCES = applygeo.c
345353 @TIFF_IS_CONFIG_TRUE@TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
346 AM_CFLAGS = -I../ -I../libxtiff $(TIFF_CFLAGS) @PROJ_INCLUDE@
354 AM_CFLAGS = -I../ -I$(srcdir)/.. -I$(srcdir)/../libxtiff $(TIFF_CFLAGS) @PROJ_INCLUDE@
347355 LDADD = ../libgeotiff.la
348356 EXTRA_DIST = getopt.c
349357 all: all-am
6363 static int processCompressOptions(char*);
6464 static void usage(void);
6565
66 static int forced_version = 0;
67 static unsigned short version = 0;
68 static unsigned short key_version = 0;
69 static unsigned short minor_revision = 0;
70
71 static int parseVersion(const char* str)
72 {
73 if( strlen(str) != 5 || str[1] != ':' || str[3] != ':' )
74 return 0;
75 if( str[0] < '0' || str[0] > '9' )
76 return 0;
77 if( str[2] < '0' || str[2] > '9' )
78 return 0;
79 if( str[4] < '0' || str[4] > '9' )
80 return 0;
81 forced_version = 1;
82 version = str[0] - '0';
83 key_version = str[2] - '0';
84 minor_revision = str[4] - '0';
85 return 1;
86 }
87
88 static void SetVersionNumbers(GTIF* gtif)
89 {
90 if( forced_version )
91 {
92 GTIFSetVersionNumbers(gtif, version, key_version, minor_revision);
93 }
94 }
6695
6796 int
6897 main(int argc, char* argv[])
83112
84113 *mp++ = 'w';
85114 *mp = '\0';
86 while ((c = getopt(argc, argv, "c:f:l:o:p:r:w:e:g:4:aistd8BLMC")) != -1)
115 while ((c = getopt(argc, argv, "c:f:l:o:p:r:w:e:g:4:v:aistd8BLMC")) != -1)
87116 switch (c) {
88117 case 'a': /* append to output */
89118 mode[0] = 'a';
157186 break;
158187 case '8':
159188 *mp++ = '8'; *mp = '\0';
189 break;
190 case 'v':
191 if (!parseVersion(optarg))
192 usage();
160193 break;
161194 case '?':
162195 usage();
301334 exit (-1);
302335 }
303336 }
337 SetVersionNumbers(gtif);
304338 GTIFWriteKeys(gtif);
305339 GTIFFree(gtif);
306340 return;
331365 gtif->gt_flags |= FLAG_FILE_MODIFIED;
332366
333367 /* Install keys and tags */
368 SetVersionNumbers(gtif);
334369 GTIFWriteKeys(gtif);
335370 GTIFFree(gtif);
336371 return;
396431 " -g file install GeoTIFF metadata from <file>",
397432 " -4 proj4_str install GeoTIFF metadata from proj4 string",
398433 " -e file install positioning info from ESRI Worldfile <file>",
434 " -v v:k:m force the GeoTIFF version numbers (v=version, k=key_major, m=minor_rev)",
399435 " -a append to output instead of overwriting",
400436 " -8 write BigTIFF instead of default ClassicTIFF",
401437 " -o offset set initial directory offset",
584620 static int
585621 tiffcp(TIFF* in, TIFF* out)
586622 {
587 uint16 bitspersample, samplesperpixel, shortv;
623 uint16 bitspersample = 0, samplesperpixel, shortv;
588624 copyFunc cf;
589625 uint32 w, l;
590626
1919 static TIFF *st_setup_test_info();
2020
2121 void Usage()
22
2322 {
2423 printf(
2524 "%s",
2726 "\n"
2827 " -d: report lat/long corners in decimal degrees instead of DMS.\n"
2928 " -tfw: Generate a .tfw (ESRI TIFF World) file for the target file.\n"
30 " -proj4: Report PROJ.4 equivelent projection definition.\n"
29 " -proj4: Report PROJ.4 equivalent projection definition.\n"
3130 " -no_norm: Don't report 'normalized' parameter values.\n"
3231 " filename: Name of the GeoTIFF file to report on.\n" );
3332
197196 }
198197 else
199198 {
200 fprintf( fp_out, " (%s,", GTIFDecToDMS( x, "Long", 2 ) );
201 fprintf( fp_out, "%s)", GTIFDecToDMS( y, "Lat", 2 ) );
199 const char* pszLong = GTIFDecToDMS( x, "Long", 2 );
200 if( pszLong[0] == 0 )
201 {
202 fprintf( fp_out, " (invalid)" );
203 }
204 else
205 {
206 fprintf( fp_out, " (%s,", pszLong );
207 fprintf( fp_out, "%s)", GTIFDecToDMS( y, "Lat", 2 ) );
208 }
202209 }
203210 }
204211
218225
219226 {
220227 printf( "\nCorner Coordinates:\n" );
228
229 unsigned short raster_type = RasterPixelIsArea;
230 GTIFKeyGetSHORT(gtif, GTRasterTypeGeoKey, &raster_type, 0, 1);
231
232 double xmin = (raster_type == RasterPixelIsArea) ? 0.0 : -0.5;
233 double ymin = xmin;
234 double ymax = ymin + ysize;
235 double xmax = xmin + xsize;
236
221237 if( !GTIFReportACorner( gtif, defn, fp_out,
222 "Upper Left", 0.0, 0.0, inv_flag, dec_flag ) )
238 "Upper Left", xmin, ymin, inv_flag, dec_flag ) )
223239 {
224240 printf( " ... unable to transform points between pixel/line and PCS space\n" );
225241 return;
226242 }
227243
228 GTIFReportACorner( gtif, defn, fp_out, "Lower Left", 0.0, ysize,
244 GTIFReportACorner( gtif, defn, fp_out, "Lower Left", xmin, ymax,
229245 inv_flag, dec_flag );
230 GTIFReportACorner( gtif, defn, fp_out, "Upper Right", xsize, 0.0,
246 GTIFReportACorner( gtif, defn, fp_out, "Upper Right", xmax, ymin,
231247 inv_flag, dec_flag );
232 GTIFReportACorner( gtif, defn, fp_out, "Lower Right", xsize, ysize,
248 GTIFReportACorner( gtif, defn, fp_out, "Lower Right", xmax, ymax,
233249 inv_flag, dec_flag );
234 GTIFReportACorner( gtif, defn, fp_out, "Center", xsize/2.0, ysize/2.0,
250 GTIFReportACorner( gtif, defn, fp_out, "Center", xmin + xsize/2.0, ymin + ysize/2.0,
235251 inv_flag, dec_flag );
236252 }
237253
2424 {
2525 char *fname = "newgeo.tif";
2626 TIFF *tif; /* TIFF-level descriptor */
27 GTIF *gtif; /* GeoKey-level descriptor */
27 GTIF *gtif = NULL; /* GeoKey-level descriptor */
2828
2929 tif=XTIFFOpen(fname,"w");
3030 if (!tif) goto failure;
0 ###############################################################################
1 #
2 # CMake module to search for GeoTIFF library
3 #
4 # On success, the macro sets the following variables:
5 # GEOTIFF_FOUND = if the library found
6 # GEOTIFF_LIBRARIES = full path to the library
7 # GEOTIFF_INCLUDE_DIR = where to find the library headers
8 # also defined, but not for general use are
9 # GEOTIFF_LIBRARY, where to find the PROJ.4 library.
10 #
11 # Copyright (c) 2009 Mateusz Loskot <mateusz@loskot.net>
12 #
13 # Module source: http://github.com/mloskot/workshop/tree/master/cmake/
14 #
15 # Redistribution and use is allowed according to the terms of the BSD license.
16 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
17 #
18 ###############################################################################
19
20 SET(GEOTIFF_NAMES geotiff)
21
22 IF(WIN32)
23
24 IF(MINGW)
25 FIND_PATH(GEOTIFF_INCLUDE_DIR
26 geotiff.h
27 PATH_PREFIXES geotiff
28 PATHS
29 /usr/local/include
30 /usr/include
31 c:/msys/local/include)
32
33 FIND_LIBRARY(GEOTIFF_LIBRARY
34 NAMES ${GEOTIFF_NAMES}
35 PATHS
36 /usr/local/lib
37 /usr/lib
38 c:/msys/local/lib)
39 ENDIF(MINGW)
40
41 IF(MSVC)
42 SET(GEOTIFF_INCLUDE_DIR "$ENV{LIB_DIR}/include" CACHE STRING INTERNAL)
43
44 SET(GEOTIFF_NAMES ${GEOTIFF_NAMES} geotiff_i)
45 FIND_LIBRARY(GEOTIFF_LIBRARY NAMES
46 NAMES ${GEOTIFF_NAMES}
47 PATHS
48 "$ENV{LIB_DIR}/lib"
49 /usr/lib
50 c:/msys/local/lib)
51 ENDIF(MSVC)
52
53 ELSEIF(UNIX)
54
55 FIND_PATH(GEOTIFF_INCLUDE_DIR geotiff.h PATH_PREFIXES geotiff)
56
57 FIND_LIBRARY(GEOTIFF_LIBRARY NAMES ${GEOTIFF_NAMES})
58
59 ELSE()
60 MESSAGE("FindGeoTIFF.cmake: unrecognized or unsupported operating system")
61 ENDIF()
62
63 IF(GEOTIFF_FOUND)
64 SET(GEOTIFF_LIBRARIES ${GEOTIFF_LIBRARY})
65 ENDIF()
66
67 # Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE
68 # if all listed variables are TRUE
69 INCLUDE(FindPackageHandleStandardArgs)
70 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOTIFF DEFAULT_MSG GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR)
0 ###############################################################################
1 #
2 # CMake module to search for GeoTIFF library
3 #
4 # On success, the macro sets the following variables:
5 # GEOTIFF_FOUND = if the library found
6 # GEOTIFF_LIBRARIES = full path to the library
7 # GEOTIFF_INCLUDE_DIR = where to find the library headers
8 # also defined, but not for general use are
9 # GEOTIFF_LIBRARY, where to find the PROJ.4 library.
10 #
11 # Copyright (c) 2009 Mateusz Loskot <mateusz@loskot.net>
12 #
13 # Module source: http://github.com/mloskot/workshop/tree/master/cmake/
14 #
15 # Redistribution and use is allowed according to the terms of the BSD license.
16 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
17 #
18 ###############################################################################
19
20 SET(GEOTIFF_NAMES geotiff)
21
22 IF(WIN32)
23
24 IF(MINGW)
25 FIND_PATH(GEOTIFF_INCLUDE_DIR
26 geotiff.h
27 PATH_PREFIXES geotiff
28 PATHS
29 /usr/local/include
30 /usr/include
31 c:/msys/local/include)
32
33 FIND_LIBRARY(GEOTIFF_LIBRARY
34 NAMES ${GEOTIFF_NAMES}
35 PATHS
36 /usr/local/lib
37 /usr/lib
38 c:/msys/local/lib)
39 ENDIF(MINGW)
40
41 IF(MSVC)
42 SET(GEOTIFF_INCLUDE_DIR "$ENV{LIB_DIR}/include" CACHE STRING INTERNAL)
43
44 SET(GEOTIFF_NAMES ${GEOTIFF_NAMES} geotiff_i)
45 FIND_LIBRARY(GEOTIFF_LIBRARY NAMES
46 NAMES ${GEOTIFF_NAMES}
47 PATHS
48 "$ENV{LIB_DIR}/lib"
49 /usr/lib
50 c:/msys/local/lib)
51 ENDIF(MSVC)
52
53 ELSEIF(UNIX)
54
55 FIND_PATH(GEOTIFF_INCLUDE_DIR geotiff.h PATH_PREFIXES geotiff)
56
57 FIND_LIBRARY(GEOTIFF_LIBRARY NAMES ${GEOTIFF_NAMES})
58
59 ELSE()
60 MESSAGE("FindGeoTIFF.cmake: unrecognized or unsupported operating system")
61 ENDIF()
62
63 IF(GEOTIFF_FOUND)
64 SET(GEOTIFF_LIBRARIES ${GEOTIFF_LIBRARY})
65 ENDIF()
66
67 # Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE
68 # if all listed variables are TRUE
69 INCLUDE(FindPackageHandleStandardArgs)
70 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOTIFF DEFAULT_MSG GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR)
0 ###############################################################################
1 # CMake module to search for PROJ library
2 #
3 # On success, the macro sets the following variables:
4 # PROJ_FOUND = if the library found
5 # PROJ_LIBRARY = full path to the library
6 # PROJ_INCLUDE_DIR = where to find the library headers
7 # also defined, but not for general use are
8 # PROJ_LIBRARY, where to find the PROJ library.
9 #
10 # Copyright (c) 2009 Mateusz Loskot <mateusz@loskot.net>
11 #
12 # Redistribution and use is allowed according to the terms of the BSD license.
13 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
14 #
15 ###############################################################################
16
17 # Try to use OSGeo4W installation
18 IF(WIN32)
19 SET(PROJ4_OSGEO4W_HOME "C:/OSGeo4W")
20
21 IF($ENV{OSGEO4W_HOME})
22 SET(PROJ4_OSGEO4W_HOME "$ENV{OSGEO4W_HOME}")
23 ENDIF()
24 ENDIF(WIN32)
25
26 FIND_PATH(PROJ_INCLUDE_DIR proj.h proj_experimental;h
27 PATHS ${PROJ_OSGEO4W_HOME}/include
28 DOC "Path to PROJ library include directory")
29
30 SET(PROJ_NAMES ${PROJ_NAMES} proj proj_i)
31 FIND_LIBRARY(PROJ_LIBRARY
32 NAMES ${PROJ_NAMES}
33 PATHS ${PROJ_OSGEO4W_HOME}/lib
34 DOC "Path to PROJ library file")
35
36 # Handle the QUIETLY and REQUIRED arguments and set PROJ_FOUND to TRUE
37 # if all listed variables are TRUE
38 INCLUDE(FindPackageHandleStandardArgs)
39 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
40
41 IF(PROJ_FOUND)
42 SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
43 ENDIF()
0 ###############################################################################
1 # CMake module to search for PROJ library
2 #
3 # On success, the macro sets the following variables:
4 # PROJ_FOUND = if the library found
5 # PROJ_LIBRARY = full path to the library
6 # PROJ_INCLUDE_DIR = where to find the library headers
7 # also defined, but not for general use are
8 # PROJ_LIBRARY, where to find the PROJ library.
9 #
10 # Copyright (c) 2009 Mateusz Loskot <mateusz@loskot.net>
11 #
12 # Redistribution and use is allowed according to the terms of the BSD license.
13 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
14 #
15 ###############################################################################
16
17 # Try to use OSGeo4W installation
18 IF(WIN32)
19 SET(PROJ4_OSGEO4W_HOME "C:/OSGeo4W")
20
21 IF($ENV{OSGEO4W_HOME})
22 SET(PROJ4_OSGEO4W_HOME "$ENV{OSGEO4W_HOME}")
23 ENDIF()
24 ENDIF(WIN32)
25
26 FIND_PATH(PROJ_INCLUDE_DIR proj.h proj_experimental;h
27 PATHS ${PROJ_OSGEO4W_HOME}/include
28 DOC "Path to PROJ library include directory")
29
30 SET(PROJ_NAMES ${PROJ_NAMES} proj proj_i)
31 FIND_LIBRARY(PROJ_LIBRARY
32 NAMES ${PROJ_NAMES}
33 PATHS ${PROJ_OSGEO4W_HOME}/lib
34 DOC "Path to PROJ library file")
35
36 # Handle the QUIETLY and REQUIRED arguments and set PROJ_FOUND to TRUE
37 # if all listed variables are TRUE
38 INCLUDE(FindPackageHandleStandardArgs)
39 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ DEFAULT_MSG PROJ_LIBRARY PROJ_INCLUDE_DIR)
40
41 IF(PROJ_FOUND)
42 SET(PROJ_LIBRARIES ${PROJ_LIBRARY})
43 ENDIF()
183183 LDFLAGS = @LDFLAGS@
184184 LIBOBJS = @LIBOBJS@
185185 LIBS = @LIBS@
186 LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
187 LIBTIFF_LIBS = @LIBTIFF_LIBS@
186188 LIBTOOL = @LIBTOOL@
187189 LIPO = @LIPO@
188190 LN_S = @LN_S@
194196 MKDIR_P = @MKDIR_P@
195197 NM = @NM@
196198 NMEDIT = @NMEDIT@
199 NOUNDEFINED = @NOUNDEFINED@
197200 OBJDUMP = @OBJDUMP@
198201 OBJEXT = @OBJEXT@
199202 OTOOL = @OTOOL@
206209 PACKAGE_URL = @PACKAGE_URL@
207210 PACKAGE_VERSION = @PACKAGE_VERSION@
208211 PATH_SEPARATOR = @PATH_SEPARATOR@
212 PKG_CONFIG = @PKG_CONFIG@
213 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
214 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
215 PROJ_CFLAGS = @PROJ_CFLAGS@
209216 PROJ_INCLUDE = @PROJ_INCLUDE@
217 PROJ_LIBS = @PROJ_LIBS@
210218 RANLIB = @RANLIB@
211219 RELEASE_VERSION = @RELEASE_VERSION@
212220 SED = @SED@
0 #ifndef GEO_CONFIG_H
1 #define GEO_CONFIG_H
2
3 /* Define if you have the <stdlib.h> header file. */
4 #cmakedefine HAVE_STDLIB_H
5
6 /* Define if you have the <string.h> header file. */
7 #cmakedefine HAVE_STRING_H
8
9 /* Define if you have the <strings.h> header file. */
10 #cmakedefine HAVE_STRINGS_H
11
12 #cmakedefine GEO_NORMALIZE_DISABLE_TOWGS84
13
14 #endif /* ndef GEO_CONFIG_H */
0 #ifndef GEO_CONFIG_H
1 #define GEO_CONFIG_H
2
3 /* Define if you have the <stdlib.h> header file. */
4 #cmakedefine HAVE_STDLIB_H
5
6 /* Define if you have the <string.h> header file. */
7 #cmakedefine HAVE_STRING_H
8
9 /* Define if you have the <strings.h> header file. */
10 #cmakedefine HAVE_STRINGS_H
11
12 #cmakedefine GEO_NORMALIZE_DISABLE_TOWGS84
13
14 #endif /* ndef GEO_CONFIG_H */
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for libgeotiff 1.5.1.
2 # Generated by GNU Autoconf 2.69 for libgeotiff 1.6.0.
33 #
44 # Report bugs to <warmerdam@pobox.com>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='libgeotiff'
591591 PACKAGE_TARNAME='libgeotiff'
592 PACKAGE_VERSION='1.5.1'
593 PACKAGE_STRING='libgeotiff 1.5.1'
592 PACKAGE_VERSION='1.6.0'
593 PACKAGE_STRING='libgeotiff 1.6.0'
594594 PACKAGE_BUGREPORT='warmerdam@pobox.com'
595595 PACKAGE_URL=''
596596
681681 DX_DOCDIR
682682 DX_CONFIG
683683 DX_PROJECT
684 NOUNDEFINED
684685 PROJ_INCLUDE
686 PROJ_LIBS
687 PROJ_CFLAGS
685688 TIFF_IS_CONFIG_FALSE
686689 TIFF_IS_CONFIG_TRUE
687690 TIFF_PREFIX
688691 TIFF_INC
692 LIBTIFF_LIBS
693 LIBTIFF_CFLAGS
694 PKG_CONFIG_LIBDIR
695 PKG_CONFIG_PATH
696 PKG_CONFIG
689697 JPEG_IS_CONFIG_FALSE
690698 JPEG_IS_CONFIG_TRUE
691699 JPEG_PREFIX
855863 CPPFLAGS
856864 LT_SYS_LIBRARY_PATH
857865 CPP
866 PKG_CONFIG
867 PKG_CONFIG_PATH
868 PKG_CONFIG_LIBDIR
869 LIBTIFF_CFLAGS
870 LIBTIFF_LIBS
871 PROJ_CFLAGS
872 PROJ_LIBS
858873 DOXYGEN_PAPER_SIZE'
859874
860875
14061421 # Omit some internal or obsolete options to make the list less imposing.
14071422 # This message is too long to be a string in the A/UX 3.1 sh.
14081423 cat <<_ACEOF
1409 \`configure' configures libgeotiff 1.5.1 to adapt to many kinds of systems.
1424 \`configure' configures libgeotiff 1.6.0 to adapt to many kinds of systems.
14101425
14111426 Usage: $0 [OPTION]... [VAR=VALUE]...
14121427
14771492
14781493 if test -n "$ac_init_help"; then
14791494 case $ac_init_help in
1480 short | recursive ) echo "Configuration of libgeotiff 1.5.1:";;
1495 short | recursive ) echo "Configuration of libgeotiff 1.6.0:";;
14811496 esac
14821497 cat <<\_ACEOF
14831498
15431558 LT_SYS_LIBRARY_PATH
15441559 User-defined run-time library search path.
15451560 CPP C preprocessor
1561 PKG_CONFIG path to pkg-config utility
1562 PKG_CONFIG_PATH
1563 directories to add to pkg-config's search path
1564 PKG_CONFIG_LIBDIR
1565 path overriding pkg-config's built-in search path
1566 LIBTIFF_CFLAGS
1567 C compiler flags for LIBTIFF, overriding pkg-config
1568 LIBTIFF_LIBS
1569 linker flags for LIBTIFF, overriding pkg-config
1570 PROJ_CFLAGS C compiler flags for PROJ, overriding pkg-config
1571 PROJ_LIBS linker flags for PROJ, overriding pkg-config
15461572 DOXYGEN_PAPER_SIZE
15471573 a4wide (default), a4, letter, legal or executive
15481574
16121638 test -n "$ac_init_help" && exit $ac_status
16131639 if $ac_init_version; then
16141640 cat <<\_ACEOF
1615 libgeotiff configure 1.5.1
1641 libgeotiff configure 1.6.0
16161642 generated by GNU Autoconf 2.69
16171643
16181644 Copyright (C) 2012 Free Software Foundation, Inc.
19812007 This file contains any messages produced by compilers while
19822008 running configure, to aid debugging if configure makes a mistake.
19832009
1984 It was created by libgeotiff $as_me 1.5.1, which was
2010 It was created by libgeotiff $as_me 1.6.0, which was
19852011 generated by GNU Autoconf 2.69. Invocation command line was
19862012
19872013 $ $0 $@
23992425
24002426
24012427
2402 RELEASE_VERSION=1.5.1
2428 RELEASE_VERSION=1.6.0
24032429
24042430 ac_config_headers="$ac_config_headers geo_config.h"
24052431
28912917
28922918 # Define the identity of the package.
28932919 PACKAGE='libgeotiff'
2894 VERSION='1.5.1'
2920 VERSION='1.6.0'
28952921
28962922
28972923 cat >>confdefs.h <<_ACEOF
1212912155
1213012156
1213112157
12132
12133
1213412158 CFLAGS="$CFLAGS"
1213512159
1213612160 LIBS="$LDFLAGS $LIBS"
1261812642
1261912643 LIBS="$LIBS_SAVED"
1262012644 else
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
12645
12646
12647
12648
12649
12650
12651
12652 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
12653 if test -n "$ac_tool_prefix"; then
12654 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
12655 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
12656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12657 $as_echo_n "checking for $ac_word... " >&6; }
12658 if ${ac_cv_path_PKG_CONFIG+:} false; then :
12659 $as_echo_n "(cached) " >&6
12660 else
12661 case $PKG_CONFIG in
12662 [\\/]* | ?:[\\/]*)
12663 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12664 ;;
12665 *)
12666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12667 for as_dir in $PATH
12668 do
12669 IFS=$as_save_IFS
12670 test -z "$as_dir" && as_dir=.
12671 for ac_exec_ext in '' $ac_executable_extensions; do
12672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12673 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12675 break 2
12676 fi
12677 done
12678 done
12679 IFS=$as_save_IFS
12680
12681 ;;
12682 esac
12683 fi
12684 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12685 if test -n "$PKG_CONFIG"; then
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12687 $as_echo "$PKG_CONFIG" >&6; }
12688 else
12689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12690 $as_echo "no" >&6; }
12691 fi
12692
12693
12694 fi
12695 if test -z "$ac_cv_path_PKG_CONFIG"; then
12696 ac_pt_PKG_CONFIG=$PKG_CONFIG
12697 # Extract the first word of "pkg-config", so it can be a program name with args.
12698 set dummy pkg-config; ac_word=$2
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12700 $as_echo_n "checking for $ac_word... " >&6; }
12701 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
12702 $as_echo_n "(cached) " >&6
12703 else
12704 case $ac_pt_PKG_CONFIG in
12705 [\\/]* | ?:[\\/]*)
12706 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
12707 ;;
12708 *)
12709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710 for as_dir in $PATH
12711 do
12712 IFS=$as_save_IFS
12713 test -z "$as_dir" && as_dir=.
12714 for ac_exec_ext in '' $ac_executable_extensions; do
12715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12716 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12718 break 2
12719 fi
12720 done
12721 done
12722 IFS=$as_save_IFS
12723
12724 ;;
12725 esac
12726 fi
12727 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
12728 if test -n "$ac_pt_PKG_CONFIG"; then
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
12730 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
12731 else
12732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733 $as_echo "no" >&6; }
12734 fi
12735
12736 if test "x$ac_pt_PKG_CONFIG" = x; then
12737 PKG_CONFIG=""
12738 else
12739 case $cross_compiling:$ac_tool_warned in
12740 yes:)
12741 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12742 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12743 ac_tool_warned=yes ;;
12744 esac
12745 PKG_CONFIG=$ac_pt_PKG_CONFIG
12746 fi
12747 else
12748 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
12749 fi
12750
12751 fi
12752 if test -n "$PKG_CONFIG"; then
12753 _pkg_min_version=0.9.0
12754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
12755 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
12756 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12758 $as_echo "yes" >&6; }
12759 else
12760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12761 $as_echo "no" >&6; }
12762 PKG_CONFIG=""
12763 fi
12764 fi
12765
12766 pkg_failed=no
12767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBTIFF" >&5
12768 $as_echo_n "checking for LIBTIFF... " >&6; }
12769
12770 if test -n "$LIBTIFF_CFLAGS"; then
12771 pkg_cv_LIBTIFF_CFLAGS="$LIBTIFF_CFLAGS"
12772 elif test -n "$PKG_CONFIG"; then
12773 if test -n "$PKG_CONFIG" && \
12774 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5
12775 ($PKG_CONFIG --exists --print-errors "libtiff-4") 2>&5
12776 ac_status=$?
12777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12778 test $ac_status = 0; }; then
12779 pkg_cv_LIBTIFF_CFLAGS=`$PKG_CONFIG --cflags "libtiff-4" 2>/dev/null`
12780 test "x$?" != "x0" && pkg_failed=yes
12781 else
12782 pkg_failed=yes
12783 fi
12784 else
12785 pkg_failed=untried
12786 fi
12787 if test -n "$LIBTIFF_LIBS"; then
12788 pkg_cv_LIBTIFF_LIBS="$LIBTIFF_LIBS"
12789 elif test -n "$PKG_CONFIG"; then
12790 if test -n "$PKG_CONFIG" && \
12791 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5
12792 ($PKG_CONFIG --exists --print-errors "libtiff-4") 2>&5
12793 ac_status=$?
12794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12795 test $ac_status = 0; }; then
12796 pkg_cv_LIBTIFF_LIBS=`$PKG_CONFIG --libs "libtiff-4" 2>/dev/null`
12797 test "x$?" != "x0" && pkg_failed=yes
12798 else
12799 pkg_failed=yes
12800 fi
12801 else
12802 pkg_failed=untried
12803 fi
12804
12805
12806
12807 if test $pkg_failed = yes; then
12808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12809 $as_echo "no" >&6; }
12810
12811 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12812 _pkg_short_errors_supported=yes
12813 else
12814 _pkg_short_errors_supported=no
12815 fi
12816 if test $_pkg_short_errors_supported = yes; then
12817 LIBTIFF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libtiff-4" 2>&1`
12818 else
12819 LIBTIFF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libtiff-4" 2>&1`
12820 fi
12821 # Put the nasty error message in config.log where it belongs
12822 echo "$LIBTIFF_PKG_ERRORS" >&5
12823
12824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
1262212825 $as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
1262312826 if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
1262412827 $as_echo_n "(cached) " >&6
1266112864 build libgeotiff without libtiff" "$LINENO" 5
1266212865 fi
1266312866
12664 LIBS_SAVED="$LIBS"
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFMergeFieldInfo in -ltiff" >&5
12867 LIBS_SAVED="$LIBS"
12868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFMergeFieldInfo in -ltiff" >&5
1266612869 $as_echo_n "checking for TIFFMergeFieldInfo in -ltiff... " >&6; }
1266712870 if ${ac_cv_lib_tiff_TIFFMergeFieldInfo+:} false; then :
1266812871 $as_echo_n "(cached) " >&6
1270512908 libgeotiff. Please upgrade libtiff or use an older version of libgeotiff." "$LINENO" 5
1270612909 fi
1270712910
12708 LIBS="$LIBS -ltiff"
12709 TIFF_INC=
12710 TIFF_CONFIG="yes"
12911 LIBS="$LIBS -ltiff"
12912 TIFF_INC=
12913 TIFF_CONFIG="yes"
12914 elif test $pkg_failed = untried; then
12915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12916 $as_echo "no" >&6; }
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
12918 $as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
12919 if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
12920 $as_echo_n "(cached) " >&6
12921 else
12922 ac_check_lib_save_LIBS=$LIBS
12923 LIBS="-ltiff -lm $LIBS"
12924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925 /* end confdefs.h. */
12926
12927 /* Override any GCC internal prototype to avoid an error.
12928 Use char because int might match the return type of a GCC
12929 builtin and then its argument prototype would still apply. */
12930 #ifdef __cplusplus
12931 extern "C"
12932 #endif
12933 char TIFFOpen ();
12934 int
12935 main ()
12936 {
12937 return TIFFOpen ();
12938 ;
12939 return 0;
12940 }
12941 _ACEOF
12942 if ac_fn_c_try_link "$LINENO"; then :
12943 ac_cv_lib_tiff_TIFFOpen=yes
12944 else
12945 ac_cv_lib_tiff_TIFFOpen=no
12946 fi
12947 rm -f core conftest.err conftest.$ac_objext \
12948 conftest$ac_exeext conftest.$ac_ext
12949 LIBS=$ac_check_lib_save_LIBS
12950 fi
12951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5
12952 $as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; }
12953 if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then :
12954 TIFF_CONFIG=yes
12955 else
12956 as_fn_error $? "You will need to substantially rewrite libxtiff to
12957 build libgeotiff without libtiff" "$LINENO" 5
12958 fi
12959
12960 LIBS_SAVED="$LIBS"
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFMergeFieldInfo in -ltiff" >&5
12962 $as_echo_n "checking for TIFFMergeFieldInfo in -ltiff... " >&6; }
12963 if ${ac_cv_lib_tiff_TIFFMergeFieldInfo+:} false; then :
12964 $as_echo_n "(cached) " >&6
12965 else
12966 ac_check_lib_save_LIBS=$LIBS
12967 LIBS="-ltiff -lm $LIBS"
12968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12969 /* end confdefs.h. */
12970
12971 /* Override any GCC internal prototype to avoid an error.
12972 Use char because int might match the return type of a GCC
12973 builtin and then its argument prototype would still apply. */
12974 #ifdef __cplusplus
12975 extern "C"
12976 #endif
12977 char TIFFMergeFieldInfo ();
12978 int
12979 main ()
12980 {
12981 return TIFFMergeFieldInfo ();
12982 ;
12983 return 0;
12984 }
12985 _ACEOF
12986 if ac_fn_c_try_link "$LINENO"; then :
12987 ac_cv_lib_tiff_TIFFMergeFieldInfo=yes
12988 else
12989 ac_cv_lib_tiff_TIFFMergeFieldInfo=no
12990 fi
12991 rm -f core conftest.err conftest.$ac_objext \
12992 conftest$ac_exeext conftest.$ac_ext
12993 LIBS=$ac_check_lib_save_LIBS
12994 fi
12995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFMergeFieldInfo" >&5
12996 $as_echo "$ac_cv_lib_tiff_TIFFMergeFieldInfo" >&6; }
12997 if test "x$ac_cv_lib_tiff_TIFFMergeFieldInfo" = xyes; then :
12998 TIFF_CONFIG=yes
12999 else
13000 as_fn_error $? "Libtiff 3.6.0 Beta or later required for this version of
13001 libgeotiff. Please upgrade libtiff or use an older version of libgeotiff." "$LINENO" 5
13002 fi
13003
13004 LIBS="$LIBS -ltiff"
13005 TIFF_INC=
13006 TIFF_CONFIG="yes"
13007 else
13008 LIBTIFF_CFLAGS=$pkg_cv_LIBTIFF_CFLAGS
13009 LIBTIFF_LIBS=$pkg_cv_LIBTIFF_LIBS
13010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13011 $as_echo "yes" >&6; }
13012 TIFF_INC="$LIBTIFF_CFLAGS" LIBS="$LIBS $LIBTIFF_LIBS" TIFF_CONFIG="yes"
13013 fi
1271113014 fi
1271213015
1271313016
1274113044 else
1274213045
1274313046 if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then
12744 ORIG_LIBS="$LIBS"
12745 LIBS="-lproj $ORIG_LIBS"
12746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj_create_from_wkt in -lproj" >&5
13047
13048 pkg_failed=no
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROJ" >&5
13050 $as_echo_n "checking for PROJ... " >&6; }
13051
13052 if test -n "$PROJ_CFLAGS"; then
13053 pkg_cv_PROJ_CFLAGS="$PROJ_CFLAGS"
13054 elif test -n "$PKG_CONFIG"; then
13055 if test -n "$PKG_CONFIG" && \
13056 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"proj\""; } >&5
13057 ($PKG_CONFIG --exists --print-errors "proj") 2>&5
13058 ac_status=$?
13059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13060 test $ac_status = 0; }; then
13061 pkg_cv_PROJ_CFLAGS=`$PKG_CONFIG --cflags "proj" 2>/dev/null`
13062 test "x$?" != "x0" && pkg_failed=yes
13063 else
13064 pkg_failed=yes
13065 fi
13066 else
13067 pkg_failed=untried
13068 fi
13069 if test -n "$PROJ_LIBS"; then
13070 pkg_cv_PROJ_LIBS="$PROJ_LIBS"
13071 elif test -n "$PKG_CONFIG"; then
13072 if test -n "$PKG_CONFIG" && \
13073 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"proj\""; } >&5
13074 ($PKG_CONFIG --exists --print-errors "proj") 2>&5
13075 ac_status=$?
13076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13077 test $ac_status = 0; }; then
13078 pkg_cv_PROJ_LIBS=`$PKG_CONFIG --libs "proj" 2>/dev/null`
13079 test "x$?" != "x0" && pkg_failed=yes
13080 else
13081 pkg_failed=yes
13082 fi
13083 else
13084 pkg_failed=untried
13085 fi
13086
13087
13088
13089 if test $pkg_failed = yes; then
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13091 $as_echo "no" >&6; }
13092
13093 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13094 _pkg_short_errors_supported=yes
13095 else
13096 _pkg_short_errors_supported=no
13097 fi
13098 if test $_pkg_short_errors_supported = yes; then
13099 PROJ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "proj" 2>&1`
13100 else
13101 PROJ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "proj" 2>&1`
13102 fi
13103 # Put the nasty error message in config.log where it belongs
13104 echo "$PROJ_PKG_ERRORS" >&5
13105
13106 PROJ_FOUND=no
13107 elif test $pkg_failed = untried; then
13108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13109 $as_echo "no" >&6; }
13110 PROJ_FOUND=no
13111 else
13112 PROJ_CFLAGS=$pkg_cv_PROJ_CFLAGS
13113 PROJ_LIBS=$pkg_cv_PROJ_LIBS
13114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13115 $as_echo "yes" >&6; }
13116 LIBS="$LIBS $PROJ_LIBS" PROJ_FOUND=yes
13117 fi
13118 if test "$PROJ_FOUND" = "no"; then
13119 ORIG_LIBS="$LIBS"
13120 LIBS="-lproj $ORIG_LIBS"
13121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj_create_from_wkt in -lproj" >&5
1274713122 $as_echo_n "checking for proj_create_from_wkt in -lproj... " >&6; }
1274813123 if ${ac_cv_lib_proj_proj_create_from_wkt+:} false; then :
1274913124 $as_echo_n "(cached) " >&6
1278513160 PROJ_FOUND=no
1278613161 fi
1278713162
13163 fi
1278813164 if test "$PROJ_FOUND" = "no"; then
1278913165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -lproj" >&5
1279013166 $as_echo_n "checking for internal_proj_create_from_wkt in -lproj... " >&6; }
1320313579 $as_echo "#define GEO_NORMALIZE_DISABLE_TOWGS84 /**/" >>confdefs.h
1320413580
1320513581 fi
13582
13583
13584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool needs -no-undefined flag to build shared libraries" >&5
13585 $as_echo_n "checking if libtool needs -no-undefined flag to build shared libraries... " >&6; }
13586 case "${host}" in
13587 *-*-cygwin* | *-*-mingw*|*-*-aix*)
13588 ## Add in the -no-undefined flag to LDFLAGS for libtool.
13589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13590 $as_echo "yes" >&6; }
13591 NOUNDEFINED=" -no-undefined"
13592 ;;
13593 *)
13594 ## Don't add in anything.
13595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13596 $as_echo "no" >&6; }
13597 ;;
13598 esac
1320613599
1320713600
1320813601
1578316176 # report actual input values of CONFIG_FILES etc. instead of their
1578416177 # values after options handling.
1578516178 ac_log="
15786 This file was extended by libgeotiff $as_me 1.5.1, which was
16179 This file was extended by libgeotiff $as_me 1.6.0, which was
1578716180 generated by GNU Autoconf 2.69. Invocation command line was
1578816181
1578916182 CONFIG_FILES = $CONFIG_FILES
1584916242 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1585016243 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1585116244 ac_cs_version="\\
15852 libgeotiff config.status 1.5.1
16245 libgeotiff config.status 1.6.0
1585316246 configured by $0, generated by GNU Autoconf 2.69,
1585416247 with options \\"\$ac_cs_config\\"
1585516248
00
11
22 m4_define([VERSION_MAJOR], [1])
3 m4_define([VERSION_MINOR], [5])
4 m4_define([VERSION_POINT], [1])
3 m4_define([VERSION_MINOR], [6])
4 m4_define([VERSION_POINT], [0])
55 m4_define([GEOTIFF_VERSION],
66 [VERSION_MAJOR.VERSION_MINOR.VERSION_POINT])
77
2929 AC_PROG_MAKE_SET
3030 AC_PROG_LIBTOOL
3131
32 dnl AC_PROG_CC
33 dnl AC_COMPILER_WFLAGS
34
35 dnl AC_PROG_RANLIB
36 dnl AC_COMPILER_PIC
37 dnl AC_LD_SHARED
38
3932 dnl #########################################################################
4033 dnl Default compilation flags
4134 dnl #########################################################################
7366
7467 AC_ARG_ENABLE([debug],
7568 AC_HELP_STRING([--enable-debug=ARG], [Enable debug compilation mode @<:@yes|no@:>@, default=debug_default]),,)
76
69
7770 AC_MSG_CHECKING([for debug enabled])
7871
7972 if test "x$enable_debug" = "xyes"; then
210203 libgeotiff. Please upgrade or use an older version of libgeotiff.]),-lm)
211204 LIBS="$LIBS_SAVED"
212205 else
213 AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes],
214 AC_MSG_ERROR([You will need to substantially rewrite libxtiff to
206 PKG_CHECK_MODULES(LIBTIFF, libtiff-4,
207 [TIFF_INC="$LIBTIFF_CFLAGS" LIBS="$LIBS $LIBTIFF_LIBS" TIFF_CONFIG="yes"],
208 [AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes],
209 AC_MSG_ERROR([You will need to substantially rewrite libxtiff to
215210 build libgeotiff without libtiff]),-lm)
216 LIBS_SAVED="$LIBS"
217 AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes],
218 AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of
211 LIBS_SAVED="$LIBS"
212 AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes],
213 AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of
219214 libgeotiff. Please upgrade libtiff or use an older version of libgeotiff.]),-lm)
220 LIBS="$LIBS -ltiff"
221 TIFF_INC=
222 TIFF_CONFIG="yes"
215 LIBS="$LIBS -ltiff"
216 TIFF_INC=
217 TIFF_CONFIG="yes"])
223218 fi
224219
225220
243238 else
244239
245240 if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then
246 ORIG_LIBS="$LIBS"
247 LIBS="-lproj $ORIG_LIBS"
248 AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
241 PKG_CHECK_MODULES(PROJ, proj, [LIBS="$LIBS $PROJ_LIBS" PROJ_FOUND=yes], [PROJ_FOUND=no])
242 if test "$PROJ_FOUND" = "no"; then
243 ORIG_LIBS="$LIBS"
244 LIBS="-lproj $ORIG_LIBS"
245 AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
246 fi
249247 if test "$PROJ_FOUND" = "no"; then
250248 AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
251249 if test "$PROJ_FOUND" = "yes"; then
317315 AC_SUBST(PROJ_INCLUDE)
318316
319317
320 AC_ARG_ENABLE(towgs84, [ --disable-towgs84 Disable WGS84 parameters for binary compatibility with pre-1.4.1], AC_DEFINE(GEO_NORMALIZE_DISABLE_TOWGS84, [], [Disable WGS84 parameters]))
318 AC_ARG_ENABLE(towgs84, [ --disable-towgs84 Disable WGS84 parameters for binary compatibility with pre-1.4.1], AC_DEFINE([GEO_NORMALIZE_DISABLE_TOWGS84], [], [Disable WGS84 parameters]))
319
320 AC_MSG_CHECKING([if libtool needs -no-undefined flag to build shared libraries])
321 case "${host}" in
322 *-*-cygwin* | *-*-mingw*|*-*-aix*)
323 ## Add in the -no-undefined flag to LDFLAGS for libtool.
324 AC_MSG_RESULT([yes])
325 NOUNDEFINED=" -no-undefined"
326 ;;
327 *)
328 ## Don't add in anything.
329 AC_MSG_RESULT([no])
330 ;;
331 esac
332 AC_SUBST([NOUNDEFINED])
321333
322334 dnl #########################################################################
323335 dnl Doxygen settings
8282 #endif
8383
8484 #ifndef MAX
85 # define MIN(a,b) ((a<b) ? a : b)
86 # define MAX(a,b) ((a>b) ? a : b)
85 # define MIN(a,b) (((a)<(b)) ? (a) : (b))
86 # define MAX(a,b) (((a)>(b)) ? (a) : (b))
8787 #endif
8888
8989 #ifndef NULL
9191 #endif
9292
9393 #ifndef ABS
94 # define ABS(x) ((x<0) ? (-1*(x)) : x)
94 # define ABS(x) (((x)<0) ? (-1*(x)) : (x))
9595 #endif
9696
9797 #ifndef EQUAL
126126 #define VSIFRead fread
127127
128128 #ifndef notdef
129 #define VSICalloc(x,y) _GTIFcalloc(x*y)
129 #define VSICalloc(x,y) _GTIFcalloc((x)*(y))
130130 #define VSIMalloc _GTIFcalloc
131131 #define VSIFree _GTIFFree
132132 #define VSIRealloc _GTIFrealloc
133133 #else
134 #define VSICalloc(x,y) (((char *) _GTIFcalloc(x*y+4)) + 4)
134 #define VSICalloc(x,y) (((char *) _GTIFcalloc((x)*(y)+4)) + 4)
135135 #define VSIMalloc(x) (((char *) _GTIFcalloc((x)+4)) + 4)
136136 #define VSIFree(x) _GTIFFree(((char *) (x)) - 4)
137 #define VSIRealloc(p,n) (((char *) _GTIFrealloc(((char *)p)-4,(n)+4)) + 4)
137 #define VSIRealloc(p,n) (((char *) _GTIFrealloc(((char *)(p))-4,(n)+4)) + 4)
138138 #endif
139139
140140
173173
174174 return count;
175175 }
176
177 /************************************************************************/
178 /* GTIFKeyGetInternal() */
179 /************************************************************************/
180
181 static int GTIFKeyGetInternal( GTIF *psGTIF, geokey_t key,
182 void* pData,
183 int nIndex,
184 int nCount,
185 tagtype_t expected_tagtype )
186 {
187 tagtype_t tagtype;
188 if( !GTIFKeyInfo(psGTIF, key, NULL, &tagtype) )
189 return 0;
190 if( tagtype != expected_tagtype )
191 {
192 if( psGTIF->gt_error_callback )
193 {
194 psGTIF->gt_error_callback(
195 psGTIF,
196 LIBGEOTIFF_WARNING,
197 "Expected key %s to be of type %s. Got %s",
198 GTIFKeyName(key), GTIFTypeName(expected_tagtype),
199 GTIFTypeName(tagtype));
200 }
201 return 0;
202 }
203 return GTIFKeyGet( psGTIF, key, pData, nIndex, nCount );
204 }
205
206 /************************************************************************/
207 /* GTIFKeyGetASCII() */
208 /************************************************************************/
209
210 /**
211 * This function reads the value of a single GeoKey of type ASCII from a GeoTIFF file.
212 *
213 * Same as GTIFGetKey() except that it adds checking that the key read is of the
214 * expected type.
215 */
216 int GTIFKeyGetASCII( GTIF *gtif, geokey_t key, char* szStr, int szStrMaxLen )
217 {
218 return GTIFKeyGetInternal( gtif, key, szStr, 0, szStrMaxLen, TYPE_ASCII );
219 }
220
221 /************************************************************************/
222 /* GTIFKeyGetSHORT() */
223 /************************************************************************/
224
225 /**
226 * This function reads the value of a single GeoKey of type SHORT from a GeoTIFF file.
227 *
228 * Same as GTIFGetKey() except that it adds checking that the key read is of the
229 * expected type.
230 */
231 int GTIFKeyGetSHORT( GTIF *gtif, geokey_t key, unsigned short* pnVal, int nIndex,
232 int nCount )
233 {
234 return GTIFKeyGetInternal(gtif, key, pnVal, nIndex, nCount, TYPE_SHORT);
235 }
236
237 /************************************************************************/
238 /* GDALGTIFKeyGetDOUBLE() */
239 /************************************************************************/
240
241 /**
242 * This function reads the value of a single GeoKey of type DOUBLE from a GeoTIFF file.
243 *
244 * Same as GTIFGetKey() except that it adds checking that the key read is of the
245 * expected type.
246 */
247 int GTIFKeyGetDOUBLE( GTIF *gtif, geokey_t key, double* pdfVal, int nIndex,
248 int nCount )
249 {
250 return GTIFKeyGetInternal(gtif, key, pdfVal, nIndex, nCount, TYPE_DOUBLE);
251 }
4343 END_LIST
4444 };
4545
46 static char *FindName(const KeyInfo *info,int key)
46 static const char *FindName(const KeyInfo *info,int key)
4747 {
4848 static char errmsg[80];
4949
5959
6060 char *GTIFKeyName(geokey_t key)
6161 {
62 return FindName( &_keyInfo[0],key);
62 return (char*) FindName( &_keyInfo[0],key);
63 }
64
65 const char* GTIFKeyNameEx(GTIF* gtif, geokey_t key)
66 {
67 const KeyInfo *info;
68 if( gtif->gt_version == GEOTIFF_SPEC_1_0_VERSION &&
69 gtif->gt_rev_major == GEOTIFF_SPEC_1_0_KEY_REVISION &&
70 gtif->gt_rev_minor == GEOTIFF_SPEC_1_0_MINOR_REVISION )
71 {
72 info = &_keyInfo[0];
73 }
74 else
75 {
76 info = &_keyInfoV11[0];
77 }
78 while (info->ki_key>=0 && info->ki_key != (int)key) info++;
79 if (info->ki_key<0)
80 {
81 sprintf(gtif->szTmpBufferForGTIFValueNameEx,"Unknown-%d", key );
82 return gtif->szTmpBufferForGTIFValueNameEx;
83 }
84 return info->ki_name;
6385 }
6486
6587 char *GTIFTypeName(tagtype_t type)
6688 {
67 return FindName( &_formatInfo[0],type);
89 return (char*) FindName( &_formatInfo[0],type);
6890 }
6991
7092 char *GTIFTagName(int tag)
7193 {
72 return FindName( &_tagInfo[0],tag);
94 return (char*) FindName( &_tagInfo[0],tag);
7395 }
7496
7597 static const KeyInfo* FindTable(geokey_t key)
109131 char *GTIFValueName(geokey_t key, int value)
110132 {
111133
112 return FindName(FindTable(key), value);
134 return (char*) FindName(FindTable(key), value);
113135 }
114136
115137 static void GetNameFromDatabase(GTIF* gtif,
126148 const char* pszName = proj_get_name(obj);
127149 if( pszName )
128150 {
129 strncpy(pszOut, pszName, nOutSize);
130 pszOut[nOutSize-1] = 0;
151 size_t nToCopy = MIN(strlen(pszName), nOutSize - 1);
152 memcpy(pszOut, pszName, nToCopy);
153 pszOut[nToCopy] = 0;
131154 }
132155 proj_destroy(obj);
133156 }
140163 const char *GTIFValueNameEx(GTIF* gtif, geokey_t key, int value)
141164 {
142165 const KeyInfo *info = FindTable(key);
143
144 while (info->ki_key>=0 && info->ki_key != value) info++;
145
146 if (info->ki_key<0)
166 int useHardcodedTables = 0;
167
168 if( value == KvUndefined || value == KvUserDefined )
169 {
170 useHardcodedTables = 1;
171 }
172 else if( gtif->gt_version == GEOTIFF_SPEC_1_0_VERSION &&
173 gtif->gt_rev_major == GEOTIFF_SPEC_1_0_KEY_REVISION &&
174 gtif->gt_rev_minor == GEOTIFF_SPEC_1_0_MINOR_REVISION )
175 {
176 useHardcodedTables = 1;
177 }
178 else if( key == GTModelTypeGeoKey ||
179 key == GTRasterTypeGeoKey ||
180 key == ProjCoordTransGeoKey )
181 {
182 useHardcodedTables = 1;
183 }
184 else if( key == VerticalCSTypeGeoKey &&
185 value >= 5001 && value <= 5033 )
186 {
187 useHardcodedTables = 1;
188 }
189 if( useHardcodedTables )
190 {
191 while (info->ki_key>=0 && info->ki_key != value) info++;
192 }
193
194 if ( !useHardcodedTables || info->ki_key<0 )
147195 {
148196 sprintf(gtif->szTmpBufferForGTIFValueNameEx,"Unknown-%d", value );
149197
235283 */
236284
237285
238 static int FindCode(const KeyInfo *info,char *key)
286 static int FindCode(const KeyInfo *info,const char *key)
239287 {
240288 while (info->ki_key>=0 && strcmp(info->ki_name,key) ) info++;
241289
258306 return info->ki_key;
259307 }
260308
261 int GTIFKeyCode(char *key)
262 {
263 return FindCode( &_keyInfo[0],key);
264 }
265
266 int GTIFTypeCode(char *type)
309 int GTIFKeyCode(const char *key)
310 {
311 int ret = FindCode( &_keyInfo[0],key);
312 if( ret < 0 )
313 ret = FindCode( &_keyInfoV11[0],key);
314 return ret;
315 }
316
317 int GTIFTypeCode(const char *type)
267318 {
268319 return FindCode( &_formatInfo[0],type);
269320 }
270321
271 int GTIFTagCode(char *tag)
322 int GTIFTagCode(const char *tag)
272323 {
273324 return FindCode( &_tagInfo[0],tag);
274325 }
278329 * The key must be determined with GTIFKeyCode() before
279330 * the name can be encoded.
280331 */
281 int GTIFValueCode(geokey_t key, char *name)
332 int GTIFValueCode(geokey_t key, const char *name)
282333 {
283334 return FindCode(FindTable(key),name);
284335 }
104104 CPL_INLINE static void CPL_IGNORE_RET_VAL_INT(CPL_UNUSED int unused) {}
105105
106106 /************************************************************************/
107 /* GTIFKeyGetSSHORT() */
108 /************************************************************************/
109
110 // Geotiff SHORT keys are supposed to be unsigned, but geo_normalize interface
111 // uses signed short...
112 static int GTIFKeyGetSSHORT( GTIF *gtif, geokey_t key, short* pnVal )
113 {
114 unsigned short sVal;
115 if( GTIFKeyGetSHORT(gtif, key, &sVal, 0, 1) == 1 )
116 {
117 memcpy(pnVal, &sVal, 2);
118 return 1;
119 }
120 return 0;
121 }
122
123 /************************************************************************/
107124 /* GTIFGetPCSInfo() */
108125 /************************************************************************/
109126
110 static
111 int GTIFGetPCSInfoEx( PJ_CONTEXT* ctx,
127 int GTIFGetPCSInfoEx( void* ctxIn,
112128 int nPCSCode, char **ppszEPSGName,
113129 short *pnProjOp, short *pnUOMLengthCode,
114130 short *pnGeogCS )
115131
116132 {
133 PJ_CONTEXT* ctx = (PJ_CONTEXT*)ctxIn;
117134 int nDatum;
118135 int nZone;
119136
155172 return TRUE;
156173 }
157174 }
175
176 if( nPCSCode == KvUserDefined )
177 return FALSE;
158178
159179 {
160180 char szCode[12];
392412 /* GCS. */
393413 /************************************************************************/
394414
395 static
396 int GTIFGetGCSInfoEx( PJ_CONTEXT* ctx,
415 int GTIFGetGCSInfoEx( void* ctxIn,
397416 int nGCSCode, char ** ppszName,
398417 short * pnDatum, short * pnPM, short *pnUOMAngle )
399418
400419 {
420 PJ_CONTEXT* ctx = (PJ_CONTEXT*)ctxIn;
401421 int nDatum=0, nPM, nUOMAngle;
402422
403423 /* -------------------------------------------------------------------- */
444464
445465 return TRUE;
446466 }
467
468
469 if( nGCSCode == KvUserDefined )
470 return FALSE;
447471
448472 /* -------------------------------------------------------------------- */
449473 /* Search the database. */
576600 /* where that is provided. */
577601 /************************************************************************/
578602
579 static
580 int GTIFGetEllipsoidInfoEx( PJ_CONTEXT* ctx,
603 int GTIFGetEllipsoidInfoEx( void* ctxIn,
581604 int nEllipseCode, char ** ppszName,
582605 double * pdfSemiMajor, double * pdfSemiMinor )
583606
584607 {
608 PJ_CONTEXT* ctx = (PJ_CONTEXT*)ctxIn;
585609 /* -------------------------------------------------------------------- */
586610 /* Try some well known ellipsoids. */
587611 /* -------------------------------------------------------------------- */
632656
633657 return TRUE;
634658 }
659
660 if( nEllipseCode == KvUserDefined )
661 return FALSE;
635662
636663 /* -------------------------------------------------------------------- */
637664 /* Search the database. */
687714 /* in degrees. */
688715 /************************************************************************/
689716
690 static
691 int GTIFGetPMInfoEx( PJ_CONTEXT* ctx,
717 int GTIFGetPMInfoEx( void* ctxIn,
692718 int nPMCode, char ** ppszName, double *pdfOffset )
693719
694720 {
721 PJ_CONTEXT* ctx = (PJ_CONTEXT*)ctxIn;
722
695723 /* -------------------------------------------------------------------- */
696724 /* Use a special short cut for Greenwich, since it is so common. */
697725 /* -------------------------------------------------------------------- */
703731 *ppszName = CPLStrdup( "Greenwich" );
704732 return TRUE;
705733 }
734
735
736 if( nPMCode == KvUserDefined )
737 return FALSE;
706738
707739 /* -------------------------------------------------------------------- */
708740 /* Search the database. */
760792 /* Fetch the ellipsoid, and name for a datum. */
761793 /************************************************************************/
762794
763 static
764 int GTIFGetDatumInfoEx( PJ_CONTEXT* ctx,
795 int GTIFGetDatumInfoEx( void* ctxIn,
765796 int nDatumCode, char ** ppszName, short * pnEllipsoid )
766797
767798 {
799 PJ_CONTEXT* ctx = (PJ_CONTEXT*)ctxIn;
768800 const char* pszName = NULL;
769801 int nEllipsoid = 0;
770802
802834
803835 return TRUE;
804836 }
837
838 if( nDatumCode == KvUserDefined )
839 return FALSE;
805840
806841 /* -------------------------------------------------------------------- */
807842 /* Search the database. */
877912 /* lookup length aliases in the UOM_LE_ALIAS table. */
878913 /************************************************************************/
879914
880 static
881 int GTIFGetUOMLengthInfoEx( PJ_CONTEXT* ctx,
915 int GTIFGetUOMLengthInfoEx( void* ctxIn,
882916 int nUOMLengthCode,
883917 char **ppszUOMName,
884918 double * pdfInMeters )
885919
886920 {
921 PJ_CONTEXT* ctx = (PJ_CONTEXT*)ctxIn;
887922 /* -------------------------------------------------------------------- */
888923 /* We short cut meter to save work and avoid failure for missing */
889924 /* in the most common cases. */
917952
918953 return TRUE;
919954 }
955
956 if( nUOMLengthCode == KvUserDefined )
957 return FALSE;
920958
921959 /* -------------------------------------------------------------------- */
922960 /* Search the units database for this unit. If we don't find */
956994 /* GTIFGetUOMAngleInfo() */
957995 /************************************************************************/
958996
959 static
960 int GTIFGetUOMAngleInfoEx( PJ_CONTEXT* ctx,
997 int GTIFGetUOMAngleInfoEx( void* ctxIn,
961998 int nUOMAngleCode,
962999 char **ppszUOMName,
9631000 double * pdfInDegrees )
9641001
9651002 {
1003 PJ_CONTEXT* ctx = (PJ_CONTEXT*)ctxIn;
9661004 const char *pszUOMName = NULL;
9671005 double dfInDegrees = 1.0;
9681006
13761414 /* normalized into degrees and meters. */
13771415 /************************************************************************/
13781416
1379 static
1380 int GTIFGetProjTRFInfoEx( PJ_CONTEXT* ctx,
1417 int GTIFGetProjTRFInfoEx( void* ctxIn,
13811418 int nProjTRFCode,
13821419 char **ppszProjTRFName,
13831420 short * pnProjMethod,
13841421 double * padfProjParms )
13851422
13861423 {
1424 PJ_CONTEXT* ctx = (PJ_CONTEXT*)ctxIn;
1425
13871426 if ((nProjTRFCode >= Proj_UTM_zone_1N && nProjTRFCode <= Proj_UTM_zone_60N) ||
13881427 (nProjTRFCode >= Proj_UTM_zone_1S && nProjTRFCode <= Proj_UTM_zone_60S))
13891428 {
14251464 return TRUE;
14261465 }
14271466
1467 if( nProjTRFCode == KvUserDefined )
1468 return FALSE;
1469
14281470 {
14291471 int nProjMethod, i, anEPSGCodes[7];
14301472 double adfProjParms[7];
14501492 /* Get the projection method code */
14511493 proj_coordoperation_get_method_info(ctx, transf,
14521494 NULL, /* method name */
1453 NULL, /* method auth name (should be EPSG) */
1495 NULL, /* method auth name (should be EPSG) */
14541496 &pszMethodCode);
14551497 assert( pszMethodCode );
14561498 nProjMethod = atoi(pszMethodCode);
16161658 }
16171659
16181660 /************************************************************************/
1619 /* GTIFKeyGetInternal() */
1620 /************************************************************************/
1621
1622 static int GTIFKeyGetInternal( GTIF *psGTIF, geokey_t key,
1623 void* pData,
1624 int nIndex,
1625 int nCount,
1626 tagtype_t expected_tagtype )
1627 {
1628 tagtype_t tagtype;
1629 if( !GTIFKeyInfo(psGTIF, key, NULL, &tagtype) )
1630 return 0;
1631 if( tagtype != expected_tagtype )
1632 {
1633 if( psGTIF->gt_error_callback )
1634 {
1635 psGTIF->gt_error_callback(
1636 psGTIF,
1637 LIBGEOTIFF_WARNING,
1638 "Expected key %s to be of type %s. Got %s",
1639 GTIFKeyName(key), GTIFTypeName(expected_tagtype),
1640 GTIFTypeName(tagtype));
1641 }
1642 return 0;
1643 }
1644 return GTIFKeyGet( psGTIF, key, pData, nIndex, nCount );
1645 }
1646
1647 /************************************************************************/
1648 /* GTIFKeyGetSHORT() */
1649 /************************************************************************/
1650
1651 static int GTIFKeyGetSHORT( GTIF *psGTIF, geokey_t key,
1652 short* pnVal,
1653 int nIndex,
1654 int nCount )
1655 {
1656 return GTIFKeyGetInternal(psGTIF, key, pnVal, nIndex, nCount, TYPE_SHORT);
1657 }
1658
1659 /************************************************************************/
1660 /* GDALGTIFKeyGetDOUBLE() */
1661 /************************************************************************/
1662
1663 static int GTIFKeyGetDOUBLE( GTIF *psGTIF, geokey_t key,
1664 double* pdfVal,
1665 int nIndex,
1666 int nCount )
1667 {
1668 return GTIFKeyGetInternal(psGTIF, key, pdfVal, nIndex, nCount, TYPE_DOUBLE);
1669 }
1670
1671 /************************************************************************/
16721661 /* GTIFFetchProjParms() */
16731662 /* */
16741663 /* Fetch the projection parameters for a particular projection */
24622451 /* -------------------------------------------------------------------- */
24632452 /* Try to get the overall model type. */
24642453 /* -------------------------------------------------------------------- */
2465 GTIFKeyGetSHORT(psGTIF,GTModelTypeGeoKey,&(psDefn->Model),0,1);
2454 GTIFKeyGetSSHORT(psGTIF,GTModelTypeGeoKey,&(psDefn->Model));
24662455
24672456 /* -------------------------------------------------------------------- */
24682457 /* Extract the Geog units. */
24692458 /* -------------------------------------------------------------------- */
24702459 nGeogUOMLinear = 9001; /* Linear_Meter */
2471 GTIFKeyGetSHORT(psGTIF, GeogLinearUnitsGeoKey, &nGeogUOMLinear, 0, 1 );
2460 if( GTIFKeyGetSSHORT(psGTIF, GeogLinearUnitsGeoKey, &nGeogUOMLinear) == 1 )
2461 {
2462 psDefn->UOMLength = nGeogUOMLinear;
2463 }
24722464
24732465 /* -------------------------------------------------------------------- */
24742466 /* Try to get a PCS. */
24752467 /* -------------------------------------------------------------------- */
2476 if( GTIFKeyGetSHORT(psGTIF,ProjectedCSTypeGeoKey, &(psDefn->PCS),0,1) == 1
2468 if( GTIFKeyGetSSHORT(psGTIF,ProjectedCSTypeGeoKey, &(psDefn->PCS)) == 1
24772469 && psDefn->PCS != KvUserDefined )
24782470 {
24792471 /*
25062498 /* If the Proj_ code is specified directly, use that. */
25072499 /* -------------------------------------------------------------------- */
25082500 if( psDefn->ProjCode == KvUserDefined )
2509 GTIFKeyGetSHORT(psGTIF, ProjectionGeoKey, &(psDefn->ProjCode), 0, 1 );
2501 GTIFKeyGetSSHORT(psGTIF, ProjectionGeoKey, &(psDefn->ProjCode));
25102502
25112503 if( psDefn->ProjCode != KvUserDefined )
25122504 {
25372529 /* Try to get a GCS. If found, it will override any implied by */
25382530 /* the PCS. */
25392531 /* -------------------------------------------------------------------- */
2540 GTIFKeyGetSHORT(psGTIF, GeographicTypeGeoKey, &(psDefn->GCS), 0, 1 );
2532 GTIFKeyGetSSHORT(psGTIF, GeographicTypeGeoKey, &(psDefn->GCS));
25412533 if( psDefn->GCS < 1 || psDefn->GCS >= KvUserDefined )
25422534 psDefn->GCS = KvUserDefined;
25432535
25552547 /* Handle the GCS angular units. GeogAngularUnitsGeoKey */
25562548 /* overrides the GCS or PCS setting. */
25572549 /* -------------------------------------------------------------------- */
2558 GTIFKeyGetSHORT(psGTIF, GeogAngularUnitsGeoKey, &(psDefn->UOMAngle), 0, 1 );
2550 GTIFKeyGetSSHORT(psGTIF, GeogAngularUnitsGeoKey, &(psDefn->UOMAngle));
25592551 if( psDefn->UOMAngle != KvUserDefined )
25602552 {
25612553 GTIFGetUOMAngleInfoEx( psGTIF->pj_context,
25672559 /* Check for a datum setting, and then use the datum to derive */
25682560 /* an ellipsoid. */
25692561 /* -------------------------------------------------------------------- */
2570 GTIFKeyGetSHORT(psGTIF, GeogGeodeticDatumGeoKey, &(psDefn->Datum), 0, 1 );
2562 GTIFKeyGetSSHORT(psGTIF, GeogGeodeticDatumGeoKey, &(psDefn->Datum));
25712563
25722564 if( psDefn->Datum != KvUserDefined )
25732565 {
25792571 /* Check for an explicit ellipsoid. Use the ellipsoid to */
25802572 /* derive the ellipsoid characteristics, if possible. */
25812573 /* -------------------------------------------------------------------- */
2582 GTIFKeyGetSHORT(psGTIF, GeogEllipsoidGeoKey, &(psDefn->Ellipsoid), 0, 1 );
2574 GTIFKeyGetSSHORT(psGTIF, GeogEllipsoidGeoKey, &(psDefn->Ellipsoid));
25832575
25842576 if( psDefn->Ellipsoid != KvUserDefined )
25852577 {
26092601 /* -------------------------------------------------------------------- */
26102602 /* Get the prime meridian info. */
26112603 /* -------------------------------------------------------------------- */
2612 GTIFKeyGetSHORT(psGTIF, GeogPrimeMeridianGeoKey, &(psDefn->PM), 0, 1 );
2604 GTIFKeyGetSSHORT(psGTIF, GeogPrimeMeridianGeoKey, &(psDefn->PM));
26132605
26142606 if( psDefn->PM != KvUserDefined )
26152607 {
26402632 /* but these are very rarely not decimal degrees for actual */
26412633 /* file coordinates. */
26422634 /* -------------------------------------------------------------------- */
2643 GTIFKeyGetSHORT(psGTIF,ProjLinearUnitsGeoKey,&(psDefn->UOMLength),0,1);
2635 GTIFKeyGetSSHORT(psGTIF,ProjLinearUnitsGeoKey,&(psDefn->UOMLength));
26442636
26452637 if( psDefn->UOMLength != KvUserDefined )
26462638 {
26562648 /* -------------------------------------------------------------------- */
26572649 /* Handle a variety of user defined transform types. */
26582650 /* -------------------------------------------------------------------- */
2659 if( GTIFKeyGetSHORT(psGTIF,ProjCoordTransGeoKey,
2660 &(psDefn->CTProjection),0,1) == 1)
2651 if( GTIFKeyGetSSHORT(psGTIF,ProjCoordTransGeoKey,
2652 &(psDefn->CTProjection)) == 1)
26612653 {
26622654 GTIFFetchProjParms( psGTIF, psDefn );
26632655 }
27202712 double dfRound;
27212713 int i;
27222714
2715 if( !(dfAngle >= -360 && dfAngle <= 360) )
2716 return "";
2717
27232718 dfRound = 0.5/60;
27242719 for( i = 0; i < nPrecision; i++ )
27252720 dfRound = dfRound * 0.1;
27262721
27272722 nDegrees = (int) ABS(dfAngle);
27282723 nMinutes = (int) ((ABS(dfAngle) - nDegrees) * 60 + dfRound);
2724 if( nMinutes == 60 )
2725 {
2726 nDegrees ++;
2727 nMinutes = 0;
2728 }
27292729 dfSeconds = ABS((ABS(dfAngle) * 3600 - nDegrees*3600 - nMinutes*60));
27302730
27312731 if( EQUAL(pszAxis,"Long") && dfAngle < 0.0 )
30493049 /* GTIFGetPROJContext() */
30503050 /* */
30513051 /* Return the PROJ context attached to the GTIF handle. */
3052 /* If it has not yet been instanciated and instanciateIfNeeded=TRUE*/
3053 /* then, it will be instanciated (and owned by GTIF handle). */
3054 /************************************************************************/
3055
3056 void *GTIFGetPROJContext( GTIF *psGTIF, int instanciateIfNeeded,
3052 /* If it has not yet been instantiated and instantiateIfNeeded=TRUE*/
3053 /* then, it will be instantiated (and owned by GTIF handle). */
3054 /************************************************************************/
3055
3056 void *GTIFGetPROJContext( GTIF *psGTIF, int instantiateIfNeeded,
30573057 int* out_gtif_own_pj_context )
30583058 {
3059 if( psGTIF->pj_context || !instanciateIfNeeded )
3059 if( psGTIF->pj_context || !instantiateIfNeeded )
30603060 {
30613061 if( out_gtif_own_pj_context )
30623062 {
6161 GCS_Voirol_1875_Paris. Includes datum and prime meridian value. */
6262 short GCS;
6363
64 /** From ProjLinearUnitsGeoKey. For example Linear_Meter. */
64 /** From ProjLinearUnitsGeoKey if found, or from GeogLinearUnitsGeoKey otherwise. For example Linear_Meter. */
6565 short UOMLength;
6666
6767 /** One UOMLength = UOMLengthInMeters meters. */
142142
143143 } GTIFDefn;
144144
145 int GTIF_DLL GTIFGetPCSInfoEx( void* ctx, /* The void* should be a PJ_CONTEXT* */
146 int nPCSCode, char **ppszEPSGName,
147 short *pnProjOp, short *pnUOMLengthCode,
148 short *pnGeogCS );
145149 int GTIF_DLL GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
146150 short *pnProjOp,
147151 short *pnUOMLengthCode, short *pnGeogCS );
152
153 int GTIF_DLL GTIFGetProjTRFInfoEx( void* ctx, /* The void* should be a PJ_CONTEXT* */
154 int nProjTRFCode,
155 char **ppszProjTRFName,
156 short * pnProjMethod,
157 double * padfProjParms );
148158 int GTIF_DLL GTIFGetProjTRFInfo( int nProjTRFCode,
149159 char ** ppszProjTRFName,
150160 short * pnProjMethod,
151161 double * padfProjParms );
162
163 int GTIF_DLL GTIFGetGCSInfoEx( void* ctx, /* The void* should be a PJ_CONTEXT* */
164 int nGCSCode, char ** ppszName,
165 short * pnDatum, short * pnPM, short *pnUOMAngle );
152166 int GTIF_DLL GTIFGetGCSInfo( int nGCSCode, char **ppszName,
153167 short *pnDatum, short *pnPM, short *pnUOMAngle );
168
169 int GTIF_DLL GTIFGetDatumInfoEx( void* ctx, /* The void* should be a PJ_CONTEXT* */
170 int nDatumCode, char ** ppszName, short * pnEllipsoid );
154171 int GTIF_DLL GTIFGetDatumInfo( int nDatumCode, char **ppszName,
155172 short * pnEllipsoid );
173
174 int GTIF_DLL GTIFGetEllipsoidInfoEx( void* ctx, /* The void* should be a PJ_CONTEXT* */
175 int nEllipseCode, char ** ppszName,
176 double * pdfSemiMajor, double * pdfSemiMinor );
156177 int GTIF_DLL GTIFGetEllipsoidInfo( int nEllipsoid, char ** ppszName,
157178 double * pdfSemiMajor,
158179 double * pdfSemiMinor );
180
181 int GTIF_DLL GTIFGetPMInfoEx( void* ctx, /* The void* should be a PJ_CONTEXT* */
182 int nPMCode, char ** ppszName, double *pdfOffset );
159183 int GTIF_DLL GTIFGetPMInfo( int nPM, char **ppszName,
160184 double * pdfLongToGreenwich );
161185
162186 double GTIF_DLL GTIFAngleStringToDD( const char *pszAngle, int nUOMAngle );
187
188 int GTIF_DLL GTIFGetUOMLengthInfoEx( void* ctx, /* The void* should be a PJ_CONTEXT* */
189 int nUOMLengthCode,
190 char **ppszUOMName,
191 double * pdfInMeters );
163192 int GTIF_DLL GTIFGetUOMLengthInfo( int nUOMLengthCode,
164193 char **ppszUOMName,
165194 double * pdfInMeters );
195
196 int GTIF_DLL GTIFGetUOMAngleInfoEx( void* ctx, /* The void* should be a PJ_CONTEXT* */
197 int nUOMAngleCode,
198 char **ppszUOMName,
199 double * pdfInDegrees );
166200 int GTIF_DLL GTIFGetUOMAngleInfo( int nUOMAngleCode,
167201 char **ppszUOMName,
168202 double * pdfInDegrees );
174208
175209 /* The void* should be a PJ_CONTEXT* */
176210 void GTIF_DLL GTIFAttachPROJContext( GTIF *psGTIF, void* pjContext );
177 void GTIF_DLL *GTIFGetPROJContext( GTIF *psGTIF, int instanciateIfNeeded,
211 void GTIF_DLL *GTIFGetPROJContext( GTIF *psGTIF, int instantiateIfNeeded,
178212 int* out_gtif_own_pj_context );
179213
180214 int GTIF_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
143143 char message[40];
144144
145145 print(" ",aux);
146 print(GTIFKeyName(keyid),aux);
146 print((char*)GTIFKeyNameEx(gtif, keyid),aux);
147147
148148 sprintf(message," (%s,%d): ",GTIFTypeName(key->gk_type),count);
149149 print(message,aux);
199199 gtif->gt_flags |= FLAG_FILE_MODIFIED;
200200 return 1;
201201 }
202
203 /* Set the version numbers of the GeoTIFF directory */
204 int GTIFSetVersionNumbers(GTIF* gtif,
205 unsigned short version,
206 unsigned short key_revision,
207 unsigned short minor_revision)
208 {
209 gtif->gt_version = version;
210 gtif->gt_rev_major = key_revision;
211 gtif->gt_rev_minor = minor_revision;
212 return 1;
213 }
5757 /* Set up header of ProjectionInfo tag */
5858 header = (KeyHeader *)gt->gt_short;
5959 header->hdr_num_keys = (pinfo_t) gt->gt_num_keys;
60 header->hdr_version = GvCurrentVersion;
61 header->hdr_rev_major = GvCurrentRevision;
62 header->hdr_rev_minor = GvCurrentMinorRev;
60 header->hdr_version = gt->gt_version;
61 header->hdr_rev_major = gt->gt_rev_major;
62 header->hdr_rev_minor = gt->gt_rev_minor;
6363
6464 /* Sum up the ASCII tag lengths */
6565 for (i = 0; i < gt->gt_num_keys; i++)
3636 BaseGeoKey = 1024, /* First valid code */
3737
3838 # include "geokeys.inc" /* geokey database */
39
39 #define ONLY_GEOTIFF_V1_1_CHANGES
40 # include "geokeys_v1_1.inc" /* geokey database */
41 #undef ONLY_GEOTIFF_V1_1_CHANGES
4042 ReservedEndGeoKey = 32767,
4143
4244 /* Key space available for Private or internal use */
4648 EndGeoKey = 65535 /* Largest Possible GeoKey ID */
4749 } geokey_t;
4850
49
5051 #endif /* LIBGEOTIFF_GEOKEYS_H_ */
0 /* GeoTIFF GeoKey Database for OGC GeoTIFF v1.1 */
1
2 /* C database for Geotiff include files. */
3 /* the macro ValuePair() must be defined */
4 /* by the enclosing include file */
5
6 /* GeoTIFF Configuration Keys */
7
8 #ifndef ONLY_GEOTIFF_V1_1_CHANGES
9 ValuePair( GTModelTypeGeoKey, 1024)
10 ValuePair( GTRasterTypeGeoKey, 1025)
11 ValuePair( GTCitationGeoKey, 1026)
12 #endif
13
14 /* Geodetic CRS Parameter Keys */
15
16 ValuePair( GeodeticCRSGeoKey, 2048)
17 ValuePair( GeodeticCitationGeoKey, 2049)
18 ValuePair( GeodeticDatumGeoKey, 2050)
19 ValuePair( PrimeMeridianGeoKey, 2051)
20 #ifndef ONLY_GEOTIFF_V1_1_CHANGES
21 ValuePair( GeogLinearUnitsGeoKey, 2052)
22 ValuePair( GeogLinearUnitSizeGeoKey, 2053)
23 ValuePair( GeogAngularUnitsGeoKey, 2054)
24 ValuePair( GeogAngularUnitSizeGeoKey, 2055)
25 #endif
26 ValuePair( EllipsoidGeoKey, 2056)
27 ValuePair( EllipsoidSemiMajorAxisGeoKey, 2057)
28 ValuePair( EllipsoidSemiMinorAxisGeoKey, 2058)
29 ValuePair( EllipsoidInvFlatteningGeoKey, 2059)
30 #ifndef ONLY_GEOTIFF_V1_1_CHANGES
31 ValuePair( GeogAzimuthUnitsGeoKey, 2060)
32 #endif
33 ValuePair( PrimeMeridianLongitudeGeoKey, 2061)
34
35 #ifndef ONLY_GEOTIFF_V1_1_CHANGES
36 ValuePair( GeogTOWGS84GeoKey, 2062) /* 2011 - proposed addition */
37 #endif
38
39 /* Projected CRS Parameter Keys */
40
41 ValuePair( ProjectedCRSGeoKey, 3072)
42 ValuePair( ProjectedCitationGeoKey, 3073)
43 #ifndef ONLY_GEOTIFF_V1_1_CHANGES
44 ValuePair( ProjectionGeoKey, 3074)
45 #endif
46 ValuePair( ProjMethodGeoKey, 3075)
47 #ifndef ONLY_GEOTIFF_V1_1_CHANGES
48 ValuePair( ProjLinearUnitsGeoKey, 3076)
49 ValuePair( ProjLinearUnitSizeGeoKey, 3077)
50 ValuePair( ProjStdParallel1GeoKey, 3078)
51 ValuePair( ProjStdParallelGeoKey,ProjStdParallel1GeoKey) /* ** alias ** */
52 ValuePair( ProjStdParallel2GeoKey, 3079)
53 ValuePair( ProjNatOriginLongGeoKey, 3080)
54 ValuePair( ProjOriginLongGeoKey,ProjNatOriginLongGeoKey) /* ** alias ** */
55 ValuePair( ProjNatOriginLatGeoKey, 3081)
56 ValuePair( ProjOriginLatGeoKey,ProjNatOriginLatGeoKey) /* ** alias ** */
57 ValuePair( ProjFalseEastingGeoKey, 3082)
58 ValuePair( ProjFalseNorthingGeoKey, 3083)
59 ValuePair( ProjFalseOriginLongGeoKey, 3084)
60 ValuePair( ProjFalseOriginLatGeoKey, 3085)
61 ValuePair( ProjFalseOriginEastingGeoKey, 3086)
62 ValuePair( ProjFalseOriginNorthingGeoKey, 3087)
63 ValuePair( ProjCenterLongGeoKey, 3088)
64 ValuePair( ProjCenterLatGeoKey, 3089)
65 ValuePair( ProjCenterEastingGeoKey, 3090)
66 ValuePair( ProjCenterNorthingGeoKey, 3091)
67 ValuePair( ProjScaleAtNatOriginGeoKey, 3092)
68 ValuePair( ProjScaleAtOriginGeoKey,ProjScaleAtNatOriginGeoKey) /* ** alias ** */
69 ValuePair( ProjScaleAtCenterGeoKey, 3093)
70 ValuePair( ProjAzimuthAngleGeoKey, 3094)
71 ValuePair( ProjStraightVertPoleLongGeoKey, 3095)
72 ValuePair( ProjRectifiedGridAngleGeoKey, 3096)
73 #endif
74
75 /* Vertical CRS Parameter Keys */
76
77 ValuePair( VerticalGeoKey, 4096)
78 #ifndef ONLY_GEOTIFF_V1_1_CHANGES
79 ValuePair( VerticalCitationGeoKey, 4097)
80 ValuePair( VerticalDatumGeoKey, 4098)
81 ValuePair( VerticalUnitsGeoKey, 4099)
82 #endif
83
84 /* End of Data base */
1616
1717 struct _KeyInfo {
1818 int ki_key;
19 char *ki_name;
19 const char *ki_name;
2020 };
2121 typedef struct _KeyInfo KeyInfo;
2222
3535 #define ValuePair(token,value)
3636 #endif
3737
38 #define END_LIST { -1, (char *)0}
38 #define END_LIST { -1, 0 }
3939
4040 /************************************************************
4141 * 6.2.x GeoTIFF Keys
4343
4444 static const KeyInfo _keyInfo[] = {
4545 # include "geokeys.inc" /* geokey database */
46 END_LIST
47 };
48
49 /* Keys used by GeoTIFF 1.1 (OGC 19-008) */
50 static const KeyInfo _keyInfoV11[] = {
51 # include "geokeys_v1_1.inc" /* geokey database */
4652 END_LIST
4753 };
4854
2929 */
3030 #define GvCurrentVersion 1
3131
32 #define LIBGEOTIFF_VERSION 1510
32 /* Versions of GeoTIFF specification and corresponding
33 * (version, key_revision, minor_revision) triplets.
34 * At that time, only 2 versions are known: */
35
36 /* GEOTIFF_SPEC_1_0 corresponds to the original GeoTIFF specification,
37 * "Revision 1.0, specification version 1.8.2 in November 1995 (N. Ritter & Ruth, 1995)"
38 * available at http://geotiff.maptools.org/spec/geotiffhome.html */
39 #define GEOTIFF_SPEC_1_0_VERSION 1
40 #define GEOTIFF_SPEC_1_0_KEY_REVISION 1
41 #define GEOTIFF_SPEC_1_0_MINOR_REVISION 0
42
43 /* GEOTIFF_SPEC_1_1 corresponds to the OGC GeoTIFF standard 19-008 */
44 #define GEOTIFF_SPEC_1_1_VERSION 1
45 #define GEOTIFF_SPEC_1_1_KEY_REVISION 1
46 #define GEOTIFF_SPEC_1_1_MINOR_REVISION 1
47
48 /* Library version */
49 #define LIBGEOTIFF_VERSION 1600
3350
3451 #include "geo_config.h"
3552 #include "geokeys.h"
112129 void* user_data);
113130 void GTIF_DLL GTIFFree(GTIF *gtif);
114131 int GTIF_DLL GTIFWriteKeys(GTIF *gtif);
132 /* versions must be an array of 3 int */
115133 void GTIF_DLL GTIFDirectoryInfo(GTIF *gtif, int *versions, int *keycount);
116134 void GTIF_DLL *GTIFGetUserData(GTIF *gtif);
135 int GTIF_DLL GTIFSetVersionNumbers(GTIF* gtif,
136 unsigned short version,
137 unsigned short key_revision,
138 unsigned short minor_revision);
117139
118140 /* GeoKey Access */
119141 int GTIF_DLL GTIFKeyInfo(GTIF *gtif, geokey_t key, int *size, tagtype_t* type);
120142 int GTIF_DLL GTIFKeyGet(GTIF *gtif, geokey_t key, void *val, int index,
121143 int count);
144 int GTIF_DLL GTIFKeyGetASCII(GTIF *gtif, geokey_t key, char* szStr,
145 int szStrMaxLen);
146 int GTIF_DLL GTIFKeyGetSHORT(GTIF *gtif, geokey_t key, unsigned short *val, int index,
147 int count);
148 int GTIF_DLL GTIFKeyGetDOUBLE(GTIF *gtif, geokey_t key, double *val, int index,
149 int count);
122150 int GTIF_DLL GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type,
123 int count,...);
151 int count,...);
124152
125153 /* Metadata Import-Export utilities */
126154 void GTIF_DLL GTIFPrint(GTIF *gtif, GTIFPrintMethod print, void *aux);
127155 int GTIF_DLL GTIFImport(GTIF *gtif, GTIFReadMethod scan, void *aux);
128156 char GTIF_DLL *GTIFKeyName(geokey_t key);
157 const char GTIF_DLL *GTIFKeyNameEx(GTIF* gtif, geokey_t key);
129158 char GTIF_DLL *GTIFValueName(geokey_t key,int value);
130159 const char GTIF_DLL *GTIFValueNameEx(GTIF* gtif, geokey_t key,int value);
131160 char GTIF_DLL *GTIFTypeName(tagtype_t type);
132161 char GTIF_DLL *GTIFTagName(int tag);
133 int GTIF_DLL GTIFKeyCode(char * key);
134 int GTIF_DLL GTIFValueCode(geokey_t key,char *value);
135 int GTIF_DLL GTIFTypeCode(char *type);
136 int GTIF_DLL GTIFTagCode(char *tag);
162 int GTIF_DLL GTIFKeyCode(const char * key);
163 int GTIF_DLL GTIFValueCode(geokey_t key,const char *value);
164 int GTIF_DLL GTIFTypeCode(const char *type);
165 int GTIF_DLL GTIFTagCode(const char *tag);
137166
138167 /* Translation between image/PCS space */
139168
0 ###############################################################################
1 #
2 # CMake configuration file to build libxtiff library
3 #
4 # Author: Mateusz Loskot <mateusz@loskot.net>
5 #
6 ###############################################################################
7
8 ADD_LIBRARY(xtiff STATIC xtiff.c)
0 ###############################################################################
1 #
2 # CMake configuration file to build libxtiff library
3 #
4 # Author: Mateusz Loskot <mateusz@loskot.net>
5 #
6 ###############################################################################
7
8 ADD_LIBRARY(xtiff STATIC xtiff.c)
33 TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
44 endif
55
6 AM_CFLAGS = -I../ $(TIFF_CFLAGS)
6 AM_CFLAGS = -I../ -I$(srcdir)/.. $(TIFF_CFLAGS)
77
88 libxtiff_la_SOURCES = xtiff.c
99
263263 LDFLAGS = @LDFLAGS@
264264 LIBOBJS = @LIBOBJS@
265265 LIBS = @LIBS@
266 LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
267 LIBTIFF_LIBS = @LIBTIFF_LIBS@
266268 LIBTOOL = @LIBTOOL@
267269 LIPO = @LIPO@
268270 LN_S = @LN_S@
274276 MKDIR_P = @MKDIR_P@
275277 NM = @NM@
276278 NMEDIT = @NMEDIT@
279 NOUNDEFINED = @NOUNDEFINED@
277280 OBJDUMP = @OBJDUMP@
278281 OBJEXT = @OBJEXT@
279282 OTOOL = @OTOOL@
286289 PACKAGE_URL = @PACKAGE_URL@
287290 PACKAGE_VERSION = @PACKAGE_VERSION@
288291 PATH_SEPARATOR = @PATH_SEPARATOR@
292 PKG_CONFIG = @PKG_CONFIG@
293 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
294 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
295 PROJ_CFLAGS = @PROJ_CFLAGS@
289296 PROJ_INCLUDE = @PROJ_INCLUDE@
297 PROJ_LIBS = @PROJ_LIBS@
290298 RANLIB = @RANLIB@
291299 RELEASE_VERSION = @RELEASE_VERSION@
292300 SED = @SED@
353361 top_srcdir = @top_srcdir@
354362 include_HEADERS = xtiffio.h
355363 @TIFF_IS_CONFIG_TRUE@TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
356 AM_CFLAGS = -I../ $(TIFF_CFLAGS)
364 AM_CFLAGS = -I../ -I$(srcdir)/.. $(TIFF_CFLAGS)
357365 libxtiff_la_SOURCES = xtiff.c
358366 noinst_LTLIBRARIES = libxtiff.la
359367 all: all-am
243243 LDFLAGS = @LDFLAGS@
244244 LIBOBJS = @LIBOBJS@
245245 LIBS = @LIBS@
246 LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
247 LIBTIFF_LIBS = @LIBTIFF_LIBS@
246248 LIBTOOL = @LIBTOOL@
247249 LIPO = @LIPO@
248250 LN_S = @LN_S@
254256 MKDIR_P = @MKDIR_P@
255257 NM = @NM@
256258 NMEDIT = @NMEDIT@
259 NOUNDEFINED = @NOUNDEFINED@
257260 OBJDUMP = @OBJDUMP@
258261 OBJEXT = @OBJEXT@
259262 OTOOL = @OTOOL@
266269 PACKAGE_URL = @PACKAGE_URL@
267270 PACKAGE_VERSION = @PACKAGE_VERSION@
268271 PATH_SEPARATOR = @PATH_SEPARATOR@
272 PKG_CONFIG = @PKG_CONFIG@
273 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
274 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
275 PROJ_CFLAGS = @PROJ_CFLAGS@
269276 PROJ_INCLUDE = @PROJ_INCLUDE@
277 PROJ_LIBS = @PROJ_LIBS@
270278 RANLIB = @RANLIB@
271279 RELEASE_VERSION = @RELEASE_VERSION@
272280 SED = @SED@
214214 LDFLAGS = @LDFLAGS@
215215 LIBOBJS = @LIBOBJS@
216216 LIBS = @LIBS@
217 LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
218 LIBTIFF_LIBS = @LIBTIFF_LIBS@
217219 LIBTOOL = @LIBTOOL@
218220 LIPO = @LIPO@
219221 LN_S = @LN_S@
225227 MKDIR_P = @MKDIR_P@
226228 NM = @NM@
227229 NMEDIT = @NMEDIT@
230 NOUNDEFINED = @NOUNDEFINED@
228231 OBJDUMP = @OBJDUMP@
229232 OBJEXT = @OBJEXT@
230233 OTOOL = @OTOOL@
237240 PACKAGE_URL = @PACKAGE_URL@
238241 PACKAGE_VERSION = @PACKAGE_VERSION@
239242 PATH_SEPARATOR = @PATH_SEPARATOR@
243 PKG_CONFIG = @PKG_CONFIG@
244 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
245 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
246 PROJ_CFLAGS = @PROJ_CFLAGS@
240247 PROJ_INCLUDE = @PROJ_INCLUDE@
248 PROJ_LIBS = @PROJ_LIBS@
241249 RANLIB = @RANLIB@
242250 RELEASE_VERSION = @RELEASE_VERSION@
243251 SED = @SED@
99
1010 EXTRA_DIST = testlistgeo testlistgeo_out.dist \
1111 testgeotifcp testgeotifcp_out.dist \
12 data/byte.tif data/pcs_32064.tif \
12 data/byte.tif \
13 data/byte_v11.tif \
14 data/pcs_32064.tif \
1315 data/GeogPrimeMeridianGeoKey.tif \
1416 data/GeogGeodeticDatumGeoKey.tif \
1517 data/GeogAngularUnitsGeoKey_9114.tif \
5153 data/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif \
5254 data/lambert_cylindrical_equal_area.tif \
5355 data/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif \
54 data/equidistant_cylindrical.tif
56 data/equidistant_cylindrical.tif \
57 data/pixel_is_point_wgs84.tif
5558
5659 check-local:
5760 $(TESTLISTGEO) $(LISTGEOEXE)
183183 LDFLAGS = @LDFLAGS@
184184 LIBOBJS = @LIBOBJS@
185185 LIBS = @LIBS@
186 LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
187 LIBTIFF_LIBS = @LIBTIFF_LIBS@
186188 LIBTOOL = @LIBTOOL@
187189 LIPO = @LIPO@
188190 LN_S = @LN_S@
194196 MKDIR_P = @MKDIR_P@
195197 NM = @NM@
196198 NMEDIT = @NMEDIT@
199 NOUNDEFINED = @NOUNDEFINED@
197200 OBJDUMP = @OBJDUMP@
198201 OBJEXT = @OBJEXT@
199202 OTOOL = @OTOOL@
206209 PACKAGE_URL = @PACKAGE_URL@
207210 PACKAGE_VERSION = @PACKAGE_VERSION@
208211 PATH_SEPARATOR = @PATH_SEPARATOR@
212 PKG_CONFIG = @PKG_CONFIG@
213 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
214 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
215 PROJ_CFLAGS = @PROJ_CFLAGS@
209216 PROJ_INCLUDE = @PROJ_INCLUDE@
217 PROJ_LIBS = @PROJ_LIBS@
210218 RANLIB = @RANLIB@
211219 RELEASE_VERSION = @RELEASE_VERSION@
212220 SED = @SED@
283291 TESTGEOTIFCP = $(THIS_DIR)/testgeotifcp
284292 EXTRA_DIST = testlistgeo testlistgeo_out.dist \
285293 testgeotifcp testgeotifcp_out.dist \
286 data/byte.tif data/pcs_32064.tif \
294 data/byte.tif \
295 data/byte_v11.tif \
296 data/pcs_32064.tif \
287297 data/GeogPrimeMeridianGeoKey.tif \
288298 data/GeogGeodeticDatumGeoKey.tif \
289299 data/GeogAngularUnitsGeoKey_9114.tif \
325335 data/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif \
326336 data/lambert_cylindrical_equal_area.tif \
327337 data/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif \
328 data/equidistant_cylindrical.tif
338 data/equidistant_cylindrical.tif \
339 data/pixel_is_point_wgs84.tif
329340
330341 all: all-am
331342
Binary diff not shown
4242 $LISTGEO_EXE tmp_albers_equal_area.tif >> ${OUT}
4343 rm -f tmp_albers_equal_area.txt
4444 rm -f tmp_albers_equal_area.tif
45 echo "" >> ${OUT}
4546
4647 $LISTGEO_EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif > tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.txt
4748 $EXE -g tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.txt ${DATA_DIR}/byte.tif tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.tif
4849 $LISTGEO_EXE tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.tif >> ${OUT}
4950 rm -f tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.txt
5051 rm -f tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.tif
52 echo "" >> ${OUT}
53
54 # Test copying a GeoTIFF v1.1 file
55 $LISTGEO_EXE ${DATA_DIR}/byte_v11.tif > tmp_byte_v11.txt
56 $EXE -g tmp_byte_v11.txt ${DATA_DIR}/byte.tif tmp_byte_v11.tif
57 $LISTGEO_EXE tmp_byte_v11.tif >> ${OUT}
58 rm -f tmp_byte_v11.txt
59 rm -f tmp_byte_v11.tif
60 echo "" >> ${OUT}
61
62 # Test changing the version number
63 $EXE -v 1:1:1 ${DATA_DIR}/byte.tif tmp_byte_v11.tif
64 $LISTGEO_EXE tmp_byte_v11.tif >> ${OUT}
65 rm -f tmp_byte_v11.tif
66 echo "" >> ${OUT}
5167
5268 # do 'diff' with distribution results
5369 echo "diff ${OUT} with testgeotifcp_out.dist"
4848 Upper Right ( 441920.000, 3751320.000) (108d12'56.86"W, 4d19'48.63"S)
4949 Lower Right ( 441920.000, 3750120.000) (108d12'54.38"W, 4d20'33.88"S)
5050 Center ( 441320.000, 3750720.000) (108d13'12.33"W, 4d20'12.94"S)
51
5152 Geotiff_Information:
5253 Version: 1
5354 Key_Revision: 1.0
8687 Upper Right ( 441920.000, 3751320.000) (108d12'56.86"W, 4d19'48.63"S)
8788 Lower Right ( 441920.000, 3750120.000) (108d12'54.38"W, 4d20'33.88"S)
8889 Center ( 441320.000, 3750720.000) (108d13'12.33"W, 4d20'12.94"S)
90
91 Geotiff_Information:
92 Version: 1
93 Key_Revision: 1.1
94 Tagged_Information:
95 ModelTiepointTag (2,3):
96 0 0 0
97 440720 3751320 0
98 ModelPixelScaleTag (1,3):
99 60 60 0
100 End_Of_Tags.
101 Keyed_Information:
102 GTModelTypeGeoKey (Short,1): ModelTypeProjected
103 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
104 GTCitationGeoKey (Ascii,21): "NAD27 / UTM zone 11N"
105 ProjectedCRSGeoKey (Short,1): Code-26711 (NAD27 / UTM zone 11N)
106 ProjLinearUnitsGeoKey (Short,1): Code-9001 (metre)
107 End_Of_Keys.
108 End_Of_Geotiff.
109
110 PCS = 26711 (NAD27 / UTM zone 11N)
111 Projection = 16011 (UTM zone 11N)
112 Projection Method: CT_TransverseMercator
113 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
114 ProjNatOriginLongGeoKey: -117.000000 (117d 0' 0.00"W)
115 ProjScaleAtNatOriginGeoKey: 0.999600
116 ProjFalseEastingGeoKey: 500000.000000 m
117 ProjFalseNorthingGeoKey: 0.000000 m
118 GCS: 4267/NAD27
119 Datum: 6267/North American Datum 1927
120 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
121 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
122 Projection Linear Units: 9001/metre (1.000000m)
123
124 Corner Coordinates:
125 Upper Left ( 440720.000, 3751320.000) (117d38'28.21"W, 33d54' 8.47"N)
126 Lower Left ( 440720.000, 3750120.000) (117d38'27.92"W, 33d53'29.51"N)
127 Upper Right ( 441920.000, 3751320.000) (117d37'41.48"W, 33d54' 8.71"N)
128 Lower Right ( 441920.000, 3750120.000) (117d37'41.20"W, 33d53'29.75"N)
129 Center ( 441320.000, 3750720.000) (117d38' 4.70"W, 33d53'49.11"N)
130
131 Geotiff_Information:
132 Version: 1
133 Key_Revision: 1.1
134 Tagged_Information:
135 ModelTiepointTag (2,3):
136 0 0 0
137 440720 3751320 0
138 ModelPixelScaleTag (1,3):
139 60 60 0
140 End_Of_Tags.
141 Keyed_Information:
142 GTModelTypeGeoKey (Short,1): ModelTypeProjected
143 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
144 GTCitationGeoKey (Ascii,21): "NAD27 / UTM zone 11N"
145 ProjectedCRSGeoKey (Short,1): Code-26711 (NAD27 / UTM zone 11N)
146 ProjLinearUnitsGeoKey (Short,1): Code-9001 (metre)
147 End_Of_Keys.
148 End_Of_Geotiff.
149
150 PCS = 26711 (NAD27 / UTM zone 11N)
151 Projection = 16011 (UTM zone 11N)
152 Projection Method: CT_TransverseMercator
153 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
154 ProjNatOriginLongGeoKey: -117.000000 (117d 0' 0.00"W)
155 ProjScaleAtNatOriginGeoKey: 0.999600
156 ProjFalseEastingGeoKey: 500000.000000 m
157 ProjFalseNorthingGeoKey: 0.000000 m
158 GCS: 4267/NAD27
159 Datum: 6267/North American Datum 1927
160 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
161 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
162 Projection Linear Units: 9001/metre (1.000000m)
163
164 Corner Coordinates:
165 Upper Left ( 440720.000, 3751320.000) (117d38'28.21"W, 33d54' 8.47"N)
166 Lower Left ( 440720.000, 3750120.000) (117d38'27.92"W, 33d53'29.51"N)
167 Upper Right ( 441920.000, 3751320.000) (117d37'41.48"W, 33d54' 8.71"N)
168 Lower Right ( 441920.000, 3750120.000) (117d37'41.20"W, 33d53'29.75"N)
169 Center ( 441320.000, 3750720.000) (117d38' 4.70"W, 33d53'49.11"N)
170
2929
3030 rm -f ${OUT}
3131
32 echo "Testing listgeo ${DATA_DIR}/byte.tif" >> ${OUT}
32 echo "Testing listgeo byte.tif" >> ${OUT}
3333 $EXE ${DATA_DIR}/byte.tif >>${OUT}
3434 echo "" >>${OUT}
3535
36 echo "Testing listgeo ${DATA_DIR}/pcs_32064.tif" >> ${OUT}
36 echo "Testing listgeo byte_v11.tif" >> ${OUT}
37 $EXE ${DATA_DIR}/byte_v11.tif >>${OUT}
38 echo "" >>${OUT}
39
40 echo "Testing listgeo pcs_32064.tif" >> ${OUT}
3741 $EXE ${DATA_DIR}/pcs_32064.tif >>${OUT}
3842 echo "" >>${OUT}
3943
40 echo "Testing listgeo ${DATA_DIR}/GeogPrimeMeridianGeoKey.tif" >> ${OUT}
44 echo "Testing listgeo GeogPrimeMeridianGeoKey.tif" >> ${OUT}
4145 $EXE ${DATA_DIR}/GeogPrimeMeridianGeoKey.tif >>${OUT}
4246 echo "" >>${OUT}
4347
44 echo "Testing listgeo ${DATA_DIR}/GeogGeodeticDatumGeoKey.tif" >> ${OUT}
48 echo "Testing listgeo GeogGeodeticDatumGeoKey.tif" >> ${OUT}
4549 $EXE ${DATA_DIR}/GeogGeodeticDatumGeoKey.tif >>${OUT}
4650 echo "" >>${OUT}
4751
48 echo "Testing listgeo ${DATA_DIR}/GeogAngularUnitsGeoKey_9114.tif" >> ${OUT}
52 echo "Testing listgeo GeogAngularUnitsGeoKey_9114.tif" >> ${OUT}
4953 $EXE ${DATA_DIR}/GeogAngularUnitsGeoKey_9114.tif >>${OUT}
5054 echo "" >>${OUT}
5155
52 echo "Testing listgeo ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif" >> ${OUT}
56 echo "Testing listgeo ProjLinearUnitsGeoKey_9036.tif" >> ${OUT}
5357 $EXE ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif >>${OUT}
5458 echo "" >>${OUT}
5559
56 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif" >> ${OUT}
60 echo "Testing listgeo ProjectedCSTypeGeoKey_28191_cassini_soldner.tif" >> ${OUT}
5761 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif >>${OUT}
5862 echo "" >>${OUT}
5963
60 echo "Testing listgeo ${DATA_DIR}/cassini_soldner.tif" >> ${OUT}
64 echo "Testing listgeo cassini_soldner.tif" >> ${OUT}
6165 $EXE ${DATA_DIR}/cassini_soldner.tif >>${OUT}
6266 echo "" >>${OUT}
6367
64 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif" >> ${OUT}
68 echo "Testing listgeo ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif" >> ${OUT}
6569 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif >>${OUT}
6670 echo "" >>${OUT}
6771
68 echo "Testing listgeo ${DATA_DIR}/new_zealand_mapping_grid.tif" >> ${OUT}
72 echo "Testing listgeo new_zealand_mapping_grid.tif" >> ${OUT}
6973 $EXE ${DATA_DIR}/new_zealand_mapping_grid.tif >>${OUT}
7074 echo "" >>${OUT}
7175
72 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_29101_polyconic.tif" >> ${OUT}
76 echo "Testing listgeo ProjectedCSTypeGeoKey_29101_polyconic.tif" >> ${OUT}
7377 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_29101_polyconic.tif >>${OUT}
7478 echo "" >>${OUT}
7579
76 echo "Testing listgeo ${DATA_DIR}/polyconic.tif" >> ${OUT}
80 echo "Testing listgeo polyconic.tif" >> ${OUT}
7781 $EXE ${DATA_DIR}/polyconic.tif >>${OUT}
7882 echo "" >>${OUT}
7983
80 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif" >> ${OUT}
84 echo "Testing listgeo ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif" >> ${OUT}
8185 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif >>${OUT}
8286 echo "" >>${OUT}
8387
84 echo "Testing listgeo ${DATA_DIR}/hotine_oblique_mercator_variant_a.tif" >> ${OUT}
88 echo "Testing listgeo hotine_oblique_mercator_variant_a.tif" >> ${OUT}
8589 $EXE ${DATA_DIR}/hotine_oblique_mercator_variant_a.tif >>${OUT}
8690 echo "" >>${OUT}
8791
88 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif" >> ${OUT}
92 echo "Testing listgeo ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif" >> ${OUT}
8993 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif >>${OUT}
9094 echo "" >>${OUT}
9195
92 echo "Testing listgeo ${DATA_DIR}/hotine_oblique_mercator_variant_b.tif" >> ${OUT}
96 echo "Testing listgeo hotine_oblique_mercator_variant_b.tif" >> ${OUT}
9397 $EXE ${DATA_DIR}/hotine_oblique_mercator_variant_b.tif >>${OUT}
9498 echo "" >>${OUT}
9599
96 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif" >> ${OUT}
100 echo "Testing listgeo ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif" >> ${OUT}
97101 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif >>${OUT}
98102 echo "" >>${OUT}
99103
100 echo "Testing listgeo ${DATA_DIR}/oblique_mercator_laborde.tif" >> ${OUT}
104 echo "Testing listgeo oblique_mercator_laborde.tif" >> ${OUT}
101105 $EXE ${DATA_DIR}/oblique_mercator_laborde.tif >>${OUT}
102106 echo "" >>${OUT}
103107
104 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5456_lcc1sp.tif" >> ${OUT}
108 echo "Testing listgeo ProjectedCSTypeGeoKey_5456_lcc1sp.tif" >> ${OUT}
105109 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5456_lcc1sp.tif >>${OUT}
106110 echo "" >>${OUT}
107111
108 echo "Testing listgeo ${DATA_DIR}/lcc1sp.tif" >> ${OUT}
112 echo "Testing listgeo lcc1sp.tif" >> ${OUT}
109113 $EXE ${DATA_DIR}/lcc1sp.tif >>${OUT}
110114 echo "" >>${OUT}
111115
112 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5329_mercator1sp.tif" >> ${OUT}
116 echo "Testing listgeo ProjectedCSTypeGeoKey_5329_mercator1sp.tif" >> ${OUT}
113117 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5329_mercator1sp.tif >>${OUT}
114118 echo "" >>${OUT}
115119
116 echo "Testing listgeo ${DATA_DIR}/mercator1sp.tif" >> ${OUT}
120 echo "Testing listgeo mercator1sp.tif" >> ${OUT}
117121 $EXE ${DATA_DIR}/mercator1sp.tif >>${OUT}
118122 echo "" >>${OUT}
119123
120 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5641_mercator2sp.tif" >> ${OUT}
124 echo "Testing listgeo ProjectedCSTypeGeoKey_5641_mercator2sp.tif" >> ${OUT}
121125 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5641_mercator2sp.tif >>${OUT}
122126 echo "" >>${OUT}
123127
124 echo "Testing listgeo ${DATA_DIR}/mercator2sp.tif" >> ${OUT}
128 echo "Testing listgeo mercator2sp.tif" >> ${OUT}
125129 $EXE ${DATA_DIR}/mercator2sp.tif >>${OUT}
126130 echo "" >>${OUT}
127131
128 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif" >> ${OUT}
132 echo "Testing listgeo ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif" >> ${OUT}
129133 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif >>${OUT}
130134 echo "" >>${OUT}
131135
132 echo "Testing listgeo ${DATA_DIR}/oblique_stereographic.tif" >> ${OUT}
136 echo "Testing listgeo oblique_stereographic.tif" >> ${OUT}
133137 $EXE ${DATA_DIR}/oblique_stereographic.tif >>${OUT}
134138 echo "" >>${OUT}
135139
136 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif" >> ${OUT}
140 echo "Testing listgeo ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif" >> ${OUT}
137141 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif >>${OUT}
138142 echo "" >>${OUT}
139143
140 echo "Testing listgeo ${DATA_DIR}/polar_stereographic_variant_a.tif" >> ${OUT}
144 echo "Testing listgeo polar_stereographic_variant_a.tif" >> ${OUT}
141145 $EXE ${DATA_DIR}/polar_stereographic_variant_a.tif >>${OUT}
142146 echo "" >>${OUT}
143147
144 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif" >> ${OUT}
148 echo "Testing listgeo ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif" >> ${OUT}
145149 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif >>${OUT}
146150 echo "" >>${OUT}
147151
148 echo "Testing listgeo ${DATA_DIR}/polar_stereographic_variant_b.tif" >> ${OUT}
152 echo "Testing listgeo polar_stereographic_variant_b.tif" >> ${OUT}
149