Codebase list libgeotiff / 2cda7ce
Merge tag 'upstream/1.5.0_rc1' Upstream version 1.5.0~rc1 Bas Couwenberg 5 years ago
90 changed file(s) with 4832 addition(s) and 6946 deletion(s). Raw diff Collapse all Expand all
1717
1818 # Version information
1919 set(PROJECT_VERSION_MAJOR 1)
20 set(PROJECT_VERSION_MINOR 4)
21 set(PROJECT_VERSION_PATCH 3)
20 set(PROJECT_VERSION_MINOR 5)
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})
2727 # libgeotiff.so -> libgeotiff.so.2.2.0
2828 # libgeotiff.so.2 -> libgeotiff.so.2.2.0
2929 # libgeotiff.so.2.2.0
30 set(LINK_SOVERSION "2")
31 set(LINK_VERSION "2.2.0")
30 set(LINK_SOVERSION "5")
31 set(LINK_VERSION "5.0.0")
3232
3333 string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
3434 string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
110110 ###############################################################################
111111 # User-defined build settings
112112
113 SET(GEOTIFF_CSV_NAMES area.csv codes.csv datum.csv gcs.csv pcs.csv)
114 FIND_PATH(GEOTIFF_CSV_DATA_DIR NAMES ${GEOTIFF_CSV_NAMES}
115 PATHS "${CMAKE_SOURCE_DIR}/csv"
116 DOC "Default location of GeoTIFF CSV files"
117 NO_DEFAULT_PATH)
118
119 IF(IS_DIRECTORY ${GEOTIFF_CSV_DATA_DIR} AND EXISTS "${GEOTIFF_CSV_DATA_DIR}/gcs.csv")
120 MESSAGE(STATUS "Found GeoTIFF CSV files in: ${GEOTIFF_CSV_DATA_DIR}")
121 ADD_DEFINITIONS(-DCSV_DATA_DIR="${GEOTIFF_CSV_DATA_DIR}")
122 ELSE()
123 MESSAGE(FATAL_ERROR "Failed to find GeoTIFF CSV files in: ${GEOTIFF_CSV_DATA_DIR}")
124 ENDIF()
125
126113 SET(WITH_UTILITIES TRUE CACHE BOOL "Choose if GeoTIFF utilities should be built")
127114
128115 ###############################################################################
134121 # TIFF support - required, default=ON
135122 SET(WITH_TIFF TRUE CACHE BOOL "Choose if TIFF support should be built")
136123
137 # PROJ.4 support - optional, default=ON
138 SET(WITH_PROJ4 TRUE CACHE BOOL "Choose if PROJ.4 support should be built")
139
140 IF(WITH_PROJ4)
141 FIND_PACKAGE(PROJ4 NO_MODULE QUIET)
142 if (NOT PROJ4_FOUND)
143 FIND_PACKAGE(PROJ4)
144 endif ()
145
146 IF(PROJ4_FOUND)
147 ADD_DEFINITIONS(-DHAVE_LIBPROJ=1)
148 INCLUDE_DIRECTORIES(${PROJ4_INCLUDE_DIR})
149 ENDIF()
124 FIND_PACKAGE(PROJ NO_MODULE QUIET)
125 if (NOT PROJ_FOUND)
126 FIND_PACKAGE(PROJ)
127 endif ()
128
129 IF(PROJ_FOUND)
130 INCLUDE_DIRECTORIES(${PROJ_INCLUDE_DIR})
131 ELSE()
132 MESSAGE(FATAL_ERROR "Failed to detect PROJ >= 6")
150133 ENDIF()
151134
152135 # Zlib support - optional, default=OFF
229212
230213 ###############################################################################
231214 # Installation settings
232
233 SET(GEOTIFF_CSV_DATA
234 csv/alias.csv
235 csv/area.csv
236 csv/change.csv
237 csv/compdcs.csv
238 csv/coordinate_axis.csv
239 csv/coordinate_axis_name.csv
240 csv/coordinate_operation.csv
241 csv/coordinate_operation_method.csv
242 csv/coordinate_operation_parameter.csv
243 csv/coordinate_operation_parameter_value.csv
244 csv/coordinate_operation_path.csv
245 csv/coordinate_reference_system.csv
246 csv/coordinate_system.csv
247 csv/datum.csv
248 csv/datum_shift.csv
249 csv/datum_shift_pref.csv
250 csv/deprecation.csv
251 csv/ellipsoid.csv
252 csv/esri_datum_override.csv
253 csv/gcs.csv
254 csv/gcs.override.csv
255 csv/geoccs.csv
256 csv/naming_system.csv
257 csv/pcs.csv
258 csv/pcs.override.csv
259 csv/prime_meridian.csv
260 csv/projop_wparm.csv
261 csv/stateplane.csv
262 csv/supersession.csv
263 csv/unit_of_measure.csv
264 csv/version_history.csv
265 csv/vertcs.csv
266 csv/vertcs.override.csv )
267215
268216 SET(GEOTIFF_LIB_HEADERS
269217 geotiff.h
340288 DESTINATION doc)
341289 # DESTINATION ${GEOTIFF_DATA_DIR}/doc)
342290
343 # Install CSV data files
344 # INSTALL(FILES ${GEOTIFF_CSV_DATA} DESTINATION ${GEOTIFF_DATA_DIR}/epsg_csv)
345 INSTALL(FILES ${GEOTIFF_CSV_DATA} DESTINATION share/epsg_csv)
346
347291 # Install man pages
348292 INSTALL(FILES ${GEOTIFF_MAN_PAGES} DESTINATION share/man/man1)
349293
362306
363307 SET(GEOTIFF_LIB_SOURCES
364308 cpl_serv.c
365 cpl_csv.c
366309 geo_extra.c
367310 geo_free.c
368311 geo_get.c
377320 geo_write.c
378321 geotiff_proj4.c)
379322
380 SET(INCODE_EPSG_FROM_CSV FALSE CACHE BOOL "Build source-encoded EPSG data files")
381
382 FOREACH(epsg_csv_file ${GEOTIFF_CSV_DATA})
383 # We cannot use NAME_WE without string-replace, because that would
384 # give "gcs.csv" and "gcs.override.csv" the same epsg_csv_name
385 GET_FILENAME_COMPONENT(epsg_csv_name "${epsg_csv_file}" NAME)
386 STRING(REPLACE ".csv" "" epsg_csv_basename "${epsg_csv_name}")
387 # SET(INCODE_EPSG_FROM_CSV_${epsg_csv_basename} FALSE CACHE BOOL "Build ${epsg_csv_basename} file target")
388
389 # IF(INCODE_EPSG_FROM_CSV_${epsg_csv_basename})
390 if( INCODE_EPSG_FROM_CSV)
391 SET(epsg_source_name "${CMAKE_CURRENT_BINARY_DIR}/incode_epsg_${epsg_csv_basename}.c")
392 LIST(APPEND GEOTIFF_LIB_CSV_SOURCES "${epsg_source_name}")
393
394 # sanitize .'s out of struct names
395 STRING(REGEX REPLACE "\\." "_" STRUCT_NAME ${epsg_csv_basename})
396 LIST(APPEND epsg_includefile_externconst "\nextern const datafile_rows_t *${STRUCT_NAME}_rows[]")
397 LIST(APPEND epsg_includefile_pointer_list " { \"${STRUCT_NAME}\", ${STRUCT_NAME}_rows },")
398 MESSAGE(STATUS "Creating buildrule to convert ${epsg_csv_basename}.csv to ${epsg_csv_basename}.c and include it in code.")
399 ADD_CUSTOM_COMMAND(OUTPUT "${epsg_source_name}"
400 COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/csv/csv2c.py" "${CMAKE_CURRENT_SOURCE_DIR}/${epsg_csv_file}" "${epsg_source_name}"
401 DEPENDS "${epsg_csv_file}"
402 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
403 VERBATIM)
404 ENDIF()
405 ENDFOREACH()
406
407 SET(EPSG_INCODE_EXPLANATION
408 "This file is autogenerated by CMake, based on the INCODE_EPSG_* options specified during configure.\n
409 Choosing an EPSG CSV file for inclusion into code will run csv/csv2c.py on the file and include the\n
410 resulting c-source as a build target, as opposed to using GDAL_DATA-dir to find the EPSG codes at runtime.")
411 STRING(REPLACE ";" "\n" EPSG_INCLUDEFILE_POINTER_STRING "${epsg_includefile_pointer_list}")
412 FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/epsg_incode_header.h"
413 "/* ${EPSG_INCODE_EXPLANATION} */\n${epsg_includefile_externconst}; \n\n/* Pointers to csv data included in code */\nstatic const datafile_t files[] = {\n${EPSG_INCLUDEFILE_POINTER_STRING}\n { NULL, NULL }};")
414
415323 SET(XTIFF_SOURCES libxtiff/xtiff.c)
416324
417325 if (MSVC OR CMAKE_CONFIGURATION_TYPES)
421329 endif ()
422330
423331 ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET}
424 ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES} ${XTIFF_SOURCES})
332 ${GEOTIFF_LIB_SOURCES} ${XTIFF_SOURCES})
333
334 IF(WIN32 AND MSVC)
335 SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES IMPORT_SUFFIX "_i.lib")
336 ENDIF(WIN32 AND MSVC)
425337
426338 # Unix, linux:
427339 IF(UNIX)
450362
451363 TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET}
452364 ${TIFF_LIBRARIES}
453 ${PROJ4_LIBRARIES}
365 ${PROJ_LIBRARIES}
454366 ${ZLIB_LIBRARIES}
455367 ${JPEG_LIBRARIES})
456368
0 Changelog entries are no longer updated. Use git history for detailed changes
1
02 2018-12-11 Even Rouault <even dot rouault at spatialys dot com>
13
24 * geo_print.c: fix wrong test in DefaultRead() that caused erroenous
55 an X style license. In any event it is all considered to be free to use
66 for any purpose (including commercial software). No credit is required
77 though some of the code requires that the specific source code modules
8 retain their existing copyright statements. The CSV files, and other tables
9 derived from the EPSG coordinate system database are also free to use. In
8 retain their existing copyright statements. In
109 particular, no part of this code is "copyleft", nor does it imply any
1110 requirement for users to disclose this or their own source code.
1211
5049 * Permission granted to use this software, so long as this copyright
5150 * notice accompanies any products derived therefrom.
5251
53 -----------
54
55 The EPSG Tables (from which the CSV files, and .inc files are derived)
56 carried this statement on use of the data (from the EPSG web site):
57
58 Use of the Data
59
60 The user assumes the entire risk as to the accuracy and the use of this
61 data. The data may be used, copied and distributed subject to the following
62 conditions:
63
64 1. INFORMATION PROVIDED IN THIS DOCUMENT IS PROVIDED "AS IS"
65 WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
66 INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
67 MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
68
69 2. The data may be included in any commercial package provided that any
70 commerciality is based on value added by the provider and not on a value
71 ascribed to the EPSG dataset which is made available at no charge. The
72 ownership of the EPSG dataset [OGP] must be acknowledged.
73
74
75 3. Subsets of information may be extracted from the dataset. Users are
76 advised that coordinate reference system and coordinate transformation
77 descriptions are incomplete unless all elements detailed as essential
78 in OGP Surveying and Positioning Guidance Note 7-1 annex F are included.
79
80 4. Essential elements should preferably be reproduced as described in the
81 dataset. Modification of parameter values is permitted as described in
82 the table below to allow change to the content of the information provided
83 that numeric equivalence is achieved. Numeric equivalence refers to the
84 results of geodetic calculations in which the parameters are used, for
85 example (i) conversion of ellipsoid defining parameters, or (ii) conversion
86 of parameters between one and two standard parallel projection methods,
87 or (iii) conversion of parameters between 7-parameter geocentric
88 transformation methods.
89
90 (EPSG provides a table at this point with some details)
91
92 5. No data that has been modified other than as permitted in these terms
93 and conditions shall be described as or attributed to the EPSG dataset.
94
9552 ----------
9653
9754 The cmake/*.cmake macros are under the following BSD license. This does
0 SUBDIRS = libxtiff . bin man cmake
0 SUBDIRS = libxtiff . bin man cmake test
11
22 AUTOMAKE_OPTIONS = dist-zip subdir-objects
33 ACLOCAL_AMFLAGS = -I m4
44
55 include $(top_srcdir)/m4/doxygen.am
66
7 PROJ_CFLAGS=
8 if PROJ_IS_CONFIG
9 PROJ_CFLAGS += @PROJ_INC@ -DHAVE_LIBPROJ=1
10 endif
11
12 if PROJECTS_H_IS_CONFIG
13 PROJ_CFLAGS += -DHAVE_PROJECTS_H=1
14 endif
7 PROJ_CFLAGS= @PROJ_INCLUDE@
158
169 if TIFF_IS_CONFIG
1710 TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
1811 endif
1912
20 AM_CFLAGS = -I./libxtiff $(PROJ_CFLAGS) $(TIFF_CFLAGS) \
21 -DCSV_DATA_DIR=\"$(datadir)/epsg_csv\"
22
23 csvdir = $(datadir)/epsg_csv
24
25 dist_csv_DATA = csv/alias.csv \
26 csv/area.csv \
27 csv/change.csv \
28 csv/compdcs.csv \
29 csv/coordinate_axis.csv \
30 csv/coordinate_axis_name.csv \
31 csv/coordinate_operation.csv \
32 csv/coordinate_operation_method.csv \
33 csv/coordinate_operation_parameter.csv \
34 csv/coordinate_operation_parameter_value.csv \
35 csv/coordinate_operation_path.csv \
36 csv/coordinate_reference_system.csv \
37 csv/coordinate_system.csv \
38 csv/csv2c.py \
39 csv/csv_tools.py \
40 csv/datum.csv \
41 csv/datum_shift.csv \
42 csv/datum_shift_pref.csv \
43 csv/deprecation.csv \
44 csv/ellipsoid.csv \
45 csv/esri_datum_override.csv \
46 csv/gcs.csv \
47 csv/gcs.override.csv \
48 csv/geoccs.csv \
49 csv/naming_system.csv \
50 csv/pcs.csv \
51 csv/pcs.override.csv \
52 csv/prime_meridian.csv \
53 csv/projop_wparm.csv \
54 csv/stateplane.csv \
55 csv/supersession.csv \
56 csv/unit_of_measure.csv \
57 csv/version_history.csv \
58 csv/vertcs.csv \
59 csv/vertcs.override.csv
13 AM_CFLAGS = -I./libxtiff $(PROJ_CFLAGS) $(TIFF_CFLAGS)
6014
6115 include_HEADERS = geotiff.h \
6216 geotiffio.h \
7731 epsg_pcs.inc \
7832 epsg_proj.inc \
7933 epsg_vertcs.inc \
80 geokeys.inc \
81 geo_incode_defs.h
34 geokeys.inc
8235
8336 nodist_include_HEADERS = geo_config.h
8437
8538 libgeotiff_la_SOURCES = cpl_serv.c \
86 cpl_csv.c \
8739 geo_extra.c \
8840 geo_free.c \
8941 geo_get.c \
9951 geo_strtod.c \
10052 geotiff_proj4.c
10153
102 if CSV_IS_CONFIG
103 libgeotiff_la_SOURCES += csv/datum.c \
104 csv/ellipsoid.c \
105 csv/gcs.c \
106 csv/pcs.c \
107 csv/prime_meridian.c \
108 csv/projop_wparm.c \
109 csv/unit_of_measure.c
110 endif
111
112 libgeotiff_la_LDFLAGS = -version-info 4:0:2
54 libgeotiff_la_LDFLAGS = -version-info 5:0:0
11355
11456 libgeotiff_la_LIBADD = libxtiff/libxtiff.la
11557
4242 # DX_CLEANFILES = everything to clean.
4343 #
4444 # This is usually added to MOSTLYCLEANFILES.
45
4645
4746
4847 VPATH = @srcdir@
119118 POST_UNINSTALL = :
120119 build_triplet = @build@
121120 host_triplet = @host@
122 @PROJ_IS_CONFIG_TRUE@am__append_1 = @PROJ_INC@ -DHAVE_LIBPROJ=1
123 @PROJECTS_H_IS_CONFIG_TRUE@am__append_2 = -DHAVE_PROJECTS_H=1
124 @CSV_IS_CONFIG_TRUE@am__append_3 = csv/datum.c \
125 @CSV_IS_CONFIG_TRUE@ csv/ellipsoid.c \
126 @CSV_IS_CONFIG_TRUE@ csv/gcs.c \
127 @CSV_IS_CONFIG_TRUE@ csv/pcs.c \
128 @CSV_IS_CONFIG_TRUE@ csv/prime_meridian.c \
129 @CSV_IS_CONFIG_TRUE@ csv/projop_wparm.c \
130 @CSV_IS_CONFIG_TRUE@ csv/unit_of_measure.c
131
132121 subdir = .
133122 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
134123 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
138127 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
139128 $(ACLOCAL_M4)
140129 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
141 $(am__configure_deps) $(dist_csv_DATA) $(include_HEADERS) \
142 $(am__DIST_COMMON)
130 $(am__configure_deps) $(include_HEADERS) $(am__DIST_COMMON)
143131 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
144132 configure.lineno config.status.lineno
145133 mkinstalldirs = $(install_sh) -d
173161 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
174162 $(am__cd) "$$dir" && rm -f $$files; }; \
175163 }
176 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(csvdir)" \
177 "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
164 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \
165 "$(DESTDIR)$(includedir)"
178166 LTLIBRARIES = $(lib_LTLIBRARIES)
179167 libgeotiff_la_DEPENDENCIES = libxtiff/libxtiff.la
180 am__libgeotiff_la_SOURCES_DIST = cpl_serv.c cpl_csv.c geo_extra.c \
181 geo_free.c geo_get.c geo_names.c geo_new.c geo_normalize.c \
182 geo_print.c geo_set.c geo_simpletags.c geo_tiffp.c geo_trans.c \
183 geo_write.c geo_strtod.c geotiff_proj4.c csv/datum.c \
184 csv/ellipsoid.c csv/gcs.c csv/pcs.c csv/prime_meridian.c \
185 csv/projop_wparm.c csv/unit_of_measure.c
186 am__dirstamp = $(am__leading_dot)dirstamp
187 @CSV_IS_CONFIG_TRUE@am__objects_1 = csv/datum.lo csv/ellipsoid.lo \
188 @CSV_IS_CONFIG_TRUE@ csv/gcs.lo csv/pcs.lo \
189 @CSV_IS_CONFIG_TRUE@ csv/prime_meridian.lo csv/projop_wparm.lo \
190 @CSV_IS_CONFIG_TRUE@ csv/unit_of_measure.lo
191 am_libgeotiff_la_OBJECTS = cpl_serv.lo cpl_csv.lo geo_extra.lo \
192 geo_free.lo geo_get.lo geo_names.lo geo_new.lo \
193 geo_normalize.lo geo_print.lo geo_set.lo geo_simpletags.lo \
194 geo_tiffp.lo geo_trans.lo geo_write.lo geo_strtod.lo \
195 geotiff_proj4.lo $(am__objects_1)
168 am_libgeotiff_la_OBJECTS = cpl_serv.lo geo_extra.lo geo_free.lo \
169 geo_get.lo geo_names.lo geo_new.lo geo_normalize.lo \
170 geo_print.lo geo_set.lo geo_simpletags.lo geo_tiffp.lo \
171 geo_trans.lo geo_write.lo geo_strtod.lo geotiff_proj4.lo
196172 libgeotiff_la_OBJECTS = $(am_libgeotiff_la_OBJECTS)
197173 AM_V_lt = $(am__v_lt_@AM_V@)
198174 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
236212 am__v_CCLD_0 = @echo " CCLD " $@;
237213 am__v_CCLD_1 =
238214 SOURCES = $(libgeotiff_la_SOURCES)
239 DIST_SOURCES = $(am__libgeotiff_la_SOURCES_DIST)
215 DIST_SOURCES = $(libgeotiff_la_SOURCES)
240216 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
241217 ctags-recursive dvi-recursive html-recursive info-recursive \
242218 install-data-recursive install-dvi-recursive \
250226 n|no|NO) false;; \
251227 *) (install-info --version) >/dev/null 2>&1;; \
252228 esac
253 DATA = $(dist_csv_DATA)
254229 HEADERS = $(include_HEADERS) $(nodist_include_HEADERS)
255230 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
256231 distclean-recursive maintainer-clean-recursive
341316 CFLAGS = @CFLAGS@
342317 CPP = @CPP@
343318 CPPFLAGS = @CPPFLAGS@
344 CXX = @CXX@
345 CXXCPP = @CXXCPP@
346 CXXDEPMODE = @CXXDEPMODE@
347 CXXFLAGS = @CXXFLAGS@
348319 CYGPATH_W = @CYGPATH_W@
349320 DEFS = @DEFS@
350321 DEPDIR = @DEPDIR@
383354 EXEEXT = @EXEEXT@
384355 FGREP = @FGREP@
385356 GREP = @GREP@
386 HAVE_LIBPROJ = @HAVE_LIBPROJ@
387357 INSTALL = @INSTALL@
388358 INSTALL_DATA = @INSTALL_DATA@
389359 INSTALL_PROGRAM = @INSTALL_PROGRAM@
418388 PACKAGE_URL = @PACKAGE_URL@
419389 PACKAGE_VERSION = @PACKAGE_VERSION@
420390 PATH_SEPARATOR = @PATH_SEPARATOR@
421 PROJ_INC = @PROJ_INC@
391 PROJ_INCLUDE = @PROJ_INCLUDE@
422392 RANLIB = @RANLIB@
423393 RELEASE_VERSION = @RELEASE_VERSION@
424394 SED = @SED@
436406 abs_top_srcdir = @abs_top_srcdir@
437407 ac_ct_AR = @ac_ct_AR@
438408 ac_ct_CC = @ac_ct_CC@
439 ac_ct_CXX = @ac_ct_CXX@
440409 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
441410 am__include = @am__include@
442411 am__leading_dot = @am__leading_dot@
484453 top_build_prefix = @top_build_prefix@
485454 top_builddir = @top_builddir@
486455 top_srcdir = @top_srcdir@
487 SUBDIRS = libxtiff . bin man cmake
456 SUBDIRS = libxtiff . bin man cmake test
488457 AUTOMAKE_OPTIONS = dist-zip subdir-objects
489458 ACLOCAL_AMFLAGS = -I m4
490459 @DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html
510479 @DX_COND_doc_TRUE@ $(DX_CLEAN_PDF) \
511480 @DX_COND_doc_TRUE@ $(DX_CLEAN_LATEX)
512481
513 PROJ_CFLAGS = $(am__append_1) $(am__append_2)
482 PROJ_CFLAGS = @PROJ_INCLUDE@
514483 @TIFF_IS_CONFIG_TRUE@TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
515 AM_CFLAGS = -I./libxtiff $(PROJ_CFLAGS) $(TIFF_CFLAGS) \
516 -DCSV_DATA_DIR=\"$(datadir)/epsg_csv\"
517
518 csvdir = $(datadir)/epsg_csv
519 dist_csv_DATA = csv/alias.csv \
520 csv/area.csv \
521 csv/change.csv \
522 csv/compdcs.csv \
523 csv/coordinate_axis.csv \
524 csv/coordinate_axis_name.csv \
525 csv/coordinate_operation.csv \
526 csv/coordinate_operation_method.csv \
527 csv/coordinate_operation_parameter.csv \
528 csv/coordinate_operation_parameter_value.csv \
529 csv/coordinate_operation_path.csv \
530 csv/coordinate_reference_system.csv \
531 csv/coordinate_system.csv \
532 csv/csv2c.py \
533 csv/csv_tools.py \
534 csv/datum.csv \
535 csv/datum_shift.csv \
536 csv/datum_shift_pref.csv \
537 csv/deprecation.csv \
538 csv/ellipsoid.csv \
539 csv/esri_datum_override.csv \
540 csv/gcs.csv \
541 csv/gcs.override.csv \
542 csv/geoccs.csv \
543 csv/naming_system.csv \
544 csv/pcs.csv \
545 csv/pcs.override.csv \
546 csv/prime_meridian.csv \
547 csv/projop_wparm.csv \
548 csv/stateplane.csv \
549 csv/supersession.csv \
550 csv/unit_of_measure.csv \
551 csv/version_history.csv \
552 csv/vertcs.csv \
553 csv/vertcs.override.csv
554
484 AM_CFLAGS = -I./libxtiff $(PROJ_CFLAGS) $(TIFF_CFLAGS)
555485 include_HEADERS = geotiff.h \
556486 geotiffio.h \
557487 geovalues.h \
571501 epsg_pcs.inc \
572502 epsg_proj.inc \
573503 epsg_vertcs.inc \
574 geokeys.inc \
575 geo_incode_defs.h
504 geokeys.inc
576505
577506 nodist_include_HEADERS = geo_config.h
578 libgeotiff_la_SOURCES = cpl_serv.c cpl_csv.c geo_extra.c geo_free.c \
579 geo_get.c geo_names.c geo_new.c geo_normalize.c geo_print.c \
580 geo_set.c geo_simpletags.c geo_tiffp.c geo_trans.c geo_write.c \
581 geo_strtod.c geotiff_proj4.c $(am__append_3)
582 libgeotiff_la_LDFLAGS = -version-info 4:0:2
507 libgeotiff_la_SOURCES = cpl_serv.c \
508 geo_extra.c \
509 geo_free.c \
510 geo_get.c \
511 geo_names.c \
512 geo_new.c \
513 geo_normalize.c \
514 geo_print.c \
515 geo_set.c \
516 geo_simpletags.c \
517 geo_tiffp.c \
518 geo_trans.c \
519 geo_write.c \
520 geo_strtod.c \
521 geotiff_proj4.c
522
523 libgeotiff_la_LDFLAGS = -version-info 5:0:0
583524 libgeotiff_la_LIBADD = libxtiff/libxtiff.la
584525 lib_LTLIBRARIES = libgeotiff.la
585526 EXTRA_DIST = autogen.sh \
689630 echo rm -f $${locs}; \
690631 rm -f $${locs}; \
691632 }
692 csv/$(am__dirstamp):
693 @$(MKDIR_P) csv
694 @: > csv/$(am__dirstamp)
695 csv/$(DEPDIR)/$(am__dirstamp):
696 @$(MKDIR_P) csv/$(DEPDIR)
697 @: > csv/$(DEPDIR)/$(am__dirstamp)
698 csv/datum.lo: csv/$(am__dirstamp) csv/$(DEPDIR)/$(am__dirstamp)
699 csv/ellipsoid.lo: csv/$(am__dirstamp) csv/$(DEPDIR)/$(am__dirstamp)
700 csv/gcs.lo: csv/$(am__dirstamp) csv/$(DEPDIR)/$(am__dirstamp)
701 csv/pcs.lo: csv/$(am__dirstamp) csv/$(DEPDIR)/$(am__dirstamp)
702 csv/prime_meridian.lo: csv/$(am__dirstamp) \
703 csv/$(DEPDIR)/$(am__dirstamp)
704 csv/projop_wparm.lo: csv/$(am__dirstamp) csv/$(DEPDIR)/$(am__dirstamp)
705 csv/unit_of_measure.lo: csv/$(am__dirstamp) \
706 csv/$(DEPDIR)/$(am__dirstamp)
707633
708634 libgeotiff.la: $(libgeotiff_la_OBJECTS) $(libgeotiff_la_DEPENDENCIES) $(EXTRA_libgeotiff_la_DEPENDENCIES)
709635 $(AM_V_CCLD)$(libgeotiff_la_LINK) -rpath $(libdir) $(libgeotiff_la_OBJECTS) $(libgeotiff_la_LIBADD) $(LIBS)
710636
711637 mostlyclean-compile:
712638 -rm -f *.$(OBJEXT)
713 -rm -f csv/*.$(OBJEXT)
714 -rm -f csv/*.lo
715639
716640 distclean-compile:
717641 -rm -f *.tab.c
718642
719 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpl_csv.Plo@am__quote@
720643 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpl_serv.Plo@am__quote@
721644 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geo_extra.Plo@am__quote@
722645 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geo_free.Plo@am__quote@
732655 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geo_trans.Plo@am__quote@
733656 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geo_write.Plo@am__quote@
734657 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geotiff_proj4.Plo@am__quote@
735 @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/datum.Plo@am__quote@
736 @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/ellipsoid.Plo@am__quote@
737 @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/gcs.Plo@am__quote@
738 @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/pcs.Plo@am__quote@
739 @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/prime_meridian.Plo@am__quote@
740 @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/projop_wparm.Plo@am__quote@
741 @AMDEP_TRUE@@am__include@ @am__quote@csv/$(DEPDIR)/unit_of_measure.Plo@am__quote@
742658
743659 .c.o:
744660 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
769685
770686 clean-libtool:
771687 -rm -rf .libs _libs
772 -rm -rf csv/.libs csv/_libs
773688
774689 distclean-libtool:
775690 -rm -f libtool config.lt
776 install-dist_csvDATA: $(dist_csv_DATA)
777 @$(NORMAL_INSTALL)
778 @list='$(dist_csv_DATA)'; test -n "$(csvdir)" || list=; \
779 if test -n "$$list"; then \
780 echo " $(MKDIR_P) '$(DESTDIR)$(csvdir)'"; \
781 $(MKDIR_P) "$(DESTDIR)$(csvdir)" || exit 1; \
782 fi; \
783 for p in $$list; do \
784 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
785 echo "$$d$$p"; \
786 done | $(am__base_list) | \
787 while read files; do \
788 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(csvdir)'"; \
789 $(INSTALL_DATA) $$files "$(DESTDIR)$(csvdir)" || exit $$?; \
790 done
791
792 uninstall-dist_csvDATA:
793 @$(NORMAL_UNINSTALL)
794 @list='$(dist_csv_DATA)'; test -n "$(csvdir)" || list=; \
795 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
796 dir='$(DESTDIR)$(csvdir)'; $(am__uninstall_files_from_dir)
797691 install-includeHEADERS: $(include_HEADERS)
798692 @$(NORMAL_INSTALL)
799693 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
11321026 exit 1; } >&2
11331027 check-am: all-am
11341028 check: check-recursive
1135 all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) geo_config.h
1029 all-am: Makefile $(LTLIBRARIES) $(HEADERS) geo_config.h
11361030 installdirs: installdirs-recursive
11371031 installdirs-am:
1138 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(csvdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
1032 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
11391033 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
11401034 done
11411035 install: install-recursive
11651059 distclean-generic:
11661060 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
11671061 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
1168 -rm -f csv/$(DEPDIR)/$(am__dirstamp)
1169 -rm -f csv/$(am__dirstamp)
11701062
11711063 maintainer-clean-generic:
11721064 @echo "This command is intended for maintainers to use"
11781070
11791071 distclean: distclean-recursive
11801072 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
1181 -rm -rf ./$(DEPDIR) csv/$(DEPDIR)
1073 -rm -rf ./$(DEPDIR)
11821074 -rm -f Makefile
11831075 distclean-am: clean-am distclean-compile distclean-generic \
11841076 distclean-hdr distclean-libtool distclean-tags
11951087
11961088 info-am:
11971089
1198 install-data-am: install-dist_csvDATA install-includeHEADERS \
1199 install-nodist_includeHEADERS
1090 install-data-am: install-includeHEADERS install-nodist_includeHEADERS
12001091
12011092 install-dvi: install-dvi-recursive
12021093
12271118 maintainer-clean: maintainer-clean-recursive
12281119 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
12291120 -rm -rf $(top_srcdir)/autom4te.cache
1230 -rm -rf ./$(DEPDIR) csv/$(DEPDIR)
1121 -rm -rf ./$(DEPDIR)
12311122 -rm -f Makefile
12321123 maintainer-clean-am: distclean-am maintainer-clean-generic
12331124
12441135
12451136 ps-am:
12461137
1247 uninstall-am: uninstall-dist_csvDATA uninstall-includeHEADERS \
1248 uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
1138 uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
1139 uninstall-nodist_includeHEADERS
12491140
12501141 .MAKE: $(am__recursive_targets) all install-am install-strip
12511142
12571148 distclean-compile distclean-generic distclean-hdr \
12581149 distclean-libtool distclean-tags distcleancheck distdir \
12591150 distuninstallcheck dvi dvi-am html html-am info info-am \
1260 install install-am install-data install-data-am \
1261 install-dist_csvDATA install-dvi install-dvi-am install-exec \
1262 install-exec-am install-html install-html-am \
1263 install-includeHEADERS install-info install-info-am \
1264 install-libLTLIBRARIES install-man \
1151 install install-am install-data install-data-am install-dvi \
1152 install-dvi-am install-exec install-exec-am install-html \
1153 install-html-am install-includeHEADERS install-info \
1154 install-info-am install-libLTLIBRARIES install-man \
12651155 install-nodist_includeHEADERS install-pdf install-pdf-am \
12661156 install-ps install-ps-am install-strip installcheck \
12671157 installcheck-am installdirs installdirs-am maintainer-clean \
12681158 maintainer-clean-generic mostlyclean mostlyclean-compile \
12691159 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
1270 tags tags-am uninstall uninstall-am uninstall-dist_csvDATA \
1271 uninstall-includeHEADERS uninstall-libLTLIBRARIES \
1272 uninstall-nodist_includeHEADERS
1160 tags tags-am uninstall uninstall-am uninstall-includeHEADERS \
1161 uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
12731162
12741163 .PRECIOUS: Makefile
12751164
0 libgeotiff 1.5.0
1 ----------------
2
3 * Require PROJ >= 6 dependency
4 * Remove all CSV files used by geo_normalize API, since libgeotiff now relies
5 on PROJ database for EPSG CRS definitions.
6 * geo_normalize.c: SetGTParmIds(): use ProjStraightVertPoleLongGeoKey for CT_PolarStereographic
7 * geo_normalize.c: report StdParallel1 for Mercator_2SP when a PCS code is used
8 * geo_normalize.c: fix support for Laborde Oblique Mercator
9 * listgeo: use PROJ database to display non-hardcoded values of a number of keys
2020 the development kit (include files). The latest version of libtiff may
2121 be found at:
2222
23 http://www.remotesensing.org/libtiff
24
23 http://www.simplesystems.org/libtiff/
24
2525 For this build to work you must use libtiff version v3.6.0 alpha or newer.
26
27 Use of PROJ
28 -----------
29
30 PROJ 6 or later is a required dependency of libgeotiff 1.5 or later.
31 The latest version of PROJ can be found at
32
33 https://proj4.org/
2634
2735
2836 Building LIBGEOTIFF:
3240 may now build the rest of the geotiff library with:
3341
3442 % cd libgeotiff
35 % ./configure
43 % ./configure --with-proj=/contrib/proj-6
3644 % make
3745
3846 Common Configuration Issues:
7280 % make clean
7381 % make
7482
75 o If you want to use EPSG tables compiled into the code, use the
76 --enable-incode-epsg configure switch. It will make the library and
77 resulting executables substantially larger (~600K), but will avoid any
78 configuration issues with finding the .csv files.
79
80 % rm config.status
81 % ./configure --enable-incode-epsg
82 % make clean
83 % make
84
85 o If you want to build in support for the PROJ.4 library, so that listgeo
86 can report corner coordinates in lat/long, it may be necessary to
87 specify the directory containing the libproj include files, and library.
88 (PROJ.4 can also be disabled by passing --without-proj). PROJ.4 info
89 can be found at http://www.remotesensing.org/proj .
90
91 % rm config.status
92 % ./configure --with-proj=/contrib/proj-4.4.1
93 % make clean
94 % make
95
9683 o The logic to build shared libraries is pretty weak, and is likely to
9784 only work on systems with the GNU tool chain (gcc, and ld) installed.
9885 On other systems you can try hacking on Makefile after running configure.
127114 GeoTIFF metadata as stored in "metadata.txt". See "docs/manual.txt"
128115 for further uses of geotifcp.
129116
130 To use the new normalization capability of listgeo, the program needs
131 to be able to find the CSV files. Use something like the following,
132 but indicating the correct path to the CSV directory (libgeotiff/csv).
133
134 % bin/listgeo -t csv -norm newgeo.tif
135
136117 To convert a projection metafile, an ESRI world file, and a raw TIFF file
137118 into a GeoTIFF file do something like the following:
138119
164145 o This library was originally written by Niles Ritter (also the primary
165146 author of the GeoTIFF specification).
166147
167 o It is currently being maintained by Frank Warmerdam (warmerdam@pobox.com),
168 who also added the "normalization" capability of GTIFGetDefn() using
169 EPSG CSV files.
170
171 o Support for "incode" CSV files was submitted by Derrick J Brashear
172 <shadow@dementia.org>.
173
174148 o Eric Brown of Universal Systems, who contributed a bug fix to
175149 GTIFPCSToImage().
176150
1414 lib/libgeotiff-$VERSION.so: Shared library version of the above.
1515 lib/libgeotiff.so: link to the specific shared library.
1616 include: The include files for libgeotiff.
17 share/epsg_csv: The EPSG CSV files used to decompose projection systems.
1817
1918 This distribution is intended to be suitable to untar directly under
2019 /usr/local or /usr to give a rough equivelent to having done a "make install"
2120 from the libgeotiff source, though this README should be removed.
22
23 If this distribution is not installed under /usr/local, it will likely be
24 necessary to define the GEOTIFF_CSV environment variable to point at
25 the share/epsg_csv directory. For reporting of lat/long equivelents of
26
2721
2822 User documentation for listgeo and geotifcp can be found at:
2923
1111 TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
1212 endif
1313
14 AM_CFLAGS = -I../ -I../libxtiff $(TIFF_CFLAGS)
14 AM_CFLAGS = -I../ -I../libxtiff $(TIFF_CFLAGS) @PROJ_INCLUDE@
1515
1616 LDADD = ../libgeotiff.la
1717
201201 CFLAGS = @CFLAGS@
202202 CPP = @CPP@
203203 CPPFLAGS = @CPPFLAGS@
204 CXX = @CXX@
205 CXXCPP = @CXXCPP@
206 CXXDEPMODE = @CXXDEPMODE@
207 CXXFLAGS = @CXXFLAGS@
208204 CYGPATH_W = @CYGPATH_W@
209205 DEFS = @DEFS@
210206 DEPDIR = @DEPDIR@
243239 EXEEXT = @EXEEXT@
244240 FGREP = @FGREP@
245241 GREP = @GREP@
246 HAVE_LIBPROJ = @HAVE_LIBPROJ@
247242 INSTALL = @INSTALL@
248243 INSTALL_DATA = @INSTALL_DATA@
249244 INSTALL_PROGRAM = @INSTALL_PROGRAM@
278273 PACKAGE_URL = @PACKAGE_URL@
279274 PACKAGE_VERSION = @PACKAGE_VERSION@
280275 PATH_SEPARATOR = @PATH_SEPARATOR@
281 PROJ_INC = @PROJ_INC@
276 PROJ_INCLUDE = @PROJ_INCLUDE@
282277 RANLIB = @RANLIB@
283278 RELEASE_VERSION = @RELEASE_VERSION@
284279 SED = @SED@
296291 abs_top_srcdir = @abs_top_srcdir@
297292 ac_ct_AR = @ac_ct_AR@
298293 ac_ct_CC = @ac_ct_CC@
299 ac_ct_CXX = @ac_ct_CXX@
300294 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
301295 am__include = @am__include@
302296 am__leading_dot = @am__leading_dot@
349343 listgeo_SOURCES = listgeo.c
350344 applygeo_SOURCES = applygeo.c
351345 @TIFF_IS_CONFIG_TRUE@TIFF_CFLAGS = @TIFF_INC@ -DHAVE_TIFF=1
352 AM_CFLAGS = -I../ -I../libxtiff $(TIFF_CFLAGS)
346 AM_CFLAGS = -I../ -I../libxtiff $(TIFF_CFLAGS) @PROJ_INCLUDE@
353347 LDADD = ../libgeotiff.la
354348 EXTRA_DIST = getopt.c
355349 all: all-am
7979 char *geofile;
8080 char *tiffile;
8181 int rc;
82
83 if( argc != 3 )
84 {
85 fprintf(stderr, usage, "applygeo");
86 exit(1);
87 }
8288
8389 prog = argv[0];
8490 geofile = argv[1];
740740
741741 printf( "Downsample\n" );
742742
743 (void) imagewidth; (void) spp;
743 (void) spp;
744744 for (row = 0; row < imagelength; row++) {
745745 int i_in, i_out_byte;
746746
748748 goto done;
749749
750750 for( i_in = 0, i_out_byte = 0;
751 i_in < imagewidth;
751 (unsigned)i_in < imagewidth;
752752 i_in += 2, i_out_byte++ )
753753 {
754754 buf_out[i_out_byte] =
1616
1717 static void WriteTFWFile( GTIF * gtif, const char * tif_filename );
1818 static void GTIFPrintCorners( GTIF *, GTIFDefn *, FILE *, int, int, int, int );
19 static const char *CSVFileOverride( const char * );
20 static const char *CSVDirName = NULL;
2119 static TIFF *st_setup_test_info();
2220
2321 void Usage()
5250 {
5351 if( strcmp(argv[i],"-no_norm") == 0 )
5452 norm_print_flag = 0;
55 else if( strcmp(argv[i],"-t") == 0 )
56 {
57 CSVDirName = argv[++i];
58 SetCSVFilenameHook( CSVFileOverride );
59 }
6053 else if( strcmp(argv[i],"-tfw") == 0 )
6154 tfw_flag = 1;
6255 else if( strcmp(argv[i],"-proj4") == 0 )
127120 int xsize, ysize;
128121
129122 printf( "\n" );
130 GTIFPrintDefn( &defn, stdout );
123 GTIFPrintDefnEx( gtif, &defn, stdout );
131124
132125 if( proj4_print_flag )
133126 {
148141 ST_Destroy( (ST_TIFF *) tif );
149142 else
150143 XTIFFClose(tif);
151 GTIFDeaccessCSV();
152144 return 0;
153145
154146 failure:
155147 fprintf(stderr,"failure in listgeo\n");
156148 if (tif) XTIFFClose(tif);
157149 if (gtif) GTIFFree(gtif);
158 GTIFDeaccessCSV();
159150 return 1;
160 }
161
162 static const char *CSVFileOverride( const char * pszInput )
163
164 {
165 static char szPath[1024];
166
167 #ifdef WIN32
168 sprintf( szPath, "%s\\%s", CSVDirName, pszInput );
169 #else
170 sprintf( szPath, "%s/%s", CSVDirName, pszInput );
171 #endif
172
173 return( szPath );
174151 }
175152
176153 /*
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
-44
cmake/FindPROJ4.cmake less more
0 ###############################################################################
1 # CMake module to search for PROJ.4 library
2 #
3 # On success, the macro sets the following variables:
4 # PROJ4_FOUND = if the library found
5 # PROJ4_LIBRARY = full path to the library
6 # PROJ4_INCLUDE_DIR = where to find the library headers
7 # also defined, but not for general use are
8 # PROJ4_LIBRARY, where to find the PROJ.4 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(PROJ4_INCLUDE_DIR proj_api.h
27 PATHS ${PROJ4_OSGEO4W_HOME}/include
28 DOC "Path to PROJ.4 library include directory")
29
30 SET(PROJ4_NAMES ${PROJ4_NAMES} proj proj_i)
31 FIND_LIBRARY(PROJ4_LIBRARY
32 NAMES ${PROJ4_NAMES}
33 PATHS ${PROJ4_OSGEO4W_HOME}/lib
34 DOC "Path to PROJ.4 library file")
35
36 # Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE
37 # if all listed variables are TRUE
38 INCLUDE(FindPackageHandleStandardArgs)
39 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 DEFAULT_MSG PROJ4_LIBRARY PROJ4_INCLUDE_DIR)
40
41 IF(PROJ4_FOUND)
42 SET(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
43 ENDIF()
00 EXTRA_DIST = FindGeoTIFF.cmake \
1 FindPROJ4.cmake \
1 FindPROJ.cmake \
22 geo_config.h.in \
33 project-config-version.cmake.in \
44 project-config.cmake.in \
134134 CFLAGS = @CFLAGS@
135135 CPP = @CPP@
136136 CPPFLAGS = @CPPFLAGS@
137 CXX = @CXX@
138 CXXCPP = @CXXCPP@
139 CXXDEPMODE = @CXXDEPMODE@
140 CXXFLAGS = @CXXFLAGS@
141137 CYGPATH_W = @CYGPATH_W@
142138 DEFS = @DEFS@
143139 DEPDIR = @DEPDIR@
176172 EXEEXT = @EXEEXT@
177173 FGREP = @FGREP@
178174 GREP = @GREP@
179 HAVE_LIBPROJ = @HAVE_LIBPROJ@
180175 INSTALL = @INSTALL@
181176 INSTALL_DATA = @INSTALL_DATA@
182177 INSTALL_PROGRAM = @INSTALL_PROGRAM@
211206 PACKAGE_URL = @PACKAGE_URL@
212207 PACKAGE_VERSION = @PACKAGE_VERSION@
213208 PATH_SEPARATOR = @PATH_SEPARATOR@
214 PROJ_INC = @PROJ_INC@
209 PROJ_INCLUDE = @PROJ_INCLUDE@
215210 RANLIB = @RANLIB@
216211 RELEASE_VERSION = @RELEASE_VERSION@
217212 SED = @SED@
229224 abs_top_srcdir = @abs_top_srcdir@
230225 ac_ct_AR = @ac_ct_AR@
231226 ac_ct_CC = @ac_ct_CC@
232 ac_ct_CXX = @ac_ct_CXX@
233227 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
234228 am__include = @am__include@
235229 am__leading_dot = @am__leading_dot@
278272 top_builddir = @top_builddir@
279273 top_srcdir = @top_srcdir@
280274 EXTRA_DIST = FindGeoTIFF.cmake \
281 FindPROJ4.cmake \
275 FindPROJ.cmake \
282276 geo_config.h.in \
283277 project-config-version.cmake.in \
284278 project-config.cmake.in \
+463
-4441
configure less more
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for libgeotiff 1.4.3.
2 # Generated by GNU Autoconf 2.69 for libgeotiff 1.5.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.4.3'
593 PACKAGE_STRING='libgeotiff 1.4.3'
592 PACKAGE_VERSION='1.5.0'
593 PACKAGE_STRING='libgeotiff 1.5.0'
594594 PACKAGE_BUGREPORT='warmerdam@pobox.com'
595595 PACKAGE_URL=''
596596
681681 DX_DOCDIR
682682 DX_CONFIG
683683 DX_PROJECT
684 CSV_IS_CONFIG_FALSE
685 CSV_IS_CONFIG_TRUE
686 PROJECTS_H_IS_CONFIG_FALSE
687 PROJECTS_H_IS_CONFIG_TRUE
688 PROJ_IS_CONFIG_FALSE
689 PROJ_IS_CONFIG_TRUE
690 HAVE_LIBPROJ
691 PROJ_INC
684 PROJ_INCLUDE
692685 TIFF_IS_CONFIG_FALSE
693686 TIFF_IS_CONFIG_TRUE
694687 TIFF_PREFIX
728721 host
729722 LIBTOOL
730723 LN_S
731 CXXCPP
732 am__fastdepCXX_FALSE
733 am__fastdepCXX_TRUE
734 CXXDEPMODE
735 ac_ct_CXX
736 CXXFLAGS
737 CXX
738724 am__fastdepCC_FALSE
739725 am__fastdepCC_TRUE
740726 CCDEPMODE
847833 with_jpeg
848834 with_libtiff
849835 with_proj
850 enable_incode_epsg
851836 enable_towgs84
852837 enable_doxygen_doc
853838 enable_doxygen_dot
868853 LDFLAGS
869854 LIBS
870855 CPPFLAGS
871 CXX
872 CXXFLAGS
873 CCC
874 CXXCPP
875856 LT_SYS_LIBRARY_PATH
876857 CPP
877858 DOXYGEN_PAPER_SIZE'
14251406 # Omit some internal or obsolete options to make the list less imposing.
14261407 # This message is too long to be a string in the A/UX 3.1 sh.
14271408 cat <<_ACEOF
1428 \`configure' configures libgeotiff 1.4.3 to adapt to many kinds of systems.
1409 \`configure' configures libgeotiff 1.5.0 to adapt to many kinds of systems.
14291410
14301411 Usage: $0 [OPTION]... [VAR=VALUE]...
14311412
14961477
14971478 if test -n "$ac_init_help"; then
14981479 case $ac_init_help in
1499 short | recursive ) echo "Configuration of libgeotiff 1.4.3:";;
1480 short | recursive ) echo "Configuration of libgeotiff 1.5.0:";;
15001481 esac
15011482 cat <<\_ACEOF
15021483
15201501 --disable-libtool-lock avoid locking (might break parallel builds)
15211502 --enable-debug=ARG Enable debug compilation mode [yes|no],
15221503 default=no
1523 --enable-incode-epsg Use C code EPSG tables
15241504 --disable-towgs84 Disable WGS84 parameters for binary compatibility with pre-1.4.1
15251505 --disable-doxygen-doc don't generate any doxygen documentation
15261506 --disable-doxygen-dot don't generate graphics for doxygen documentation
15501530 --with-libz=ARG alias for --with-zip
15511531 --with-jpeg=ARG jpeg library to use (yes or path)
15521532 --with-libtiff=dir Use libtiff in directory dir
1553 --with-proj=ARG Use PROJ.4 library (ARG=no or path)
1533 --with-proj=ARG Compile with PROJ.x (ARG=yes or path)
15541534
15551535 Some influential environment variables:
15561536 CC C compiler command
15601540 LIBS libraries to pass to the linker, e.g. -l<library>
15611541 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
15621542 you have headers in a nonstandard directory <include dir>
1563 CXX C++ compiler command
1564 CXXFLAGS C++ compiler flags
1565 CXXCPP C++ preprocessor
15661543 LT_SYS_LIBRARY_PATH
15671544 User-defined run-time library search path.
15681545 CPP C preprocessor
16351612 test -n "$ac_init_help" && exit $ac_status
16361613 if $ac_init_version; then
16371614 cat <<\_ACEOF
1638 libgeotiff configure 1.4.3
1615 libgeotiff configure 1.5.0
16391616 generated by GNU Autoconf 2.69
16401617
16411618 Copyright (C) 2012 Free Software Foundation, Inc.
16861663 as_fn_set_status $ac_retval
16871664
16881665 } # ac_fn_c_try_compile
1689
1690 # ac_fn_cxx_try_compile LINENO
1691 # ----------------------------
1692 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1693 ac_fn_cxx_try_compile ()
1694 {
1695 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696 rm -f conftest.$ac_objext
1697 if { { ac_try="$ac_compile"
1698 case "(($ac_try" in
1699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1700 *) ac_try_echo=$ac_try;;
1701 esac
1702 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1703 $as_echo "$ac_try_echo"; } >&5
1704 (eval "$ac_compile") 2>conftest.err
1705 ac_status=$?
1706 if test -s conftest.err; then
1707 grep -v '^ *+' conftest.err >conftest.er1
1708 cat conftest.er1 >&5
1709 mv -f conftest.er1 conftest.err
1710 fi
1711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1712 test $ac_status = 0; } && {
1713 test -z "$ac_cxx_werror_flag" ||
1714 test ! -s conftest.err
1715 } && test -s conftest.$ac_objext; then :
1716 ac_retval=0
1717 else
1718 $as_echo "$as_me: failed program was:" >&5
1719 sed 's/^/| /' conftest.$ac_ext >&5
1720
1721 ac_retval=1
1722 fi
1723 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1724 as_fn_set_status $ac_retval
1725
1726 } # ac_fn_cxx_try_compile
1727
1728 # ac_fn_cxx_try_cpp LINENO
1729 # ------------------------
1730 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1731 ac_fn_cxx_try_cpp ()
1732 {
1733 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1734 if { { ac_try="$ac_cpp conftest.$ac_ext"
1735 case "(($ac_try" in
1736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1737 *) ac_try_echo=$ac_try;;
1738 esac
1739 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1740 $as_echo "$ac_try_echo"; } >&5
1741 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1742 ac_status=$?
1743 if test -s conftest.err; then
1744 grep -v '^ *+' conftest.err >conftest.er1
1745 cat conftest.er1 >&5
1746 mv -f conftest.er1 conftest.err
1747 fi
1748 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1749 test $ac_status = 0; } > conftest.i && {
1750 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
1751 test ! -s conftest.err
1752 }; then :
1753 ac_retval=0
1754 else
1755 $as_echo "$as_me: failed program was:" >&5
1756 sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759 fi
1760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1761 as_fn_set_status $ac_retval
1762
1763 } # ac_fn_cxx_try_cpp
17641666
17651667 # ac_fn_c_try_link LINENO
17661668 # -----------------------
19851887
19861888 } # ac_fn_c_check_func
19871889
1988 # ac_fn_cxx_try_link LINENO
1989 # -------------------------
1990 # Try to link conftest.$ac_ext, and return whether this succeeded.
1991 ac_fn_cxx_try_link ()
1992 {
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 rm -f conftest.$ac_objext conftest$ac_exeext
1995 if { { ac_try="$ac_link"
1996 case "(($ac_try" in
1997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998 *) ac_try_echo=$ac_try;;
1999 esac
2000 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001 $as_echo "$ac_try_echo"; } >&5
2002 (eval "$ac_link") 2>conftest.err
2003 ac_status=$?
2004 if test -s conftest.err; then
2005 grep -v '^ *+' conftest.err >conftest.er1
2006 cat conftest.er1 >&5
2007 mv -f conftest.er1 conftest.err
2008 fi
2009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010 test $ac_status = 0; } && {
2011 test -z "$ac_cxx_werror_flag" ||
2012 test ! -s conftest.err
2013 } && test -s conftest$ac_exeext && {
2014 test "$cross_compiling" = yes ||
2015 test -x conftest$ac_exeext
2016 }; then :
2017 ac_retval=0
2018 else
2019 $as_echo "$as_me: failed program was:" >&5
2020 sed 's/^/| /' conftest.$ac_ext >&5
2021
2022 ac_retval=1
2023 fi
2024 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2025 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2026 # interfere with the next link command; also delete a directory that is
2027 # left behind by Apple's compiler. We do this before executing the actions.
2028 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030 as_fn_set_status $ac_retval
2031
2032 } # ac_fn_cxx_try_link
2033
20341890 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
20351891 # -------------------------------------------------------
20361892 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
21251981 This file contains any messages produced by compilers while
21261982 running configure, to aid debugging if configure makes a mistake.
21271983
2128 It was created by libgeotiff $as_me 1.4.3, which was
1984 It was created by libgeotiff $as_me 1.5.0, which was
21291985 generated by GNU Autoconf 2.69. Invocation command line was
21301986
21311987 $ $0 $@
25432399
25442400
25452401
2546 RELEASE_VERSION=1.4.3
2402 RELEASE_VERSION=1.5.0
25472403
25482404 ac_config_headers="$ac_config_headers geo_config.h"
25492405
30352891
30362892 # Define the identity of the package.
30372893 PACKAGE='libgeotiff'
3038 VERSION='1.4.3'
2894 VERSION='1.5.0'
30392895
30402896
30412897 cat >>confdefs.h <<_ACEOF
41894045 am__fastdepCC_FALSE=
41904046 fi
41914047
4192
4193 ac_ext=cpp
4194 ac_cpp='$CXXCPP $CPPFLAGS'
4195 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4196 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4197 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4198 if test -z "$CXX"; then
4199 if test -n "$CCC"; then
4200 CXX=$CCC
4201 else
4202 if test -n "$ac_tool_prefix"; then
4203 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4204 do
4205 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4206 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4208 $as_echo_n "checking for $ac_word... " >&6; }
4209 if ${ac_cv_prog_CXX+:} false; then :
4210 $as_echo_n "(cached) " >&6
4211 else
4212 if test -n "$CXX"; then
4213 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4214 else
4215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4216 for as_dir in $PATH
4217 do
4218 IFS=$as_save_IFS
4219 test -z "$as_dir" && as_dir=.
4220 for ac_exec_ext in '' $ac_executable_extensions; do
4221 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4222 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4224 break 2
4225 fi
4226 done
4227 done
4228 IFS=$as_save_IFS
4229
4230 fi
4231 fi
4232 CXX=$ac_cv_prog_CXX
4233 if test -n "$CXX"; then
4234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4235 $as_echo "$CXX" >&6; }
4236 else
4237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4238 $as_echo "no" >&6; }
4239 fi
4240
4241
4242 test -n "$CXX" && break
4243 done
4244 fi
4245 if test -z "$CXX"; then
4246 ac_ct_CXX=$CXX
4247 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4248 do
4249 # Extract the first word of "$ac_prog", so it can be a program name with args.
4250 set dummy $ac_prog; ac_word=$2
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4252 $as_echo_n "checking for $ac_word... " >&6; }
4253 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4254 $as_echo_n "(cached) " >&6
4255 else
4256 if test -n "$ac_ct_CXX"; then
4257 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4258 else
4259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4260 for as_dir in $PATH
4261 do
4262 IFS=$as_save_IFS
4263 test -z "$as_dir" && as_dir=.
4264 for ac_exec_ext in '' $ac_executable_extensions; do
4265 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4266 ac_cv_prog_ac_ct_CXX="$ac_prog"
4267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4268 break 2
4269 fi
4270 done
4271 done
4272 IFS=$as_save_IFS
4273
4274 fi
4275 fi
4276 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4277 if test -n "$ac_ct_CXX"; then
4278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4279 $as_echo "$ac_ct_CXX" >&6; }
4280 else
4281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4282 $as_echo "no" >&6; }
4283 fi
4284
4285
4286 test -n "$ac_ct_CXX" && break
4287 done
4288
4289 if test "x$ac_ct_CXX" = x; then
4290 CXX="g++"
4291 else
4292 case $cross_compiling:$ac_tool_warned in
4293 yes:)
4294 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4295 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4296 ac_tool_warned=yes ;;
4297 esac
4298 CXX=$ac_ct_CXX
4299 fi
4300 fi
4301
4302 fi
4303 fi
4304 # Provide some information about the compiler.
4305 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4306 set X $ac_compile
4307 ac_compiler=$2
4308 for ac_option in --version -v -V -qversion; do
4309 { { ac_try="$ac_compiler $ac_option >&5"
4310 case "(($ac_try" in
4311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4312 *) ac_try_echo=$ac_try;;
4313 esac
4314 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4315 $as_echo "$ac_try_echo"; } >&5
4316 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4317 ac_status=$?
4318 if test -s conftest.err; then
4319 sed '10a\
4320 ... rest of stderr output deleted ...
4321 10q' conftest.err >conftest.er1
4322 cat conftest.er1 >&5
4323 fi
4324 rm -f conftest.er1 conftest.err
4325 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4326 test $ac_status = 0; }
4327 done
4328
4329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4330 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4331 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4332 $as_echo_n "(cached) " >&6
4333 else
4334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4335 /* end confdefs.h. */
4336
4337 int
4338 main ()
4339 {
4340 #ifndef __GNUC__
4341 choke me
4342 #endif
4343
4344 ;
4345 return 0;
4346 }
4347 _ACEOF
4348 if ac_fn_cxx_try_compile "$LINENO"; then :
4349 ac_compiler_gnu=yes
4350 else
4351 ac_compiler_gnu=no
4352 fi
4353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4354 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4355
4356 fi
4357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4358 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4359 if test $ac_compiler_gnu = yes; then
4360 GXX=yes
4361 else
4362 GXX=
4363 fi
4364 ac_test_CXXFLAGS=${CXXFLAGS+set}
4365 ac_save_CXXFLAGS=$CXXFLAGS
4366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4367 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4368 if ${ac_cv_prog_cxx_g+:} false; then :
4369 $as_echo_n "(cached) " >&6
4370 else
4371 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4372 ac_cxx_werror_flag=yes
4373 ac_cv_prog_cxx_g=no
4374 CXXFLAGS="-g"
4375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4376 /* end confdefs.h. */
4377
4378 int
4379 main ()
4380 {
4381
4382 ;
4383 return 0;
4384 }
4385 _ACEOF
4386 if ac_fn_cxx_try_compile "$LINENO"; then :
4387 ac_cv_prog_cxx_g=yes
4388 else
4389 CXXFLAGS=""
4390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4391 /* end confdefs.h. */
4392
4393 int
4394 main ()
4395 {
4396
4397 ;
4398 return 0;
4399 }
4400 _ACEOF
4401 if ac_fn_cxx_try_compile "$LINENO"; then :
4402
4403 else
4404 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4405 CXXFLAGS="-g"
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407 /* end confdefs.h. */
4408
4409 int
4410 main ()
4411 {
4412
4413 ;
4414 return 0;
4415 }
4416 _ACEOF
4417 if ac_fn_cxx_try_compile "$LINENO"; then :
4418 ac_cv_prog_cxx_g=yes
4419 fi
4420 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4421 fi
4422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4423 fi
4424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4425 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4426 fi
4427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4428 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4429 if test "$ac_test_CXXFLAGS" = set; then
4430 CXXFLAGS=$ac_save_CXXFLAGS
4431 elif test $ac_cv_prog_cxx_g = yes; then
4432 if test "$GXX" = yes; then
4433 CXXFLAGS="-g -O2"
4434 else
4435 CXXFLAGS="-g"
4436 fi
4437 else
4438 if test "$GXX" = yes; then
4439 CXXFLAGS="-O2"
4440 else
4441 CXXFLAGS=
4442 fi
4443 fi
4444 ac_ext=c
4445 ac_cpp='$CPP $CPPFLAGS'
4446 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4447 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4448 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4449
4450 depcc="$CXX" am_compiler_list=
4451
4452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4453 $as_echo_n "checking dependency style of $depcc... " >&6; }
4454 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
4455 $as_echo_n "(cached) " >&6
4456 else
4457 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4458 # We make a subdir and do the tests there. Otherwise we can end up
4459 # making bogus files that we don't know about and never remove. For
4460 # instance it was reported that on HP-UX the gcc test will end up
4461 # making a dummy file named 'D' -- because '-MD' means "put the output
4462 # in D".
4463 rm -rf conftest.dir
4464 mkdir conftest.dir
4465 # Copy depcomp to subdir because otherwise we won't find it if we're
4466 # using a relative directory.
4467 cp "$am_depcomp" conftest.dir
4468 cd conftest.dir
4469 # We will build objects and dependencies in a subdirectory because
4470 # it helps to detect inapplicable dependency modes. For instance
4471 # both Tru64's cc and ICC support -MD to output dependencies as a
4472 # side effect of compilation, but ICC will put the dependencies in
4473 # the current directory while Tru64 will put them in the object
4474 # directory.
4475 mkdir sub
4476
4477 am_cv_CXX_dependencies_compiler_type=none
4478 if test "$am_compiler_list" = ""; then
4479 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4480 fi
4481 am__universal=false
4482 case " $depcc " in #(
4483 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4484 esac
4485
4486 for depmode in $am_compiler_list; do
4487 # Setup a source with many dependencies, because some compilers
4488 # like to wrap large dependency lists on column 80 (with \), and
4489 # we should not choose a depcomp mode which is confused by this.
4490 #
4491 # We need to recreate these files for each test, as the compiler may
4492 # overwrite some of them when testing with obscure command lines.
4493 # This happens at least with the AIX C compiler.
4494 : > sub/conftest.c
4495 for i in 1 2 3 4 5 6; do
4496 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4497 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4498 # Solaris 10 /bin/sh.
4499 echo '/* dummy */' > sub/conftst$i.h
4500 done
4501 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4502
4503 # We check with '-c' and '-o' for the sake of the "dashmstdout"
4504 # mode. It turns out that the SunPro C++ compiler does not properly
4505 # handle '-M -o', and we need to detect this. Also, some Intel
4506 # versions had trouble with output in subdirs.
4507 am__obj=sub/conftest.${OBJEXT-o}
4508 am__minus_obj="-o $am__obj"
4509 case $depmode in
4510 gcc)
4511 # This depmode causes a compiler race in universal mode.
4512 test "$am__universal" = false || continue
4513 ;;
4514 nosideeffect)
4515 # After this tag, mechanisms are not by side-effect, so they'll
4516 # only be used when explicitly requested.
4517 if test "x$enable_dependency_tracking" = xyes; then
4518 continue
4519 else
4520 break
4521 fi
4522 ;;
4523 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4524 # This compiler won't grok '-c -o', but also, the minuso test has
4525 # not run yet. These depmodes are late enough in the game, and
4526 # so weak that their functioning should not be impacted.
4527 am__obj=conftest.${OBJEXT-o}
4528 am__minus_obj=
4529 ;;
4530 none) break ;;
4531 esac
4532 if depmode=$depmode \
4533 source=sub/conftest.c object=$am__obj \
4534 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4535 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4536 >/dev/null 2>conftest.err &&
4537 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4538 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4539 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4540 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4541 # icc doesn't choke on unknown options, it will just issue warnings
4542 # or remarks (even with -Werror). So we grep stderr for any message
4543 # that says an option was ignored or not supported.
4544 # When given -MP, icc 7.0 and 7.1 complain thusly:
4545 # icc: Command line warning: ignoring option '-M'; no argument required
4546 # The diagnosis changed in icc 8.0:
4547 # icc: Command line remark: option '-MP' not supported
4548 if (grep 'ignoring option' conftest.err ||
4549 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4550 am_cv_CXX_dependencies_compiler_type=$depmode
4551 break
4552 fi
4553 fi
4554 done
4555
4556 cd ..
4557 rm -rf conftest.dir
4558 else
4559 am_cv_CXX_dependencies_compiler_type=none
4560 fi
4561
4562 fi
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
4564 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
4565 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
4566
4567 if
4568 test "x$enable_dependency_tracking" != xno \
4569 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
4570 am__fastdepCXX_TRUE=
4571 am__fastdepCXX_FALSE='#'
4572 else
4573 am__fastdepCXX_TRUE='#'
4574 am__fastdepCXX_FALSE=
4575 fi
4576
4577
4578 ac_ext=cpp
4579 ac_cpp='$CXXCPP $CPPFLAGS'
4580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
4584 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
4585 if test -z "$CXXCPP"; then
4586 if ${ac_cv_prog_CXXCPP+:} false; then :
4587 $as_echo_n "(cached) " >&6
4588 else
4589 # Double quotes because CXXCPP needs to be expanded
4590 for CXXCPP in "$CXX -E" "/lib/cpp"
4591 do
4592 ac_preproc_ok=false
4593 for ac_cxx_preproc_warn_flag in '' yes
4594 do
4595 # Use a header file that comes with gcc, so configuring glibc
4596 # with a fresh cross-compiler works.
4597 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4598 # <limits.h> exists even on freestanding compilers.
4599 # On the NeXT, cc -E runs the code through the compiler's parser,
4600 # not just through cpp. "Syntax error" is here to catch this case.
4601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4602 /* end confdefs.h. */
4603 #ifdef __STDC__
4604 # include <limits.h>
4605 #else
4606 # include <assert.h>
4607 #endif
4608 Syntax error
4609 _ACEOF
4610 if ac_fn_cxx_try_cpp "$LINENO"; then :
4611
4612 else
4613 # Broken: fails on valid input.
4614 continue
4615 fi
4616 rm -f conftest.err conftest.i conftest.$ac_ext
4617
4618 # OK, works on sane cases. Now check whether nonexistent headers
4619 # can be detected and how.
4620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4621 /* end confdefs.h. */
4622 #include <ac_nonexistent.h>
4623 _ACEOF
4624 if ac_fn_cxx_try_cpp "$LINENO"; then :
4625 # Broken: success on invalid input.
4626 continue
4627 else
4628 # Passes both tests.
4629 ac_preproc_ok=:
4630 break
4631 fi
4632 rm -f conftest.err conftest.i conftest.$ac_ext
4633
4634 done
4635 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4636 rm -f conftest.i conftest.err conftest.$ac_ext
4637 if $ac_preproc_ok; then :
4638 break
4639 fi
4640
4641 done
4642 ac_cv_prog_CXXCPP=$CXXCPP
4643
4644 fi
4645 CXXCPP=$ac_cv_prog_CXXCPP
4646 else
4647 ac_cv_prog_CXXCPP=$CXXCPP
4648 fi
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
4650 $as_echo "$CXXCPP" >&6; }
4651 ac_preproc_ok=false
4652 for ac_cxx_preproc_warn_flag in '' yes
4653 do
4654 # Use a header file that comes with gcc, so configuring glibc
4655 # with a fresh cross-compiler works.
4656 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4657 # <limits.h> exists even on freestanding compilers.
4658 # On the NeXT, cc -E runs the code through the compiler's parser,
4659 # not just through cpp. "Syntax error" is here to catch this case.
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661 /* end confdefs.h. */
4662 #ifdef __STDC__
4663 # include <limits.h>
4664 #else
4665 # include <assert.h>
4666 #endif
4667 Syntax error
4668 _ACEOF
4669 if ac_fn_cxx_try_cpp "$LINENO"; then :
4670
4671 else
4672 # Broken: fails on valid input.
4673 continue
4674 fi
4675 rm -f conftest.err conftest.i conftest.$ac_ext
4676
4677 # OK, works on sane cases. Now check whether nonexistent headers
4678 # can be detected and how.
4679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4680 /* end confdefs.h. */
4681 #include <ac_nonexistent.h>
4682 _ACEOF
4683 if ac_fn_cxx_try_cpp "$LINENO"; then :
4684 # Broken: success on invalid input.
4685 continue
4686 else
4687 # Passes both tests.
4688 ac_preproc_ok=:
4689 break
4690 fi
4691 rm -f conftest.err conftest.i conftest.$ac_ext
4692
4693 done
4694 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4695 rm -f conftest.i conftest.err conftest.$ac_ext
4696 if $ac_preproc_ok; then :
4697
4698 else
4699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4700 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4701 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
4702 See \`config.log' for more details" "$LINENO" 5; }
4703 fi
4704
4705 ac_ext=c
4706 ac_cpp='$CPP $CPPFLAGS'
4707 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4708 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4709 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47104048
47114049
47124050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
84707808 fi
84717809
84727810 done
8473
8474
8475
8476
8477 func_stripname_cnf ()
8478 {
8479 case $2 in
8480 .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
8481 *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
8482 esac
8483 } # func_stripname_cnf
84847811
84857812
84867813
1277612103
1277712104 CC=$lt_save_CC
1277812105
12779 if test -n "$CXX" && ( test no != "$CXX" &&
12780 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
12781 (test g++ != "$CXX"))); then
12782 ac_ext=cpp
12783 ac_cpp='$CXXCPP $CPPFLAGS'
12784 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12785 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12786 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
12788 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
12789 if test -z "$CXXCPP"; then
12790 if ${ac_cv_prog_CXXCPP+:} false; then :
12791 $as_echo_n "(cached) " >&6
12792 else
12793 # Double quotes because CXXCPP needs to be expanded
12794 for CXXCPP in "$CXX -E" "/lib/cpp"
12795 do
12796 ac_preproc_ok=false
12797 for ac_cxx_preproc_warn_flag in '' yes
12798 do
12799 # Use a header file that comes with gcc, so configuring glibc
12800 # with a fresh cross-compiler works.
12801 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12802 # <limits.h> exists even on freestanding compilers.
12803 # On the NeXT, cc -E runs the code through the compiler's parser,
12804 # not just through cpp. "Syntax error" is here to catch this case.
12805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12806 /* end confdefs.h. */
12807 #ifdef __STDC__
12808 # include <limits.h>
12809 #else
12810 # include <assert.h>
12811 #endif
12812 Syntax error
12813 _ACEOF
12814 if ac_fn_cxx_try_cpp "$LINENO"; then :
12815
12816 else
12817 # Broken: fails on valid input.
12818 continue
12819 fi
12820 rm -f conftest.err conftest.i conftest.$ac_ext
12821
12822 # OK, works on sane cases. Now check whether nonexistent headers
12823 # can be detected and how.
12824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12825 /* end confdefs.h. */
12826 #include <ac_nonexistent.h>
12827 _ACEOF
12828 if ac_fn_cxx_try_cpp "$LINENO"; then :
12829 # Broken: success on invalid input.
12830 continue
12831 else
12832 # Passes both tests.
12833 ac_preproc_ok=:
12834 break
12835 fi
12836 rm -f conftest.err conftest.i conftest.$ac_ext
12837
12838 done
12839 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12840 rm -f conftest.i conftest.err conftest.$ac_ext
12841 if $ac_preproc_ok; then :
12842 break
12843 fi
12844
12845 done
12846 ac_cv_prog_CXXCPP=$CXXCPP
12847
12848 fi
12849 CXXCPP=$ac_cv_prog_CXXCPP
12850 else
12851 ac_cv_prog_CXXCPP=$CXXCPP
12852 fi
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
12854 $as_echo "$CXXCPP" >&6; }
12855 ac_preproc_ok=false
12856 for ac_cxx_preproc_warn_flag in '' yes
12857 do
12858 # Use a header file that comes with gcc, so configuring glibc
12859 # with a fresh cross-compiler works.
12860 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12861 # <limits.h> exists even on freestanding compilers.
12862 # On the NeXT, cc -E runs the code through the compiler's parser,
12863 # not just through cpp. "Syntax error" is here to catch this case.
12864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12865 /* end confdefs.h. */
12866 #ifdef __STDC__
12867 # include <limits.h>
12868 #else
12869 # include <assert.h>
12870 #endif
12871 Syntax error
12872 _ACEOF
12873 if ac_fn_cxx_try_cpp "$LINENO"; then :
12874
12875 else
12876 # Broken: fails on valid input.
12877 continue
12878 fi
12879 rm -f conftest.err conftest.i conftest.$ac_ext
12880
12881 # OK, works on sane cases. Now check whether nonexistent headers
12882 # can be detected and how.
12883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12884 /* end confdefs.h. */
12885 #include <ac_nonexistent.h>
12886 _ACEOF
12887 if ac_fn_cxx_try_cpp "$LINENO"; then :
12888 # Broken: success on invalid input.
12889 continue
12890 else
12891 # Passes both tests.
12892 ac_preproc_ok=:
12893 break
12894 fi
12895 rm -f conftest.err conftest.i conftest.$ac_ext
12896
12897 done
12898 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12899 rm -f conftest.i conftest.err conftest.$ac_ext
12900 if $ac_preproc_ok; then :
12901
12902 else
12903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12904 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12905 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
12906 See \`config.log' for more details" "$LINENO" 5; }
12907 fi
12908
12909 ac_ext=c
12910 ac_cpp='$CPP $CPPFLAGS'
12911 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12912 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12913 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12914
12915 else
12916 _lt_caught_CXX_error=yes
12917 fi
12918
12919 ac_ext=cpp
12920 ac_cpp='$CXXCPP $CPPFLAGS'
12921 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12922 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12923 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12924
12925 archive_cmds_need_lc_CXX=no
12926 allow_undefined_flag_CXX=
12927 always_export_symbols_CXX=no
12928 archive_expsym_cmds_CXX=
12929 compiler_needs_object_CXX=no
12930 export_dynamic_flag_spec_CXX=
12931 hardcode_direct_CXX=no
12932 hardcode_direct_absolute_CXX=no
12933 hardcode_libdir_flag_spec_CXX=
12934 hardcode_libdir_separator_CXX=
12935 hardcode_minus_L_CXX=no
12936 hardcode_shlibpath_var_CXX=unsupported
12937 hardcode_automatic_CXX=no
12938 inherit_rpath_CXX=no
12939 module_cmds_CXX=
12940 module_expsym_cmds_CXX=
12941 link_all_deplibs_CXX=unknown
12942 old_archive_cmds_CXX=$old_archive_cmds
12943 reload_flag_CXX=$reload_flag
12944 reload_cmds_CXX=$reload_cmds
12945 no_undefined_flag_CXX=
12946 whole_archive_flag_spec_CXX=
12947 enable_shared_with_static_runtimes_CXX=no
12948
12949 # Source file extension for C++ test sources.
12950 ac_ext=cpp
12951
12952 # Object file extension for compiled C++ test sources.
12953 objext=o
12954 objext_CXX=$objext
12955
12956 # No sense in running all these tests if we already determined that
12957 # the CXX compiler isn't working. Some variables (like enable_shared)
12958 # are currently assumed to apply to all compilers on this platform,
12959 # and will be corrupted by setting them based on a non-working compiler.
12960 if test yes != "$_lt_caught_CXX_error"; then
12961 # Code to be used in simple compile tests
12962 lt_simple_compile_test_code="int some_variable = 0;"
12963
12964 # Code to be used in simple link tests
12965 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
12966
12967 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
12968
12969
12970
12971
12972
12973
12974 # If no C compiler was specified, use CC.
12975 LTCC=${LTCC-"$CC"}
12976
12977 # If no C compiler flags were specified, use CFLAGS.
12978 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
12979
12980 # Allow CC to be a program name with arguments.
12981 compiler=$CC
12982
12983
12984 # save warnings/boilerplate of simple test code
12985 ac_outfile=conftest.$ac_objext
12986 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
12987 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12988 _lt_compiler_boilerplate=`cat conftest.err`
12989 $RM conftest*
12990
12991 ac_outfile=conftest.$ac_objext
12992 echo "$lt_simple_link_test_code" >conftest.$ac_ext
12993 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
12994 _lt_linker_boilerplate=`cat conftest.err`
12995 $RM -r conftest*
12996
12997
12998 # Allow CC to be a program name with arguments.
12999 lt_save_CC=$CC
13000 lt_save_CFLAGS=$CFLAGS
13001 lt_save_LD=$LD
13002 lt_save_GCC=$GCC
13003 GCC=$GXX
13004 lt_save_with_gnu_ld=$with_gnu_ld
13005 lt_save_path_LD=$lt_cv_path_LD
13006 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
13007 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
13008 else
13009 $as_unset lt_cv_prog_gnu_ld
13010 fi
13011 if test -n "${lt_cv_path_LDCXX+set}"; then
13012 lt_cv_path_LD=$lt_cv_path_LDCXX
13013 else
13014 $as_unset lt_cv_path_LD
13015 fi
13016 test -z "${LDCXX+set}" || LD=$LDCXX
13017 CC=${CXX-"c++"}
13018 CFLAGS=$CXXFLAGS
13019 compiler=$CC
13020 compiler_CXX=$CC
13021 func_cc_basename $compiler
13022 cc_basename=$func_cc_basename_result
13023
13024
13025 if test -n "$compiler"; then
13026 # We don't want -fno-exception when compiling C++ code, so set the
13027 # no_builtin_flag separately
13028 if test yes = "$GXX"; then
13029 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
13030 else
13031 lt_prog_compiler_no_builtin_flag_CXX=
13032 fi
13033
13034 if test yes = "$GXX"; then
13035 # Set up default GNU C++ configuration
13036
13037
13038
13039 # Check whether --with-gnu-ld was given.
13040 if test "${with_gnu_ld+set}" = set; then :
13041 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
13042 else
13043 with_gnu_ld=no
13044 fi
13045
13046 ac_prog=ld
13047 if test yes = "$GCC"; then
13048 # Check if gcc -print-prog-name=ld gives a path.
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
13050 $as_echo_n "checking for ld used by $CC... " >&6; }
13051 case $host in
13052 *-*-mingw*)
13053 # gcc leaves a trailing carriage return, which upsets mingw
13054 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
13055 *)
13056 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
13057 esac
13058 case $ac_prog in
13059 # Accept absolute paths.
13060 [\\/]* | ?:[\\/]*)
13061 re_direlt='/[^/][^/]*/\.\./'
13062 # Canonicalize the pathname of ld
13063 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
13064 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
13065 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
13066 done
13067 test -z "$LD" && LD=$ac_prog
13068 ;;
13069 "")
13070 # If it fails, then pretend we aren't using GCC.
13071 ac_prog=ld
13072 ;;
13073 *)
13074 # If it is relative, then search for the first ld in PATH.
13075 with_gnu_ld=unknown
13076 ;;
13077 esac
13078 elif test yes = "$with_gnu_ld"; then
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
13080 $as_echo_n "checking for GNU ld... " >&6; }
13081 else
13082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
13083 $as_echo_n "checking for non-GNU ld... " >&6; }
13084 fi
13085 if ${lt_cv_path_LD+:} false; then :
13086 $as_echo_n "(cached) " >&6
13087 else
13088 if test -z "$LD"; then
13089 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
13090 for ac_dir in $PATH; do
13091 IFS=$lt_save_ifs
13092 test -z "$ac_dir" && ac_dir=.
13093 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
13094 lt_cv_path_LD=$ac_dir/$ac_prog
13095 # Check to see if the program is GNU ld. I'd rather use --version,
13096 # but apparently some variants of GNU ld only accept -v.
13097 # Break only if it was the GNU/non-GNU ld that we prefer.
13098 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
13099 *GNU* | *'with BFD'*)
13100 test no != "$with_gnu_ld" && break
13101 ;;
13102 *)
13103 test yes != "$with_gnu_ld" && break
13104 ;;
13105 esac
13106 fi
13107 done
13108 IFS=$lt_save_ifs
13109 else
13110 lt_cv_path_LD=$LD # Let the user override the test with a path.
13111 fi
13112 fi
13113
13114 LD=$lt_cv_path_LD
13115 if test -n "$LD"; then
13116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
13117 $as_echo "$LD" >&6; }
13118 else
13119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13120 $as_echo "no" >&6; }
13121 fi
13122 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
13124 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
13125 if ${lt_cv_prog_gnu_ld+:} false; then :
13126 $as_echo_n "(cached) " >&6
13127 else
13128 # I'd rather use --version here, but apparently some GNU lds only accept -v.
13129 case `$LD -v 2>&1 </dev/null` in
13130 *GNU* | *'with BFD'*)
13131 lt_cv_prog_gnu_ld=yes
13132 ;;
13133 *)
13134 lt_cv_prog_gnu_ld=no
13135 ;;
13136 esac
13137 fi
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
13139 $as_echo "$lt_cv_prog_gnu_ld" >&6; }
13140 with_gnu_ld=$lt_cv_prog_gnu_ld
13141
13142
13143
13144
13145
13146
13147
13148 # Check if GNU C++ uses GNU ld as the underlying linker, since the
13149 # archiving commands below assume that GNU ld is being used.
13150 if test yes = "$with_gnu_ld"; then
13151 archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13152 archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13153
13154 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
13155 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13156
13157 # If archive_cmds runs LD, not CC, wlarc should be empty
13158 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
13159 # investigate it a little bit more. (MM)
13160 wlarc='$wl'
13161
13162 # ancient GNU ld didn't support --whole-archive et. al.
13163 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
13164 $GREP 'no-whole-archive' > /dev/null; then
13165 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
13166 else
13167 whole_archive_flag_spec_CXX=
13168 fi
13169 else
13170 with_gnu_ld=no
13171 wlarc=
13172
13173 # A generic and very simple default shared library creation
13174 # command for GNU C++ for the case where it uses the native
13175 # linker, instead of GNU ld. If possible, this setting should
13176 # overridden to take advantage of the native linker features on
13177 # the platform it is being used on.
13178 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
13179 fi
13180
13181 # Commands to make compiler produce verbose output that lists
13182 # what "hidden" libraries, object files and flags are used when
13183 # linking a shared library.
13184 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
13185
13186 else
13187 GXX=no
13188 with_gnu_ld=no
13189 wlarc=
13190 fi
13191
13192 # PORTME: fill in a description of your system's C++ link characteristics
13193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
13194 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
13195 ld_shlibs_CXX=yes
13196 case $host_os in
13197 aix3*)
13198 # FIXME: insert proper C++ library support
13199 ld_shlibs_CXX=no
13200 ;;
13201 aix[4-9]*)
13202 if test ia64 = "$host_cpu"; then
13203 # On IA64, the linker does run time linking by default, so we don't
13204 # have to do anything special.
13205 aix_use_runtimelinking=no
13206 exp_sym_flag='-Bexport'
13207 no_entry_flag=
13208 else
13209 aix_use_runtimelinking=no
13210
13211 # Test if we are trying to use run time linking or normal
13212 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
13213 # have runtime linking enabled, and use it for executables.
13214 # For shared libraries, we enable/disable runtime linking
13215 # depending on the kind of the shared library created -
13216 # when "with_aix_soname,aix_use_runtimelinking" is:
13217 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
13218 # "aix,yes" lib.so shared, rtl:yes, for executables
13219 # lib.a static archive
13220 # "both,no" lib.so.V(shr.o) shared, rtl:yes
13221 # lib.a(lib.so.V) shared, rtl:no, for executables
13222 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
13223 # lib.a(lib.so.V) shared, rtl:no
13224 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
13225 # lib.a static archive
13226 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
13227 for ld_flag in $LDFLAGS; do
13228 case $ld_flag in
13229 *-brtl*)
13230 aix_use_runtimelinking=yes
13231 break
13232 ;;
13233 esac
13234 done
13235 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
13236 # With aix-soname=svr4, we create the lib.so.V shared archives only,
13237 # so we don't have lib.a shared libs to link our executables.
13238 # We have to force runtime linking in this case.
13239 aix_use_runtimelinking=yes
13240 LDFLAGS="$LDFLAGS -Wl,-brtl"
13241 fi
13242 ;;
13243 esac
13244
13245 exp_sym_flag='-bexport'
13246 no_entry_flag='-bnoentry'
13247 fi
13248
13249 # When large executables or shared objects are built, AIX ld can
13250 # have problems creating the table of contents. If linking a library
13251 # or program results in "error TOC overflow" add -mminimal-toc to
13252 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
13253 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
13254
13255 archive_cmds_CXX=''
13256 hardcode_direct_CXX=yes
13257 hardcode_direct_absolute_CXX=yes
13258 hardcode_libdir_separator_CXX=':'
13259 link_all_deplibs_CXX=yes
13260 file_list_spec_CXX='$wl-f,'
13261 case $with_aix_soname,$aix_use_runtimelinking in
13262 aix,*) ;; # no import file
13263 svr4,* | *,yes) # use import file
13264 # The Import File defines what to hardcode.
13265 hardcode_direct_CXX=no
13266 hardcode_direct_absolute_CXX=no
13267 ;;
13268 esac
13269
13270 if test yes = "$GXX"; then
13271 case $host_os in aix4.[012]|aix4.[012].*)
13272 # We only want to do this on AIX 4.2 and lower, the check
13273 # below for broken collect2 doesn't work under 4.3+
13274 collect2name=`$CC -print-prog-name=collect2`
13275 if test -f "$collect2name" &&
13276 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
13277 then
13278 # We have reworked collect2
13279 :
13280 else
13281 # We have old collect2
13282 hardcode_direct_CXX=unsupported
13283 # It fails to find uninstalled libraries when the uninstalled
13284 # path is not listed in the libpath. Setting hardcode_minus_L
13285 # to unsupported forces relinking
13286 hardcode_minus_L_CXX=yes
13287 hardcode_libdir_flag_spec_CXX='-L$libdir'
13288 hardcode_libdir_separator_CXX=
13289 fi
13290 esac
13291 shared_flag='-shared'
13292 if test yes = "$aix_use_runtimelinking"; then
13293 shared_flag=$shared_flag' $wl-G'
13294 fi
13295 # Need to ensure runtime linking is disabled for the traditional
13296 # shared library, or the linker may eventually find shared libraries
13297 # /with/ Import File - we do not want to mix them.
13298 shared_flag_aix='-shared'
13299 shared_flag_svr4='-shared $wl-G'
13300 else
13301 # not using gcc
13302 if test ia64 = "$host_cpu"; then
13303 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
13304 # chokes on -Wl,-G. The following line is correct:
13305 shared_flag='-G'
13306 else
13307 if test yes = "$aix_use_runtimelinking"; then
13308 shared_flag='$wl-G'
13309 else
13310 shared_flag='$wl-bM:SRE'
13311 fi
13312 shared_flag_aix='$wl-bM:SRE'
13313 shared_flag_svr4='$wl-G'
13314 fi
13315 fi
13316
13317 export_dynamic_flag_spec_CXX='$wl-bexpall'
13318 # It seems that -bexpall does not export symbols beginning with
13319 # underscore (_), so it is better to generate a list of symbols to
13320 # export.
13321 always_export_symbols_CXX=yes
13322 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
13323 # Warning - without using the other runtime loading flags (-brtl),
13324 # -berok will link without error, but may produce a broken library.
13325 # The "-G" linker flag allows undefined symbols.
13326 no_undefined_flag_CXX='-bernotok'
13327 # Determine the default libpath from the value encoded in an empty
13328 # executable.
13329 if test set = "${lt_cv_aix_libpath+set}"; then
13330 aix_libpath=$lt_cv_aix_libpath
13331 else
13332 if ${lt_cv_aix_libpath__CXX+:} false; then :
13333 $as_echo_n "(cached) " >&6
13334 else
13335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13336 /* end confdefs.h. */
13337
13338 int
13339 main ()
13340 {
13341
13342 ;
13343 return 0;
13344 }
13345 _ACEOF
13346 if ac_fn_cxx_try_link "$LINENO"; then :
13347
13348 lt_aix_libpath_sed='
13349 /Import File Strings/,/^$/ {
13350 /^0/ {
13351 s/^0 *\([^ ]*\) *$/\1/
13352 p
13353 }
13354 }'
13355 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13356 # Check for a 64-bit object if we didn't find anything.
13357 if test -z "$lt_cv_aix_libpath__CXX"; then
13358 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13359 fi
13360 fi
13361 rm -f core conftest.err conftest.$ac_objext \
13362 conftest$ac_exeext conftest.$ac_ext
13363 if test -z "$lt_cv_aix_libpath__CXX"; then
13364 lt_cv_aix_libpath__CXX=/usr/lib:/lib
13365 fi
13366
13367 fi
13368
13369 aix_libpath=$lt_cv_aix_libpath__CXX
13370 fi
13371
13372 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
13373
13374 archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
13375 else
13376 if test ia64 = "$host_cpu"; then
13377 hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
13378 allow_undefined_flag_CXX="-z nodefs"
13379 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
13380 else
13381 # Determine the default libpath from the value encoded in an
13382 # empty executable.
13383 if test set = "${lt_cv_aix_libpath+set}"; then
13384 aix_libpath=$lt_cv_aix_libpath
13385 else
13386 if ${lt_cv_aix_libpath__CXX+:} false; then :
13387 $as_echo_n "(cached) " >&6
13388 else
13389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13390 /* end confdefs.h. */
13391
13392 int
13393 main ()
13394 {
13395
13396 ;
13397 return 0;
13398 }
13399 _ACEOF
13400 if ac_fn_cxx_try_link "$LINENO"; then :
13401
13402 lt_aix_libpath_sed='
13403 /Import File Strings/,/^$/ {
13404 /^0/ {
13405 s/^0 *\([^ ]*\) *$/\1/
13406 p
13407 }
13408 }'
13409 lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13410 # Check for a 64-bit object if we didn't find anything.
13411 if test -z "$lt_cv_aix_libpath__CXX"; then
13412 lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
13413 fi
13414 fi
13415 rm -f core conftest.err conftest.$ac_objext \
13416 conftest$ac_exeext conftest.$ac_ext
13417 if test -z "$lt_cv_aix_libpath__CXX"; then
13418 lt_cv_aix_libpath__CXX=/usr/lib:/lib
13419 fi
13420
13421 fi
13422
13423 aix_libpath=$lt_cv_aix_libpath__CXX
13424 fi
13425
13426 hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
13427 # Warning - without using the other run time loading flags,
13428 # -berok will link without error, but may produce a broken library.
13429 no_undefined_flag_CXX=' $wl-bernotok'
13430 allow_undefined_flag_CXX=' $wl-berok'
13431 if test yes = "$with_gnu_ld"; then
13432 # We only use this code for GNU lds that support --whole-archive.
13433 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
13434 else
13435 # Exported symbols can be pulled into shared objects from archives
13436 whole_archive_flag_spec_CXX='$convenience'
13437 fi
13438 archive_cmds_need_lc_CXX=yes
13439 archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
13440 # -brtl affects multiple linker settings, -berok does not and is overridden later
13441 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
13442 if test svr4 != "$with_aix_soname"; then
13443 # This is similar to how AIX traditionally builds its shared
13444 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
13445 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
13446 fi
13447 if test aix != "$with_aix_soname"; then
13448 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
13449 else
13450 # used by -dlpreopen to get the symbols
13451 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
13452 fi
13453 archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
13454 fi
13455 fi
13456 ;;
13457
13458 beos*)
13459 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
13460 allow_undefined_flag_CXX=unsupported
13461 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
13462 # support --undefined. This deserves some investigation. FIXME
13463 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13464 else
13465 ld_shlibs_CXX=no
13466 fi
13467 ;;
13468
13469 chorus*)
13470 case $cc_basename in
13471 *)
13472 # FIXME: insert proper C++ library support
13473 ld_shlibs_CXX=no
13474 ;;
13475 esac
13476 ;;
13477
13478 cygwin* | mingw* | pw32* | cegcc*)
13479 case $GXX,$cc_basename in
13480 ,cl* | no,cl*)
13481 # Native MSVC
13482 # hardcode_libdir_flag_spec is actually meaningless, as there is
13483 # no search path for DLLs.
13484 hardcode_libdir_flag_spec_CXX=' '
13485 allow_undefined_flag_CXX=unsupported
13486 always_export_symbols_CXX=yes
13487 file_list_spec_CXX='@'
13488 # Tell ltmain to make .lib files, not .a files.
13489 libext=lib
13490 # Tell ltmain to make .dll files, not .so files.
13491 shrext_cmds=.dll
13492 # FIXME: Setting linknames here is a bad hack.
13493 archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
13494 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
13495 cp "$export_symbols" "$output_objdir/$soname.def";
13496 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
13497 else
13498 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
13499 fi~
13500 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
13501 linknames='
13502 # The linker will not automatically build a static lib if we build a DLL.
13503 # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
13504 enable_shared_with_static_runtimes_CXX=yes
13505 # Don't use ranlib
13506 old_postinstall_cmds_CXX='chmod 644 $oldlib'
13507 postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
13508 lt_tool_outputfile="@TOOL_OUTPUT@"~
13509 case $lt_outputfile in
13510 *.exe|*.EXE) ;;
13511 *)
13512 lt_outputfile=$lt_outputfile.exe
13513 lt_tool_outputfile=$lt_tool_outputfile.exe
13514 ;;
13515 esac~
13516 func_to_tool_file "$lt_outputfile"~
13517 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
13518 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
13519 $RM "$lt_outputfile.manifest";
13520 fi'
13521 ;;
13522 *)
13523 # g++
13524 # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
13525 # as there is no search path for DLLs.
13526 hardcode_libdir_flag_spec_CXX='-L$libdir'
13527 export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
13528 allow_undefined_flag_CXX=unsupported
13529 always_export_symbols_CXX=no
13530 enable_shared_with_static_runtimes_CXX=yes
13531
13532 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
13533 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13534 # If the export-symbols file already is a .def file, use it as
13535 # is; otherwise, prepend EXPORTS...
13536 archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
13537 cp $export_symbols $output_objdir/$soname.def;
13538 else
13539 echo EXPORTS > $output_objdir/$soname.def;
13540 cat $export_symbols >> $output_objdir/$soname.def;
13541 fi~
13542 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
13543 else
13544 ld_shlibs_CXX=no
13545 fi
13546 ;;
13547 esac
13548 ;;
13549 darwin* | rhapsody*)
13550
13551
13552 archive_cmds_need_lc_CXX=no
13553 hardcode_direct_CXX=no
13554 hardcode_automatic_CXX=yes
13555 hardcode_shlibpath_var_CXX=unsupported
13556 if test yes = "$lt_cv_ld_force_load"; then
13557 whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
13558
13559 else
13560 whole_archive_flag_spec_CXX=''
13561 fi
13562 link_all_deplibs_CXX=yes
13563 allow_undefined_flag_CXX=$_lt_dar_allow_undefined
13564 case $cc_basename in
13565 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
13566 *) _lt_dar_can_shared=$GCC ;;
13567 esac
13568 if test yes = "$_lt_dar_can_shared"; then
13569 output_verbose_link_cmd=func_echo_all
13570 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
13571 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
13572 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
13573 module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
13574 if test yes != "$lt_cv_apple_cc_single_mod"; then
13575 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
13576 archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
13577 fi
13578
13579 else
13580 ld_shlibs_CXX=no
13581 fi
13582
13583 ;;
13584
13585 os2*)
13586 hardcode_libdir_flag_spec_CXX='-L$libdir'
13587 hardcode_minus_L_CXX=yes
13588 allow_undefined_flag_CXX=unsupported
13589 shrext_cmds=.dll
13590 archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13591 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13592 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13593 $ECHO EXPORTS >> $output_objdir/$libname.def~
13594 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
13595 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13596 emximp -o $lib $output_objdir/$libname.def'
13597 archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
13598 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
13599 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
13600 $ECHO EXPORTS >> $output_objdir/$libname.def~
13601 prefix_cmds="$SED"~
13602 if test EXPORTS = "`$SED 1q $export_symbols`"; then
13603 prefix_cmds="$prefix_cmds -e 1d";
13604 fi~
13605 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
13606 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
13607 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
13608 emximp -o $lib $output_objdir/$libname.def'
13609 old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
13610 enable_shared_with_static_runtimes_CXX=yes
13611 ;;
13612
13613 dgux*)
13614 case $cc_basename in
13615 ec++*)
13616 # FIXME: insert proper C++ library support
13617 ld_shlibs_CXX=no
13618 ;;
13619 ghcx*)
13620 # Green Hills C++ Compiler
13621 # FIXME: insert proper C++ library support
13622 ld_shlibs_CXX=no
13623 ;;
13624 *)
13625 # FIXME: insert proper C++ library support
13626 ld_shlibs_CXX=no
13627 ;;
13628 esac
13629 ;;
13630
13631 freebsd2.*)
13632 # C++ shared libraries reported to be fairly broken before
13633 # switch to ELF
13634 ld_shlibs_CXX=no
13635 ;;
13636
13637 freebsd-elf*)
13638 archive_cmds_need_lc_CXX=no
13639 ;;
13640
13641 freebsd* | dragonfly*)
13642 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
13643 # conventions
13644 ld_shlibs_CXX=yes
13645 ;;
13646
13647 haiku*)
13648 archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13649 link_all_deplibs_CXX=yes
13650 ;;
13651
13652 hpux9*)
13653 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
13654 hardcode_libdir_separator_CXX=:
13655 export_dynamic_flag_spec_CXX='$wl-E'
13656 hardcode_direct_CXX=yes
13657 hardcode_minus_L_CXX=yes # Not in the search PATH,
13658 # but as the default
13659 # location of the library.
13660
13661 case $cc_basename in
13662 CC*)
13663 # FIXME: insert proper C++ library support
13664 ld_shlibs_CXX=no
13665 ;;
13666 aCC*)
13667 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
13668 # Commands to make compiler produce verbose output that lists
13669 # what "hidden" libraries, object files and flags are used when
13670 # linking a shared library.
13671 #
13672 # There doesn't appear to be a way to prevent this compiler from
13673 # explicitly linking system object files so we need to strip them
13674 # from the output so that they don't get included in the library
13675 # dependencies.
13676 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
13677 ;;
13678 *)
13679 if test yes = "$GXX"; then
13680 archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
13681 else
13682 # FIXME: insert proper C++ library support
13683 ld_shlibs_CXX=no
13684 fi
13685 ;;
13686 esac
13687 ;;
13688
13689 hpux10*|hpux11*)
13690 if test no = "$with_gnu_ld"; then
13691 hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
13692 hardcode_libdir_separator_CXX=:
13693
13694 case $host_cpu in
13695 hppa*64*|ia64*)
13696 ;;
13697 *)
13698 export_dynamic_flag_spec_CXX='$wl-E'
13699 ;;
13700 esac
13701 fi
13702 case $host_cpu in
13703 hppa*64*|ia64*)
13704 hardcode_direct_CXX=no
13705 hardcode_shlibpath_var_CXX=no
13706 ;;
13707 *)
13708 hardcode_direct_CXX=yes
13709 hardcode_direct_absolute_CXX=yes
13710 hardcode_minus_L_CXX=yes # Not in the search PATH,
13711 # but as the default
13712 # location of the library.
13713 ;;
13714 esac
13715
13716 case $cc_basename in
13717 CC*)
13718 # FIXME: insert proper C++ library support
13719 ld_shlibs_CXX=no
13720 ;;
13721 aCC*)
13722 case $host_cpu in
13723 hppa*64*)
13724 archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13725 ;;
13726 ia64*)
13727 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13728 ;;
13729 *)
13730 archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13731 ;;
13732 esac
13733 # Commands to make compiler produce verbose output that lists
13734 # what "hidden" libraries, object files and flags are used when
13735 # linking a shared library.
13736 #
13737 # There doesn't appear to be a way to prevent this compiler from
13738 # explicitly linking system object files so we need to strip them
13739 # from the output so that they don't get included in the library
13740 # dependencies.
13741 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
13742 ;;
13743 *)
13744 if test yes = "$GXX"; then
13745 if test no = "$with_gnu_ld"; then
13746 case $host_cpu in
13747 hppa*64*)
13748 archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13749 ;;
13750 ia64*)
13751 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13752 ;;
13753 *)
13754 archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13755 ;;
13756 esac
13757 fi
13758 else
13759 # FIXME: insert proper C++ library support
13760 ld_shlibs_CXX=no
13761 fi
13762 ;;
13763 esac
13764 ;;
13765
13766 interix[3-9]*)
13767 hardcode_direct_CXX=no
13768 hardcode_shlibpath_var_CXX=no
13769 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
13770 export_dynamic_flag_spec_CXX='$wl-E'
13771 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
13772 # Instead, shared libraries are loaded at an image base (0x10000000 by
13773 # default) and relocated if they conflict, which is a slow very memory
13774 # consuming and fragmenting process. To avoid this, we pick a random,
13775 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
13776 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
13777 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13778 archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
13779 ;;
13780 irix5* | irix6*)
13781 case $cc_basename in
13782 CC*)
13783 # SGI C++
13784 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
13785
13786 # Archives containing C++ object files must be created using
13787 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
13788 # necessary to make sure instantiated templates are included
13789 # in the archive.
13790 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
13791 ;;
13792 *)
13793 if test yes = "$GXX"; then
13794 if test no = "$with_gnu_ld"; then
13795 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
13796 else
13797 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
13798 fi
13799 fi
13800 link_all_deplibs_CXX=yes
13801 ;;
13802 esac
13803 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
13804 hardcode_libdir_separator_CXX=:
13805 inherit_rpath_CXX=yes
13806 ;;
13807
13808 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13809 case $cc_basename in
13810 KCC*)
13811 # Kuck and Associates, Inc. (KAI) C++ Compiler
13812
13813 # KCC will only create a shared library if the output file
13814 # ends with ".so" (or ".sl" for HP-UX), so rename the library
13815 # to its proper name (with version) after linking.
13816 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
13817 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
13818 # Commands to make compiler produce verbose output that lists
13819 # what "hidden" libraries, object files and flags are used when
13820 # linking a shared library.
13821 #
13822 # There doesn't appear to be a way to prevent this compiler from
13823 # explicitly linking system object files so we need to strip them
13824 # from the output so that they don't get included in the library
13825 # dependencies.
13826 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
13827
13828 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
13829 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13830
13831 # Archives containing C++ object files must be created using
13832 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
13833 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
13834 ;;
13835 icpc* | ecpc* )
13836 # Intel C++
13837 with_gnu_ld=yes
13838 # version 8.0 and above of icpc choke on multiply defined symbols
13839 # if we add $predep_objects and $postdep_objects, however 7.1 and
13840 # earlier do not add the objects themselves.
13841 case `$CC -V 2>&1` in
13842 *"Version 7."*)
13843 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13844 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13845 ;;
13846 *) # Version 8.0 or newer
13847 tmp_idyn=
13848 case $host_cpu in
13849 ia64*) tmp_idyn=' -i_dynamic';;
13850 esac
13851 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13852 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13853 ;;
13854 esac
13855 archive_cmds_need_lc_CXX=no
13856 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
13857 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13858 whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
13859 ;;
13860 pgCC* | pgcpp*)
13861 # Portland Group C++ compiler
13862 case `$CC -V` in
13863 *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
13864 prelink_cmds_CXX='tpldir=Template.dir~
13865 rm -rf $tpldir~
13866 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
13867 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
13868 old_archive_cmds_CXX='tpldir=Template.dir~
13869 rm -rf $tpldir~
13870 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
13871 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
13872 $RANLIB $oldlib'
13873 archive_cmds_CXX='tpldir=Template.dir~
13874 rm -rf $tpldir~
13875 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
13876 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13877 archive_expsym_cmds_CXX='tpldir=Template.dir~
13878 rm -rf $tpldir~
13879 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
13880 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13881 ;;
13882 *) # Version 6 and above use weak symbols
13883 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13884 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
13885 ;;
13886 esac
13887
13888 hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
13889 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13890 whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13891 ;;
13892 cxx*)
13893 # Compaq C++
13894 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
13895 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
13896
13897 runpath_var=LD_RUN_PATH
13898 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
13899 hardcode_libdir_separator_CXX=:
13900
13901 # Commands to make compiler produce verbose output that lists
13902 # what "hidden" libraries, object files and flags are used when
13903 # linking a shared library.
13904 #
13905 # There doesn't appear to be a way to prevent this compiler from
13906 # explicitly linking system object files so we need to strip them
13907 # from the output so that they don't get included in the library
13908 # dependencies.
13909 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
13910 ;;
13911 xl* | mpixl* | bgxl*)
13912 # IBM XL 8.0 on PPC, with GNU ld
13913 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
13914 export_dynamic_flag_spec_CXX='$wl--export-dynamic'
13915 archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
13916 if test yes = "$supports_anon_versioning"; then
13917 archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
13918 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
13919 echo "local: *; };" >> $output_objdir/$libname.ver~
13920 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
13921 fi
13922 ;;
13923 *)
13924 case `$CC -V 2>&1 | sed 5q` in
13925 *Sun\ C*)
13926 # Sun C++ 5.9
13927 no_undefined_flag_CXX=' -zdefs'
13928 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
13929 archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
13930 hardcode_libdir_flag_spec_CXX='-R$libdir'
13931 whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
13932 compiler_needs_object_CXX=yes
13933
13934 # Not sure whether something based on
13935 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
13936 # would be better.
13937 output_verbose_link_cmd='func_echo_all'
13938
13939 # Archives containing C++ object files must be created using
13940 # "CC -xar", where "CC" is the Sun C++ compiler. This is
13941 # necessary to make sure instantiated templates are included
13942 # in the archive.
13943 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
13944 ;;
13945 esac
13946 ;;
13947 esac
13948 ;;
13949
13950 lynxos*)
13951 # FIXME: insert proper C++ library support
13952 ld_shlibs_CXX=no
13953 ;;
13954
13955 m88k*)
13956 # FIXME: insert proper C++ library support
13957 ld_shlibs_CXX=no
13958 ;;
13959
13960 mvs*)
13961 case $cc_basename in
13962 cxx*)
13963 # FIXME: insert proper C++ library support
13964 ld_shlibs_CXX=no
13965 ;;
13966 *)
13967 # FIXME: insert proper C++ library support
13968 ld_shlibs_CXX=no
13969 ;;
13970 esac
13971 ;;
13972
13973 netbsd*)
13974 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13975 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
13976 wlarc=
13977 hardcode_libdir_flag_spec_CXX='-R$libdir'
13978 hardcode_direct_CXX=yes
13979 hardcode_shlibpath_var_CXX=no
13980 fi
13981 # Workaround some broken pre-1.5 toolchains
13982 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
13983 ;;
13984
13985 *nto* | *qnx*)
13986 ld_shlibs_CXX=yes
13987 ;;
13988
13989 openbsd* | bitrig*)
13990 if test -f /usr/libexec/ld.so; then
13991 hardcode_direct_CXX=yes
13992 hardcode_shlibpath_var_CXX=no
13993 hardcode_direct_absolute_CXX=yes
13994 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
13995 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
13996 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
13997 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
13998 export_dynamic_flag_spec_CXX='$wl-E'
13999 whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
14000 fi
14001 output_verbose_link_cmd=func_echo_all
14002 else
14003 ld_shlibs_CXX=no
14004 fi
14005 ;;
14006
14007 osf3* | osf4* | osf5*)
14008 case $cc_basename in
14009 KCC*)
14010 # Kuck and Associates, Inc. (KAI) C++ Compiler
14011
14012 # KCC will only create a shared library if the output file
14013 # ends with ".so" (or ".sl" for HP-UX), so rename the library
14014 # to its proper name (with version) after linking.
14015 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
14016
14017 hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
14018 hardcode_libdir_separator_CXX=:
14019
14020 # Archives containing C++ object files must be created using
14021 # the KAI C++ compiler.
14022 case $host in
14023 osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
14024 *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
14025 esac
14026 ;;
14027 RCC*)
14028 # Rational C++ 2.4.1
14029 # FIXME: insert proper C++ library support
14030 ld_shlibs_CXX=no
14031 ;;
14032 cxx*)
14033 case $host in
14034 osf3*)
14035 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
14036 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14037 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14038 ;;
14039 *)
14040 allow_undefined_flag_CXX=' -expect_unresolved \*'
14041 archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
14042 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
14043 echo "-hidden">> $lib.exp~
14044 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
14045 $RM $lib.exp'
14046 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
14047 ;;
14048 esac
14049
14050 hardcode_libdir_separator_CXX=:
14051
14052 # Commands to make compiler produce verbose output that lists
14053 # what "hidden" libraries, object files and flags are used when
14054 # linking a shared library.
14055 #
14056 # There doesn't appear to be a way to prevent this compiler from
14057 # explicitly linking system object files so we need to strip them
14058 # from the output so that they don't get included in the library
14059 # dependencies.
14060 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
14061 ;;
14062 *)
14063 if test yes,no = "$GXX,$with_gnu_ld"; then
14064 allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
14065 case $host in
14066 osf3*)
14067 archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14068 ;;
14069 *)
14070 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
14071 ;;
14072 esac
14073
14074 hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
14075 hardcode_libdir_separator_CXX=:
14076
14077 # Commands to make compiler produce verbose output that lists
14078 # what "hidden" libraries, object files and flags are used when
14079 # linking a shared library.
14080 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
14081
14082 else
14083 # FIXME: insert proper C++ library support
14084 ld_shlibs_CXX=no
14085 fi
14086 ;;
14087 esac
14088 ;;
14089
14090 psos*)
14091 # FIXME: insert proper C++ library support
14092 ld_shlibs_CXX=no
14093 ;;
14094
14095 sunos4*)
14096 case $cc_basename in
14097 CC*)
14098 # Sun C++ 4.x
14099 # FIXME: insert proper C++ library support
14100 ld_shlibs_CXX=no
14101 ;;
14102 lcc*)
14103 # Lucid
14104 # FIXME: insert proper C++ library support
14105 ld_shlibs_CXX=no
14106 ;;
14107 *)
14108 # FIXME: insert proper C++ library support
14109 ld_shlibs_CXX=no
14110 ;;
14111 esac
14112 ;;
14113
14114 solaris*)
14115 case $cc_basename in
14116 CC* | sunCC*)
14117 # Sun C++ 4.2, 5.x and Centerline C++
14118 archive_cmds_need_lc_CXX=yes
14119 no_undefined_flag_CXX=' -zdefs'
14120 archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
14121 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14122 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
14123
14124 hardcode_libdir_flag_spec_CXX='-R$libdir'
14125 hardcode_shlibpath_var_CXX=no
14126 case $host_os in
14127 solaris2.[0-5] | solaris2.[0-5].*) ;;
14128 *)
14129 # The compiler driver will combine and reorder linker options,
14130 # but understands '-z linker_flag'.
14131 # Supported since Solaris 2.6 (maybe 2.5.1?)
14132 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
14133 ;;
14134 esac
14135 link_all_deplibs_CXX=yes
14136
14137 output_verbose_link_cmd='func_echo_all'
14138
14139 # Archives containing C++ object files must be created using
14140 # "CC -xar", where "CC" is the Sun C++ compiler. This is
14141 # necessary to make sure instantiated templates are included
14142 # in the archive.
14143 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
14144 ;;
14145 gcx*)
14146 # Green Hills C++ Compiler
14147 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
14148
14149 # The C++ compiler must be used to create the archive.
14150 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
14151 ;;
14152 *)
14153 # GNU C++ compiler with Solaris linker
14154 if test yes,no = "$GXX,$with_gnu_ld"; then
14155 no_undefined_flag_CXX=' $wl-z ${wl}defs'
14156 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
14157 archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
14158 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14159 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
14160
14161 # Commands to make compiler produce verbose output that lists
14162 # what "hidden" libraries, object files and flags are used when
14163 # linking a shared library.
14164 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
14165 else
14166 # g++ 2.7 appears to require '-G' NOT '-shared' on this
14167 # platform.
14168 archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
14169 archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
14170 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
14171
14172 # Commands to make compiler produce verbose output that lists
14173 # what "hidden" libraries, object files and flags are used when
14174 # linking a shared library.
14175 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
14176 fi
14177
14178 hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
14179 case $host_os in
14180 solaris2.[0-5] | solaris2.[0-5].*) ;;
14181 *)
14182 whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
14183 ;;
14184 esac
14185 fi
14186 ;;
14187 esac
14188 ;;
14189
14190 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
14191 no_undefined_flag_CXX='$wl-z,text'
14192 archive_cmds_need_lc_CXX=no
14193 hardcode_shlibpath_var_CXX=no
14194 runpath_var='LD_RUN_PATH'
14195
14196 case $cc_basename in
14197 CC*)
14198 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14199 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14200 ;;
14201 *)
14202 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14203 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14204 ;;
14205 esac
14206 ;;
14207
14208 sysv5* | sco3.2v5* | sco5v6*)
14209 # Note: We CANNOT use -z defs as we might desire, because we do not
14210 # link with -lc, and that would cause any symbols used from libc to
14211 # always be unresolved, which means just about no library would
14212 # ever link correctly. If we're not using GNU ld we use -z text
14213 # though, which does catch some bad symbols but isn't as heavy-handed
14214 # as -z defs.
14215 no_undefined_flag_CXX='$wl-z,text'
14216 allow_undefined_flag_CXX='$wl-z,nodefs'
14217 archive_cmds_need_lc_CXX=no
14218 hardcode_shlibpath_var_CXX=no
14219 hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
14220 hardcode_libdir_separator_CXX=':'
14221 link_all_deplibs_CXX=yes
14222 export_dynamic_flag_spec_CXX='$wl-Bexport'
14223 runpath_var='LD_RUN_PATH'
14224
14225 case $cc_basename in
14226 CC*)
14227 archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14228 archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14229 old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
14230 '"$old_archive_cmds_CXX"
14231 reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
14232 '"$reload_cmds_CXX"
14233 ;;
14234 *)
14235 archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14236 archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
14237 ;;
14238 esac
14239 ;;
14240
14241 tandem*)
14242 case $cc_basename in
14243 NCC*)
14244 # NonStop-UX NCC 3.20
14245 # FIXME: insert proper C++ library support
14246 ld_shlibs_CXX=no
14247 ;;
14248 *)
14249 # FIXME: insert proper C++ library support
14250 ld_shlibs_CXX=no
14251 ;;
14252 esac
14253 ;;
14254
14255 vxworks*)
14256 # FIXME: insert proper C++ library support
14257 ld_shlibs_CXX=no
14258 ;;
14259
14260 *)
14261 # FIXME: insert proper C++ library support
14262 ld_shlibs_CXX=no
14263 ;;
14264 esac
14265
14266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
14267 $as_echo "$ld_shlibs_CXX" >&6; }
14268 test no = "$ld_shlibs_CXX" && can_build_shared=no
14269
14270 GCC_CXX=$GXX
14271 LD_CXX=$LD
14272
14273 ## CAVEAT EMPTOR:
14274 ## There is no encapsulation within the following macros, do not change
14275 ## the running order or otherwise move them around unless you know exactly
14276 ## what you are doing...
14277 # Dependencies to place before and after the object being linked:
14278 predep_objects_CXX=
14279 postdep_objects_CXX=
14280 predeps_CXX=
14281 postdeps_CXX=
14282 compiler_lib_search_path_CXX=
14283
14284 cat > conftest.$ac_ext <<_LT_EOF
14285 class Foo
14286 {
14287 public:
14288 Foo (void) { a = 0; }
14289 private:
14290 int a;
14291 };
14292 _LT_EOF
14293
14294
14295 _lt_libdeps_save_CFLAGS=$CFLAGS
14296 case "$CC $CFLAGS " in #(
14297 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
14298 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
14299 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
14300 esac
14301
14302 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14303 (eval $ac_compile) 2>&5
14304 ac_status=$?
14305 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14306 test $ac_status = 0; }; then
14307 # Parse the compiler output and extract the necessary
14308 # objects, libraries and library flags.
14309
14310 # Sentinel used to keep track of whether or not we are before
14311 # the conftest object file.
14312 pre_test_object_deps_done=no
14313
14314 for p in `eval "$output_verbose_link_cmd"`; do
14315 case $prev$p in
14316
14317 -L* | -R* | -l*)
14318 # Some compilers place space between "-{L,R}" and the path.
14319 # Remove the space.
14320 if test x-L = "$p" ||
14321 test x-R = "$p"; then
14322 prev=$p
14323 continue
14324 fi
14325
14326 # Expand the sysroot to ease extracting the directories later.
14327 if test -z "$prev"; then
14328 case $p in
14329 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
14330 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
14331 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
14332 esac
14333 fi
14334 case $p in
14335 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
14336 esac
14337 if test no = "$pre_test_object_deps_done"; then
14338 case $prev in
14339 -L | -R)
14340 # Internal compiler library paths should come after those
14341 # provided the user. The postdeps already come after the
14342 # user supplied libs so there is no need to process them.
14343 if test -z "$compiler_lib_search_path_CXX"; then
14344 compiler_lib_search_path_CXX=$prev$p
14345 else
14346 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
14347 fi
14348 ;;
14349 # The "-l" case would never come before the object being
14350 # linked, so don't bother handling this case.
14351 esac
14352 else
14353 if test -z "$postdeps_CXX"; then
14354 postdeps_CXX=$prev$p
14355 else
14356 postdeps_CXX="${postdeps_CXX} $prev$p"
14357 fi
14358 fi
14359 prev=
14360 ;;
14361
14362 *.lto.$objext) ;; # Ignore GCC LTO objects
14363 *.$objext)
14364 # This assumes that the test object file only shows up
14365 # once in the compiler output.
14366 if test "$p" = "conftest.$objext"; then
14367 pre_test_object_deps_done=yes
14368 continue
14369 fi
14370
14371 if test no = "$pre_test_object_deps_done"; then
14372 if test -z "$predep_objects_CXX"; then
14373 predep_objects_CXX=$p
14374 else
14375 predep_objects_CXX="$predep_objects_CXX $p"
14376 fi
14377 else
14378 if test -z "$postdep_objects_CXX"; then
14379 postdep_objects_CXX=$p
14380 else
14381 postdep_objects_CXX="$postdep_objects_CXX $p"
14382 fi
14383 fi
14384 ;;
14385
14386 *) ;; # Ignore the rest.
14387
14388 esac
14389 done
14390
14391 # Clean up.
14392 rm -f a.out a.exe
14393 else
14394 echo "libtool.m4: error: problem compiling CXX test program"
14395 fi
14396
14397 $RM -f confest.$objext
14398 CFLAGS=$_lt_libdeps_save_CFLAGS
14399
14400 # PORTME: override above test on systems where it is broken
14401 case $host_os in
14402 interix[3-9]*)
14403 # Interix 3.5 installs completely hosed .la files for C++, so rather than
14404 # hack all around it, let's just trust "g++" to DTRT.
14405 predep_objects_CXX=
14406 postdep_objects_CXX=
14407 postdeps_CXX=
14408 ;;
14409 esac
14410
14411
14412 case " $postdeps_CXX " in
14413 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
14414 esac
14415 compiler_lib_search_dirs_CXX=
14416 if test -n "${compiler_lib_search_path_CXX}"; then
14417 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
14418 fi
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450 lt_prog_compiler_wl_CXX=
14451 lt_prog_compiler_pic_CXX=
14452 lt_prog_compiler_static_CXX=
14453
14454
14455 # C++ specific cases for pic, static, wl, etc.
14456 if test yes = "$GXX"; then
14457 lt_prog_compiler_wl_CXX='-Wl,'
14458 lt_prog_compiler_static_CXX='-static'
14459
14460 case $host_os in
14461 aix*)
14462 # All AIX code is PIC.
14463 if test ia64 = "$host_cpu"; then
14464 # AIX 5 now supports IA64 processor
14465 lt_prog_compiler_static_CXX='-Bstatic'
14466 fi
14467 lt_prog_compiler_pic_CXX='-fPIC'
14468 ;;
14469
14470 amigaos*)
14471 case $host_cpu in
14472 powerpc)
14473 # see comment about AmigaOS4 .so support
14474 lt_prog_compiler_pic_CXX='-fPIC'
14475 ;;
14476 m68k)
14477 # FIXME: we need at least 68020 code to build shared libraries, but
14478 # adding the '-m68020' flag to GCC prevents building anything better,
14479 # like '-m68040'.
14480 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
14481 ;;
14482 esac
14483 ;;
14484
14485 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
14486 # PIC is the default for these OSes.
14487 ;;
14488 mingw* | cygwin* | os2* | pw32* | cegcc*)
14489 # This hack is so that the source file can tell whether it is being
14490 # built for inclusion in a dll (and should export symbols for example).
14491 # Although the cygwin gcc ignores -fPIC, still need this for old-style
14492 # (--disable-auto-import) libraries
14493 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
14494 case $host_os in
14495 os2*)
14496 lt_prog_compiler_static_CXX='$wl-static'
14497 ;;
14498 esac
14499 ;;
14500 darwin* | rhapsody*)
14501 # PIC is the default on this platform
14502 # Common symbols not allowed in MH_DYLIB files
14503 lt_prog_compiler_pic_CXX='-fno-common'
14504 ;;
14505 *djgpp*)
14506 # DJGPP does not support shared libraries at all
14507 lt_prog_compiler_pic_CXX=
14508 ;;
14509 haiku*)
14510 # PIC is the default for Haiku.
14511 # The "-static" flag exists, but is broken.
14512 lt_prog_compiler_static_CXX=
14513 ;;
14514 interix[3-9]*)
14515 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
14516 # Instead, we relocate shared libraries at runtime.
14517 ;;
14518 sysv4*MP*)
14519 if test -d /usr/nec; then
14520 lt_prog_compiler_pic_CXX=-Kconform_pic
14521 fi
14522 ;;
14523 hpux*)
14524 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
14525 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
14526 # sets the default TLS model and affects inlining.
14527 case $host_cpu in
14528 hppa*64*)
14529 ;;
14530 *)
14531 lt_prog_compiler_pic_CXX='-fPIC'
14532 ;;
14533 esac
14534 ;;
14535 *qnx* | *nto*)
14536 # QNX uses GNU C++, but need to define -shared option too, otherwise
14537 # it will coredump.
14538 lt_prog_compiler_pic_CXX='-fPIC -shared'
14539 ;;
14540 *)
14541 lt_prog_compiler_pic_CXX='-fPIC'
14542 ;;
14543 esac
14544 else
14545 case $host_os in
14546 aix[4-9]*)
14547 # All AIX code is PIC.
14548 if test ia64 = "$host_cpu"; then
14549 # AIX 5 now supports IA64 processor
14550 lt_prog_compiler_static_CXX='-Bstatic'
14551 else
14552 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
14553 fi
14554 ;;
14555 chorus*)
14556 case $cc_basename in
14557 cxch68*)
14558 # Green Hills C++ Compiler
14559 # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
14560 ;;
14561 esac
14562 ;;
14563 mingw* | cygwin* | os2* | pw32* | cegcc*)
14564 # This hack is so that the source file can tell whether it is being
14565 # built for inclusion in a dll (and should export symbols for example).
14566 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
14567 ;;
14568 dgux*)
14569 case $cc_basename in
14570 ec++*)
14571 lt_prog_compiler_pic_CXX='-KPIC'
14572 ;;
14573 ghcx*)
14574 # Green Hills C++ Compiler
14575 lt_prog_compiler_pic_CXX='-pic'
14576 ;;
14577 *)
14578 ;;
14579 esac
14580 ;;
14581 freebsd* | dragonfly*)
14582 # FreeBSD uses GNU C++
14583 ;;
14584 hpux9* | hpux10* | hpux11*)
14585 case $cc_basename in
14586 CC*)
14587 lt_prog_compiler_wl_CXX='-Wl,'
14588 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
14589 if test ia64 != "$host_cpu"; then
14590 lt_prog_compiler_pic_CXX='+Z'
14591 fi
14592 ;;
14593 aCC*)
14594 lt_prog_compiler_wl_CXX='-Wl,'
14595 lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
14596 case $host_cpu in
14597 hppa*64*|ia64*)
14598 # +Z the default
14599 ;;
14600 *)
14601 lt_prog_compiler_pic_CXX='+Z'
14602 ;;
14603 esac
14604 ;;
14605 *)
14606 ;;
14607 esac
14608 ;;
14609 interix*)
14610 # This is c89, which is MS Visual C++ (no shared libs)
14611 # Anyone wants to do a port?
14612 ;;
14613 irix5* | irix6* | nonstopux*)
14614 case $cc_basename in
14615 CC*)
14616 lt_prog_compiler_wl_CXX='-Wl,'
14617 lt_prog_compiler_static_CXX='-non_shared'
14618 # CC pic flag -KPIC is the default.
14619 ;;
14620 *)
14621 ;;
14622 esac
14623 ;;
14624 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
14625 case $cc_basename in
14626 KCC*)
14627 # KAI C++ Compiler
14628 lt_prog_compiler_wl_CXX='--backend -Wl,'
14629 lt_prog_compiler_pic_CXX='-fPIC'
14630 ;;
14631 ecpc* )
14632 # old Intel C++ for x86_64, which still supported -KPIC.
14633 lt_prog_compiler_wl_CXX='-Wl,'
14634 lt_prog_compiler_pic_CXX='-KPIC'
14635 lt_prog_compiler_static_CXX='-static'
14636 ;;
14637 icpc* )
14638 # Intel C++, used to be incompatible with GCC.
14639 # ICC 10 doesn't accept -KPIC any more.
14640 lt_prog_compiler_wl_CXX='-Wl,'
14641 lt_prog_compiler_pic_CXX='-fPIC'
14642 lt_prog_compiler_static_CXX='-static'
14643 ;;
14644 pgCC* | pgcpp*)
14645 # Portland Group C++ compiler
14646 lt_prog_compiler_wl_CXX='-Wl,'
14647 lt_prog_compiler_pic_CXX='-fpic'
14648 lt_prog_compiler_static_CXX='-Bstatic'
14649 ;;
14650 cxx*)
14651 # Compaq C++
14652 # Make sure the PIC flag is empty. It appears that all Alpha
14653 # Linux and Compaq Tru64 Unix objects are PIC.
14654 lt_prog_compiler_pic_CXX=
14655 lt_prog_compiler_static_CXX='-non_shared'
14656 ;;
14657 xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
14658 # IBM XL 8.0, 9.0 on PPC and BlueGene
14659 lt_prog_compiler_wl_CXX='-Wl,'
14660 lt_prog_compiler_pic_CXX='-qpic'
14661 lt_prog_compiler_static_CXX='-qstaticlink'
14662 ;;
14663 *)
14664 case `$CC -V 2>&1 | sed 5q` in
14665 *Sun\ C*)
14666 # Sun C++ 5.9
14667 lt_prog_compiler_pic_CXX='-KPIC'
14668 lt_prog_compiler_static_CXX='-Bstatic'
14669 lt_prog_compiler_wl_CXX='-Qoption ld '
14670 ;;
14671 esac
14672 ;;
14673 esac
14674 ;;
14675 lynxos*)
14676 ;;
14677 m88k*)
14678 ;;
14679 mvs*)
14680 case $cc_basename in
14681 cxx*)
14682 lt_prog_compiler_pic_CXX='-W c,exportall'
14683 ;;
14684 *)
14685 ;;
14686 esac
14687 ;;
14688 netbsd* | netbsdelf*-gnu)
14689 ;;
14690 *qnx* | *nto*)
14691 # QNX uses GNU C++, but need to define -shared option too, otherwise
14692 # it will coredump.
14693 lt_prog_compiler_pic_CXX='-fPIC -shared'
14694 ;;
14695 osf3* | osf4* | osf5*)
14696 case $cc_basename in
14697 KCC*)
14698 lt_prog_compiler_wl_CXX='--backend -Wl,'
14699 ;;
14700 RCC*)
14701 # Rational C++ 2.4.1
14702 lt_prog_compiler_pic_CXX='-pic'
14703 ;;
14704 cxx*)
14705 # Digital/Compaq C++
14706 lt_prog_compiler_wl_CXX='-Wl,'
14707 # Make sure the PIC flag is empty. It appears that all Alpha
14708 # Linux and Compaq Tru64 Unix objects are PIC.
14709 lt_prog_compiler_pic_CXX=
14710 lt_prog_compiler_static_CXX='-non_shared'
14711 ;;
14712 *)
14713 ;;
14714 esac
14715 ;;
14716 psos*)
14717 ;;
14718 solaris*)
14719 case $cc_basename in
14720 CC* | sunCC*)
14721 # Sun C++ 4.2, 5.x and Centerline C++
14722 lt_prog_compiler_pic_CXX='-KPIC'
14723 lt_prog_compiler_static_CXX='-Bstatic'
14724 lt_prog_compiler_wl_CXX='-Qoption ld '
14725 ;;
14726 gcx*)
14727 # Green Hills C++ Compiler
14728 lt_prog_compiler_pic_CXX='-PIC'
14729 ;;
14730 *)
14731 ;;
14732 esac
14733 ;;
14734 sunos4*)
14735 case $cc_basename in
14736 CC*)
14737 # Sun C++ 4.x
14738 lt_prog_compiler_pic_CXX='-pic'
14739 lt_prog_compiler_static_CXX='-Bstatic'
14740 ;;
14741 lcc*)
14742 # Lucid
14743 lt_prog_compiler_pic_CXX='-pic'
14744 ;;
14745 *)
14746 ;;
14747 esac
14748 ;;
14749 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14750 case $cc_basename in
14751 CC*)
14752 lt_prog_compiler_wl_CXX='-Wl,'
14753 lt_prog_compiler_pic_CXX='-KPIC'
14754 lt_prog_compiler_static_CXX='-Bstatic'
14755 ;;
14756 esac
14757 ;;
14758 tandem*)
14759 case $cc_basename in
14760 NCC*)
14761 # NonStop-UX NCC 3.20
14762 lt_prog_compiler_pic_CXX='-KPIC'
14763 ;;
14764 *)
14765 ;;
14766 esac
14767 ;;
14768 vxworks*)
14769 ;;
14770 *)
14771 lt_prog_compiler_can_build_shared_CXX=no
14772 ;;
14773 esac
14774 fi
14775
14776 case $host_os in
14777 # For platforms that do not support PIC, -DPIC is meaningless:
14778 *djgpp*)
14779 lt_prog_compiler_pic_CXX=
14780 ;;
14781 *)
14782 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
14783 ;;
14784 esac
14785
14786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
14787 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
14788 if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
14789 $as_echo_n "(cached) " >&6
14790 else
14791 lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
14792 fi
14793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
14794 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
14795 lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
14796
14797 #
14798 # Check to make sure the PIC flag actually works.
14799 #
14800 if test -n "$lt_prog_compiler_pic_CXX"; then
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
14802 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
14803 if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
14804 $as_echo_n "(cached) " >&6
14805 else
14806 lt_cv_prog_compiler_pic_works_CXX=no
14807 ac_outfile=conftest.$ac_objext
14808 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14809 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
14810 # Insert the option either (1) after the last *FLAGS variable, or
14811 # (2) before a word containing "conftest.", or (3) at the end.
14812 # Note that $ac_compile itself does not contain backslashes and begins
14813 # with a dollar sign (not a hyphen), so the echo should work correctly.
14814 # The option is referenced via a variable to avoid confusing sed.
14815 lt_compile=`echo "$ac_compile" | $SED \
14816 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14817 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14818 -e 's:$: $lt_compiler_flag:'`
14819 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14820 (eval "$lt_compile" 2>conftest.err)
14821 ac_status=$?
14822 cat conftest.err >&5
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824 if (exit $ac_status) && test -s "$ac_outfile"; then
14825 # The compiler can only warn and ignore the option if not recognized
14826 # So say no if there are warnings other than the usual output.
14827 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
14828 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14829 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14830 lt_cv_prog_compiler_pic_works_CXX=yes
14831 fi
14832 fi
14833 $RM conftest*
14834
14835 fi
14836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
14837 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
14838
14839 if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
14840 case $lt_prog_compiler_pic_CXX in
14841 "" | " "*) ;;
14842 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
14843 esac
14844 else
14845 lt_prog_compiler_pic_CXX=
14846 lt_prog_compiler_can_build_shared_CXX=no
14847 fi
14848
14849 fi
14850
14851
14852
14853
14854
14855 #
14856 # Check to make sure the static flag actually works.
14857 #
14858 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
14859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14860 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
14861 if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
14862 $as_echo_n "(cached) " >&6
14863 else
14864 lt_cv_prog_compiler_static_works_CXX=no
14865 save_LDFLAGS=$LDFLAGS
14866 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14867 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14868 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14869 # The linker can only warn and ignore the option if not recognized
14870 # So say no if there are warnings
14871 if test -s conftest.err; then
14872 # Append any errors to the config.log.
14873 cat conftest.err 1>&5
14874 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
14875 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14876 if diff conftest.exp conftest.er2 >/dev/null; then
14877 lt_cv_prog_compiler_static_works_CXX=yes
14878 fi
14879 else
14880 lt_cv_prog_compiler_static_works_CXX=yes
14881 fi
14882 fi
14883 $RM -r conftest*
14884 LDFLAGS=$save_LDFLAGS
14885
14886 fi
14887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
14888 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
14889
14890 if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
14891 :
14892 else
14893 lt_prog_compiler_static_CXX=
14894 fi
14895
14896
14897
14898
14899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14900 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14901 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
14902 $as_echo_n "(cached) " >&6
14903 else
14904 lt_cv_prog_compiler_c_o_CXX=no
14905 $RM -r conftest 2>/dev/null
14906 mkdir conftest
14907 cd conftest
14908 mkdir out
14909 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14910
14911 lt_compiler_flag="-o out/conftest2.$ac_objext"
14912 # Insert the option either (1) after the last *FLAGS variable, or
14913 # (2) before a word containing "conftest.", or (3) at the end.
14914 # Note that $ac_compile itself does not contain backslashes and begins
14915 # with a dollar sign (not a hyphen), so the echo should work correctly.
14916 lt_compile=`echo "$ac_compile" | $SED \
14917 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14918 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14919 -e 's:$: $lt_compiler_flag:'`
14920 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14921 (eval "$lt_compile" 2>out/conftest.err)
14922 ac_status=$?
14923 cat out/conftest.err >&5
14924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14925 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14926 then
14927 # The compiler can only warn and ignore the option if not recognized
14928 # So say no if there are warnings
14929 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
14930 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14931 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14932 lt_cv_prog_compiler_c_o_CXX=yes
14933 fi
14934 fi
14935 chmod u+w . 2>&5
14936 $RM conftest*
14937 # SGI C++ compiler will create directory out/ii_files/ for
14938 # template instantiation
14939 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14940 $RM out/* && rmdir out
14941 cd ..
14942 $RM -r conftest
14943 $RM conftest*
14944
14945 fi
14946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
14947 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
14948
14949
14950
14951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
14952 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
14953 if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
14954 $as_echo_n "(cached) " >&6
14955 else
14956 lt_cv_prog_compiler_c_o_CXX=no
14957 $RM -r conftest 2>/dev/null
14958 mkdir conftest
14959 cd conftest
14960 mkdir out
14961 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14962
14963 lt_compiler_flag="-o out/conftest2.$ac_objext"
14964 # Insert the option either (1) after the last *FLAGS variable, or
14965 # (2) before a word containing "conftest.", or (3) at the end.
14966 # Note that $ac_compile itself does not contain backslashes and begins
14967 # with a dollar sign (not a hyphen), so the echo should work correctly.
14968 lt_compile=`echo "$ac_compile" | $SED \
14969 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14970 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14971 -e 's:$: $lt_compiler_flag:'`
14972 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
14973 (eval "$lt_compile" 2>out/conftest.err)
14974 ac_status=$?
14975 cat out/conftest.err >&5
14976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14977 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14978 then
14979 # The compiler can only warn and ignore the option if not recognized
14980 # So say no if there are warnings
14981 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
14982 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14983 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14984 lt_cv_prog_compiler_c_o_CXX=yes
14985 fi
14986 fi
14987 chmod u+w . 2>&5
14988 $RM conftest*
14989 # SGI C++ compiler will create directory out/ii_files/ for
14990 # template instantiation
14991 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
14992 $RM out/* && rmdir out
14993 cd ..
14994 $RM -r conftest
14995 $RM conftest*
14996
14997 fi
14998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
14999 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
15000
15001
15002
15003
15004 hard_links=nottested
15005 if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
15006 # do not overwrite the value of need_locks provided by the user
15007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
15008 $as_echo_n "checking if we can lock with hard links... " >&6; }
15009 hard_links=yes
15010 $RM conftest*
15011 ln conftest.a conftest.b 2>/dev/null && hard_links=no
15012 touch conftest.a
15013 ln conftest.a conftest.b 2>&5 || hard_links=no
15014 ln conftest.a conftest.b 2>/dev/null && hard_links=no
15015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
15016 $as_echo "$hard_links" >&6; }
15017 if test no = "$hard_links"; then
15018 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
15019 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
15020 need_locks=warn
15021 fi
15022 else
15023 need_locks=no
15024 fi
15025
15026
15027
15028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
15029 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
15030
15031 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
15032 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
15033 case $host_os in
15034 aix[4-9]*)
15035 # If we're using GNU nm, then we don't want the "-C" option.
15036 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
15037 # Without the "-l" option, or with the "-B" option, AIX nm treats
15038 # weak defined symbols like other global defined symbols, whereas
15039 # GNU nm marks them as "W".
15040 # While the 'weak' keyword is ignored in the Export File, we need
15041 # it in the Import File for the 'aix-soname' feature, so we have
15042 # to replace the "-B" option with "-P" for AIX nm.
15043 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
15044 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
15045 else
15046 export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
15047 fi
15048 ;;
15049 pw32*)
15050 export_symbols_cmds_CXX=$ltdll_cmds
15051 ;;
15052 cygwin* | mingw* | cegcc*)
15053 case $cc_basename in
15054 cl*)
15055 exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
15056 ;;
15057 *)
15058 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
15059 exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
15060 ;;
15061 esac
15062 ;;
15063 linux* | k*bsd*-gnu | gnu*)
15064 link_all_deplibs_CXX=no
15065 ;;
15066 *)
15067 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
15068 ;;
15069 esac
15070
15071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
15072 $as_echo "$ld_shlibs_CXX" >&6; }
15073 test no = "$ld_shlibs_CXX" && can_build_shared=no
15074
15075 with_gnu_ld_CXX=$with_gnu_ld
15076
15077
15078
15079
15080
15081
15082 #
15083 # Do we need to explicitly link libc?
15084 #
15085 case "x$archive_cmds_need_lc_CXX" in
15086 x|xyes)
15087 # Assume -lc should be added
15088 archive_cmds_need_lc_CXX=yes
15089
15090 if test yes,yes = "$GCC,$enable_shared"; then
15091 case $archive_cmds_CXX in
15092 *'~'*)
15093 # FIXME: we may have to deal with multi-command sequences.
15094 ;;
15095 '$CC '*)
15096 # Test whether the compiler implicitly links with -lc since on some
15097 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15098 # to ld, don't add -lc before -lgcc.
15099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
15100 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
15101 if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
15102 $as_echo_n "(cached) " >&6
15103 else
15104 $RM conftest*
15105 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15106
15107 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
15108 (eval $ac_compile) 2>&5
15109 ac_status=$?
15110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15111 test $ac_status = 0; } 2>conftest.err; then
15112 soname=conftest
15113 lib=conftest
15114 libobjs=conftest.$ac_objext
15115 deplibs=
15116 wl=$lt_prog_compiler_wl_CXX
15117 pic_flag=$lt_prog_compiler_pic_CXX
15118 compiler_flags=-v
15119 linker_flags=-v
15120 verstring=
15121 output_objdir=.
15122 libname=conftest
15123 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
15124 allow_undefined_flag_CXX=
15125 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
15126 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
15127 ac_status=$?
15128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15129 test $ac_status = 0; }
15130 then
15131 lt_cv_archive_cmds_need_lc_CXX=no
15132 else
15133 lt_cv_archive_cmds_need_lc_CXX=yes
15134 fi
15135 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
15136 else
15137 cat conftest.err 1>&5
15138 fi
15139 $RM conftest*
15140
15141 fi
15142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
15143 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
15144 archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
15145 ;;
15146 esac
15147 fi
15148 ;;
15149 esac
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
15213 $as_echo_n "checking dynamic linker characteristics... " >&6; }
15214
15215 library_names_spec=
15216 libname_spec='lib$name'
15217 soname_spec=
15218 shrext_cmds=.so
15219 postinstall_cmds=
15220 postuninstall_cmds=
15221 finish_cmds=
15222 finish_eval=
15223 shlibpath_var=
15224 shlibpath_overrides_runpath=unknown
15225 version_type=none
15226 dynamic_linker="$host_os ld.so"
15227 sys_lib_dlsearch_path_spec="/lib /usr/lib"
15228 need_lib_prefix=unknown
15229 hardcode_into_libs=no
15230
15231 # when you set need_version to no, make sure it does not cause -set_version
15232 # flags to be left without arguments
15233 need_version=unknown
15234
15235
15236
15237 case $host_os in
15238 aix3*)
15239 version_type=linux # correct to gnu/linux during the next big refactor
15240 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
15241 shlibpath_var=LIBPATH
15242
15243 # AIX 3 has no versioning support, so we append a major version to the name.
15244 soname_spec='$libname$release$shared_ext$major'
15245 ;;
15246
15247 aix[4-9]*)
15248 version_type=linux # correct to gnu/linux during the next big refactor
15249 need_lib_prefix=no
15250 need_version=no
15251 hardcode_into_libs=yes
15252 if test ia64 = "$host_cpu"; then
15253 # AIX 5 supports IA64
15254 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
15255 shlibpath_var=LD_LIBRARY_PATH
15256 else
15257 # With GCC up to 2.95.x, collect2 would create an import file
15258 # for dependence libraries. The import file would start with
15259 # the line '#! .'. This would cause the generated library to
15260 # depend on '.', always an invalid library. This was fixed in
15261 # development snapshots of GCC prior to 3.0.
15262 case $host_os in
15263 aix4 | aix4.[01] | aix4.[01].*)
15264 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
15265 echo ' yes '
15266 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
15267 :
15268 else
15269 can_build_shared=no
15270 fi
15271 ;;
15272 esac
15273 # Using Import Files as archive members, it is possible to support
15274 # filename-based versioning of shared library archives on AIX. While
15275 # this would work for both with and without runtime linking, it will
15276 # prevent static linking of such archives. So we do filename-based
15277 # shared library versioning with .so extension only, which is used
15278 # when both runtime linking and shared linking is enabled.
15279 # Unfortunately, runtime linking may impact performance, so we do
15280 # not want this to be the default eventually. Also, we use the
15281 # versioned .so libs for executables only if there is the -brtl
15282 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
15283 # To allow for filename-based versioning support, we need to create
15284 # libNAME.so.V as an archive file, containing:
15285 # *) an Import File, referring to the versioned filename of the
15286 # archive as well as the shared archive member, telling the
15287 # bitwidth (32 or 64) of that shared object, and providing the
15288 # list of exported symbols of that shared object, eventually
15289 # decorated with the 'weak' keyword
15290 # *) the shared object with the F_LOADONLY flag set, to really avoid
15291 # it being seen by the linker.
15292 # At run time we better use the real file rather than another symlink,
15293 # but for link time we create the symlink libNAME.so -> libNAME.so.V
15294
15295 case $with_aix_soname,$aix_use_runtimelinking in
15296 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
15297 # soname into executable. Probably we can add versioning support to
15298 # collect2, so additional links can be useful in future.
15299 aix,yes) # traditional libtool
15300 dynamic_linker='AIX unversionable lib.so'
15301 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
15302 # instead of lib<name>.a to let people know that these are not
15303 # typical AIX shared libraries.
15304 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15305 ;;
15306 aix,no) # traditional AIX only
15307 dynamic_linker='AIX lib.a(lib.so.V)'
15308 # We preserve .a as extension for shared libraries through AIX4.2
15309 # and later when we are not doing run time linking.
15310 library_names_spec='$libname$release.a $libname.a'
15311 soname_spec='$libname$release$shared_ext$major'
15312 ;;
15313 svr4,*) # full svr4 only
15314 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
15315 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
15316 # We do not specify a path in Import Files, so LIBPATH fires.
15317 shlibpath_overrides_runpath=yes
15318 ;;
15319 *,yes) # both, prefer svr4
15320 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
15321 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
15322 # unpreferred sharedlib libNAME.a needs extra handling
15323 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
15324 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
15325 # We do not specify a path in Import Files, so LIBPATH fires.
15326 shlibpath_overrides_runpath=yes
15327 ;;
15328 *,no) # both, prefer aix
15329 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
15330 library_names_spec='$libname$release.a $libname.a'
15331 soname_spec='$libname$release$shared_ext$major'
15332 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
15333 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
15334 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
15335 ;;
15336 esac
15337 shlibpath_var=LIBPATH
15338 fi
15339 ;;
15340
15341 amigaos*)
15342 case $host_cpu in
15343 powerpc)
15344 # Since July 2007 AmigaOS4 officially supports .so libraries.
15345 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
15346 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15347 ;;
15348 m68k)
15349 library_names_spec='$libname.ixlibrary $libname.a'
15350 # Create ${libname}_ixlibrary.a entries in /sys/libs.
15351 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
15352 ;;
15353 esac
15354 ;;
15355
15356 beos*)
15357 library_names_spec='$libname$shared_ext'
15358 dynamic_linker="$host_os ld.so"
15359 shlibpath_var=LIBRARY_PATH
15360 ;;
15361
15362 bsdi[45]*)
15363 version_type=linux # correct to gnu/linux during the next big refactor
15364 need_version=no
15365 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15366 soname_spec='$libname$release$shared_ext$major'
15367 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
15368 shlibpath_var=LD_LIBRARY_PATH
15369 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
15370 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
15371 # the default ld.so.conf also contains /usr/contrib/lib and
15372 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
15373 # libtool to hard-code these into programs
15374 ;;
15375
15376 cygwin* | mingw* | pw32* | cegcc*)
15377 version_type=windows
15378 shrext_cmds=.dll
15379 need_version=no
15380 need_lib_prefix=no
15381
15382 case $GCC,$cc_basename in
15383 yes,*)
15384 # gcc
15385 library_names_spec='$libname.dll.a'
15386 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15387 postinstall_cmds='base_file=`basename \$file`~
15388 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
15389 dldir=$destdir/`dirname \$dlpath`~
15390 test -d \$dldir || mkdir -p \$dldir~
15391 $install_prog $dir/$dlname \$dldir/$dlname~
15392 chmod a+x \$dldir/$dlname~
15393 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15394 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15395 fi'
15396 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15397 dlpath=$dir/\$dldll~
15398 $RM \$dlpath'
15399 shlibpath_overrides_runpath=yes
15400
15401 case $host_os in
15402 cygwin*)
15403 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
15404 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15405
15406 ;;
15407 mingw* | cegcc*)
15408 # MinGW DLLs use traditional 'lib' prefix
15409 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15410 ;;
15411 pw32*)
15412 # pw32 DLLs use 'pw' prefix rather than 'lib'
15413 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15414 ;;
15415 esac
15416 dynamic_linker='Win32 ld.exe'
15417 ;;
15418
15419 *,cl*)
15420 # Native MSVC
15421 libname_spec='$name'
15422 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
15423 library_names_spec='$libname.dll.lib'
15424
15425 case $build_os in
15426 mingw*)
15427 sys_lib_search_path_spec=
15428 lt_save_ifs=$IFS
15429 IFS=';'
15430 for lt_path in $LIB
15431 do
15432 IFS=$lt_save_ifs
15433 # Let DOS variable expansion print the short 8.3 style file name.
15434 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
15435 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
15436 done
15437 IFS=$lt_save_ifs
15438 # Convert to MSYS style.
15439 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
15440 ;;
15441 cygwin*)
15442 # Convert to unix form, then to dos form, then back to unix form
15443 # but this time dos style (no spaces!) so that the unix form looks
15444 # like /cygdrive/c/PROGRA~1:/cygdr...
15445 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
15446 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
15447 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15448 ;;
15449 *)
15450 sys_lib_search_path_spec=$LIB
15451 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
15452 # It is most probably a Windows format PATH.
15453 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15454 else
15455 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15456 fi
15457 # FIXME: find the short name or the path components, as spaces are
15458 # common. (e.g. "Program Files" -> "PROGRA~1")
15459 ;;
15460 esac
15461
15462 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15463 postinstall_cmds='base_file=`basename \$file`~
15464 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
15465 dldir=$destdir/`dirname \$dlpath`~
15466 test -d \$dldir || mkdir -p \$dldir~
15467 $install_prog $dir/$dlname \$dldir/$dlname'
15468 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15469 dlpath=$dir/\$dldll~
15470 $RM \$dlpath'
15471 shlibpath_overrides_runpath=yes
15472 dynamic_linker='Win32 link.exe'
15473 ;;
15474
15475 *)
15476 # Assume MSVC wrapper
15477 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
15478 dynamic_linker='Win32 ld.exe'
15479 ;;
15480 esac
15481 # FIXME: first we should search . and the directory the executable is in
15482 shlibpath_var=PATH
15483 ;;
15484
15485 darwin* | rhapsody*)
15486 dynamic_linker="$host_os dyld"
15487 version_type=darwin
15488 need_lib_prefix=no
15489 need_version=no
15490 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
15491 soname_spec='$libname$release$major$shared_ext'
15492 shlibpath_overrides_runpath=yes
15493 shlibpath_var=DYLD_LIBRARY_PATH
15494 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15495
15496 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15497 ;;
15498
15499 dgux*)
15500 version_type=linux # correct to gnu/linux during the next big refactor
15501 need_lib_prefix=no
15502 need_version=no
15503 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15504 soname_spec='$libname$release$shared_ext$major'
15505 shlibpath_var=LD_LIBRARY_PATH
15506 ;;
15507
15508 freebsd* | dragonfly*)
15509 # DragonFly does not have aout. When/if they implement a new
15510 # versioning mechanism, adjust this.
15511 if test -x /usr/bin/objformat; then
15512 objformat=`/usr/bin/objformat`
15513 else
15514 case $host_os in
15515 freebsd[23].*) objformat=aout ;;
15516 *) objformat=elf ;;
15517 esac
15518 fi
15519 version_type=freebsd-$objformat
15520 case $version_type in
15521 freebsd-elf*)
15522 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15523 soname_spec='$libname$release$shared_ext$major'
15524 need_version=no
15525 need_lib_prefix=no
15526 ;;
15527 freebsd-*)
15528 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15529 need_version=yes
15530 ;;
15531 esac
15532 shlibpath_var=LD_LIBRARY_PATH
15533 case $host_os in
15534 freebsd2.*)
15535 shlibpath_overrides_runpath=yes
15536 ;;
15537 freebsd3.[01]* | freebsdelf3.[01]*)
15538 shlibpath_overrides_runpath=yes
15539 hardcode_into_libs=yes
15540 ;;
15541 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
15542 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
15543 shlibpath_overrides_runpath=no
15544 hardcode_into_libs=yes
15545 ;;
15546 *) # from 4.6 on, and DragonFly
15547 shlibpath_overrides_runpath=yes
15548 hardcode_into_libs=yes
15549 ;;
15550 esac
15551 ;;
15552
15553 haiku*)
15554 version_type=linux # correct to gnu/linux during the next big refactor
15555 need_lib_prefix=no
15556 need_version=no
15557 dynamic_linker="$host_os runtime_loader"
15558 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15559 soname_spec='$libname$release$shared_ext$major'
15560 shlibpath_var=LIBRARY_PATH
15561 shlibpath_overrides_runpath=no
15562 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
15563 hardcode_into_libs=yes
15564 ;;
15565
15566 hpux9* | hpux10* | hpux11*)
15567 # Give a soname corresponding to the major version so that dld.sl refuses to
15568 # link against other versions.
15569 version_type=sunos
15570 need_lib_prefix=no
15571 need_version=no
15572 case $host_cpu in
15573 ia64*)
15574 shrext_cmds='.so'
15575 hardcode_into_libs=yes
15576 dynamic_linker="$host_os dld.so"
15577 shlibpath_var=LD_LIBRARY_PATH
15578 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15579 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15580 soname_spec='$libname$release$shared_ext$major'
15581 if test 32 = "$HPUX_IA64_MODE"; then
15582 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15583 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
15584 else
15585 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15586 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
15587 fi
15588 ;;
15589 hppa*64*)
15590 shrext_cmds='.sl'
15591 hardcode_into_libs=yes
15592 dynamic_linker="$host_os dld.sl"
15593 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15594 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15595 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15596 soname_spec='$libname$release$shared_ext$major'
15597 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15598 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15599 ;;
15600 *)
15601 shrext_cmds='.sl'
15602 dynamic_linker="$host_os dld.sl"
15603 shlibpath_var=SHLIB_PATH
15604 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15605 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15606 soname_spec='$libname$release$shared_ext$major'
15607 ;;
15608 esac
15609 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
15610 postinstall_cmds='chmod 555 $lib'
15611 # or fails outright, so override atomically:
15612 install_override_mode=555
15613 ;;
15614
15615 interix[3-9]*)
15616 version_type=linux # correct to gnu/linux during the next big refactor
15617 need_lib_prefix=no
15618 need_version=no
15619 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15620 soname_spec='$libname$release$shared_ext$major'
15621 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15622 shlibpath_var=LD_LIBRARY_PATH
15623 shlibpath_overrides_runpath=no
15624 hardcode_into_libs=yes
15625 ;;
15626
15627 irix5* | irix6* | nonstopux*)
15628 case $host_os in
15629 nonstopux*) version_type=nonstopux ;;
15630 *)
15631 if test yes = "$lt_cv_prog_gnu_ld"; then
15632 version_type=linux # correct to gnu/linux during the next big refactor
15633 else
15634 version_type=irix
15635 fi ;;
15636 esac
15637 need_lib_prefix=no
15638 need_version=no
15639 soname_spec='$libname$release$shared_ext$major'
15640 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
15641 case $host_os in
15642 irix5* | nonstopux*)
15643 libsuff= shlibsuff=
15644 ;;
15645 *)
15646 case $LD in # libtool.m4 will add one of these switches to LD
15647 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15648 libsuff= shlibsuff= libmagic=32-bit;;
15649 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15650 libsuff=32 shlibsuff=N32 libmagic=N32;;
15651 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15652 libsuff=64 shlibsuff=64 libmagic=64-bit;;
15653 *) libsuff= shlibsuff= libmagic=never-match;;
15654 esac
15655 ;;
15656 esac
15657 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15658 shlibpath_overrides_runpath=no
15659 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
15660 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
15661 hardcode_into_libs=yes
15662 ;;
15663
15664 # No shared lib support for Linux oldld, aout, or coff.
15665 linux*oldld* | linux*aout* | linux*coff*)
15666 dynamic_linker=no
15667 ;;
15668
15669 linux*android*)
15670 version_type=none # Android doesn't support versioned libraries.
15671 need_lib_prefix=no
15672 need_version=no
15673 library_names_spec='$libname$release$shared_ext'
15674 soname_spec='$libname$release$shared_ext'
15675 finish_cmds=
15676 shlibpath_var=LD_LIBRARY_PATH
15677 shlibpath_overrides_runpath=yes
15678
15679 # This implies no fast_install, which is unacceptable.
15680 # Some rework will be needed to allow for fast_install
15681 # before this can be enabled.
15682 hardcode_into_libs=yes
15683
15684 dynamic_linker='Android linker'
15685 # Don't embed -rpath directories since the linker doesn't support them.
15686 hardcode_libdir_flag_spec_CXX='-L$libdir'
15687 ;;
15688
15689 # This must be glibc/ELF.
15690 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
15691 version_type=linux # correct to gnu/linux during the next big refactor
15692 need_lib_prefix=no
15693 need_version=no
15694 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15695 soname_spec='$libname$release$shared_ext$major'
15696 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15697 shlibpath_var=LD_LIBRARY_PATH
15698 shlibpath_overrides_runpath=no
15699
15700 # Some binutils ld are patched to set DT_RUNPATH
15701 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
15702 $as_echo_n "(cached) " >&6
15703 else
15704 lt_cv_shlibpath_overrides_runpath=no
15705 save_LDFLAGS=$LDFLAGS
15706 save_libdir=$libdir
15707 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
15708 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
15709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15710 /* end confdefs.h. */
15711
15712 int
15713 main ()
15714 {
15715
15716 ;
15717 return 0;
15718 }
15719 _ACEOF
15720 if ac_fn_cxx_try_link "$LINENO"; then :
15721 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
15722 lt_cv_shlibpath_overrides_runpath=yes
15723 fi
15724 fi
15725 rm -f core conftest.err conftest.$ac_objext \
15726 conftest$ac_exeext conftest.$ac_ext
15727 LDFLAGS=$save_LDFLAGS
15728 libdir=$save_libdir
15729
15730 fi
15731
15732 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
15733
15734 # This implies no fast_install, which is unacceptable.
15735 # Some rework will be needed to allow for fast_install
15736 # before this can be enabled.
15737 hardcode_into_libs=yes
15738
15739 # Ideally, we could use ldconfig to report *all* directores which are
15740 # searched for libraries, however this is still not possible. Aside from not
15741 # being certain /sbin/ldconfig is available, command
15742 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
15743 # even though it is searched at run-time. Try to do the best guess by
15744 # appending ld.so.conf contents (and includes) to the search path.
15745 if test -f /etc/ld.so.conf; then
15746 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
15747 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
15748 fi
15749
15750 # We used to test for /lib/ld.so.1 and disable shared libraries on
15751 # powerpc, because MkLinux only supported shared libraries with the
15752 # GNU dynamic linker. Since this was broken with cross compilers,
15753 # most powerpc-linux boxes support dynamic linking these days and
15754 # people can always --disable-shared, the test was removed, and we
15755 # assume the GNU/Linux dynamic linker is in use.
15756 dynamic_linker='GNU/Linux ld.so'
15757 ;;
15758
15759 netbsdelf*-gnu)
15760 version_type=linux
15761 need_lib_prefix=no
15762 need_version=no
15763 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15764 soname_spec='${libname}${release}${shared_ext}$major'
15765 shlibpath_var=LD_LIBRARY_PATH
15766 shlibpath_overrides_runpath=no
15767 hardcode_into_libs=yes
15768 dynamic_linker='NetBSD ld.elf_so'
15769 ;;
15770
15771 netbsd*)
15772 version_type=sunos
15773 need_lib_prefix=no
15774 need_version=no
15775 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
15776 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15777 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15778 dynamic_linker='NetBSD (a.out) ld.so'
15779 else
15780 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15781 soname_spec='$libname$release$shared_ext$major'
15782 dynamic_linker='NetBSD ld.elf_so'
15783 fi
15784 shlibpath_var=LD_LIBRARY_PATH
15785 shlibpath_overrides_runpath=yes
15786 hardcode_into_libs=yes
15787 ;;
15788
15789 newsos6)
15790 version_type=linux # correct to gnu/linux during the next big refactor
15791 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15792 shlibpath_var=LD_LIBRARY_PATH
15793 shlibpath_overrides_runpath=yes
15794 ;;
15795
15796 *nto* | *qnx*)
15797 version_type=qnx
15798 need_lib_prefix=no
15799 need_version=no
15800 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15801 soname_spec='$libname$release$shared_ext$major'
15802 shlibpath_var=LD_LIBRARY_PATH
15803 shlibpath_overrides_runpath=no
15804 hardcode_into_libs=yes
15805 dynamic_linker='ldqnx.so'
15806 ;;
15807
15808 openbsd* | bitrig*)
15809 version_type=sunos
15810 sys_lib_dlsearch_path_spec=/usr/lib
15811 need_lib_prefix=no
15812 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
15813 need_version=no
15814 else
15815 need_version=yes
15816 fi
15817 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15818 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15819 shlibpath_var=LD_LIBRARY_PATH
15820 shlibpath_overrides_runpath=yes
15821 ;;
15822
15823 os2*)
15824 libname_spec='$name'
15825 version_type=windows
15826 shrext_cmds=.dll
15827 need_version=no
15828 need_lib_prefix=no
15829 # OS/2 can only load a DLL with a base name of 8 characters or less.
15830 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
15831 v=$($ECHO $release$versuffix | tr -d .-);
15832 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
15833 $ECHO $n$v`$shared_ext'
15834 library_names_spec='${libname}_dll.$libext'
15835 dynamic_linker='OS/2 ld.exe'
15836 shlibpath_var=BEGINLIBPATH
15837 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
15838 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15839 postinstall_cmds='base_file=`basename \$file`~
15840 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
15841 dldir=$destdir/`dirname \$dlpath`~
15842 test -d \$dldir || mkdir -p \$dldir~
15843 $install_prog $dir/$dlname \$dldir/$dlname~
15844 chmod a+x \$dldir/$dlname~
15845 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
15846 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
15847 fi'
15848 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
15849 dlpath=$dir/\$dldll~
15850 $RM \$dlpath'
15851 ;;
15852
15853 osf3* | osf4* | osf5*)
15854 version_type=osf
15855 need_lib_prefix=no
15856 need_version=no
15857 soname_spec='$libname$release$shared_ext$major'
15858 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15859 shlibpath_var=LD_LIBRARY_PATH
15860 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15861 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15862 ;;
15863
15864 rdos*)
15865 dynamic_linker=no
15866 ;;
15867
15868 solaris*)
15869 version_type=linux # correct to gnu/linux during the next big refactor
15870 need_lib_prefix=no
15871 need_version=no
15872 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15873 soname_spec='$libname$release$shared_ext$major'
15874 shlibpath_var=LD_LIBRARY_PATH
15875 shlibpath_overrides_runpath=yes
15876 hardcode_into_libs=yes
15877 # ldd complains unless libraries are executable
15878 postinstall_cmds='chmod +x $lib'
15879 ;;
15880
15881 sunos4*)
15882 version_type=sunos
15883 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
15884 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15885 shlibpath_var=LD_LIBRARY_PATH
15886 shlibpath_overrides_runpath=yes
15887 if test yes = "$with_gnu_ld"; then
15888 need_lib_prefix=no
15889 fi
15890 need_version=yes
15891 ;;
15892
15893 sysv4 | sysv4.3*)
15894 version_type=linux # correct to gnu/linux during the next big refactor
15895 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15896 soname_spec='$libname$release$shared_ext$major'
15897 shlibpath_var=LD_LIBRARY_PATH
15898 case $host_vendor in
15899 sni)
15900 shlibpath_overrides_runpath=no
15901 need_lib_prefix=no
15902 runpath_var=LD_RUN_PATH
15903 ;;
15904 siemens)
15905 need_lib_prefix=no
15906 ;;
15907 motorola)
15908 need_lib_prefix=no
15909 need_version=no
15910 shlibpath_overrides_runpath=no
15911 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15912 ;;
15913 esac
15914 ;;
15915
15916 sysv4*MP*)
15917 if test -d /usr/nec; then
15918 version_type=linux # correct to gnu/linux during the next big refactor
15919 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
15920 soname_spec='$libname$shared_ext.$major'
15921 shlibpath_var=LD_LIBRARY_PATH
15922 fi
15923 ;;
15924
15925 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15926 version_type=sco
15927 need_lib_prefix=no
15928 need_version=no
15929 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
15930 soname_spec='$libname$release$shared_ext$major'
15931 shlibpath_var=LD_LIBRARY_PATH
15932 shlibpath_overrides_runpath=yes
15933 hardcode_into_libs=yes
15934 if test yes = "$with_gnu_ld"; then
15935 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15936 else
15937 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15938 case $host_os in
15939 sco3.2v5*)
15940 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15941 ;;
15942 esac
15943 fi
15944 sys_lib_dlsearch_path_spec='/usr/lib'
15945 ;;
15946
15947 tpf*)
15948 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
15949 version_type=linux # correct to gnu/linux during the next big refactor
15950 need_lib_prefix=no
15951 need_version=no
15952 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15953 shlibpath_var=LD_LIBRARY_PATH
15954 shlibpath_overrides_runpath=no
15955 hardcode_into_libs=yes
15956 ;;
15957
15958 uts4*)
15959 version_type=linux # correct to gnu/linux during the next big refactor
15960 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
15961 soname_spec='$libname$release$shared_ext$major'
15962 shlibpath_var=LD_LIBRARY_PATH
15963 ;;
15964
15965 *)
15966 dynamic_linker=no
15967 ;;
15968 esac
15969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
15970 $as_echo "$dynamic_linker" >&6; }
15971 test no = "$dynamic_linker" && can_build_shared=no
15972
15973 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15974 if test yes = "$GCC"; then
15975 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15976 fi
15977
15978 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
15979 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
15980 fi
15981
15982 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
15983 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
15984 fi
15985
15986 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
15987 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
15988
15989 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
15990 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
15991
15992 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
15993 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
16035 $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
16036 hardcode_action_CXX=
16037 if test -n "$hardcode_libdir_flag_spec_CXX" ||
16038 test -n "$runpath_var_CXX" ||
16039 test yes = "$hardcode_automatic_CXX"; then
16040
16041 # We can hardcode non-existent directories.
16042 if test no != "$hardcode_direct_CXX" &&
16043 # If the only mechanism to avoid hardcoding is shlibpath_var, we
16044 # have to relink, otherwise we might link with an installed library
16045 # when we should be linking with a yet-to-be-installed one
16046 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
16047 test no != "$hardcode_minus_L_CXX"; then
16048 # Linking always hardcodes the temporary library directory.
16049 hardcode_action_CXX=relink
16050 else
16051 # We can link without hardcoding, and we can hardcode nonexisting dirs.
16052 hardcode_action_CXX=immediate
16053 fi
16054 else
16055 # We cannot hardcode anything, or else we can only hardcode existing
16056 # directories.
16057 hardcode_action_CXX=unsupported
16058 fi
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
16060 $as_echo "$hardcode_action_CXX" >&6; }
16061
16062 if test relink = "$hardcode_action_CXX" ||
16063 test yes = "$inherit_rpath_CXX"; then
16064 # Fast installation is not supported
16065 enable_fast_install=no
16066 elif test yes = "$shlibpath_overrides_runpath" ||
16067 test no = "$enable_shared"; then
16068 # Fast installation is not necessary
16069 enable_fast_install=needless
16070 fi
16071
16072
16073
16074
16075
16076
16077
16078 fi # test -n "$compiler"
16079
16080 CC=$lt_save_CC
16081 CFLAGS=$lt_save_CFLAGS
16082 LDCXX=$LD
16083 LD=$lt_save_LD
16084 GCC=$lt_save_GCC
16085 with_gnu_ld=$lt_save_with_gnu_ld
16086 lt_cv_path_LDCXX=$lt_cv_path_LD
16087 lt_cv_path_LD=$lt_save_path_LD
16088 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
16089 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
16090 fi # test yes != "$_lt_caught_CXX_error"
16091
16092 ac_ext=c
16093 ac_cpp='$CPP $CPPFLAGS'
16094 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16095 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16096 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16097
1609812106
1609912107
1610012108
1612412132
1612512133
1612612134 CFLAGS="$CFLAGS"
16127 CXXFLAGS="$CXXFLAGS"
1612812135
1612912136 LIBS="$LDFLAGS $LIBS"
1613012137
1620212209
1620312210 if test "x$enable_debug" = "xyes"; then
1620412211 CFLAGS="$CFLAGS -g -DDEBUG -Wall"
16205 CXXFLAGS="$CXXFLAGS -g -DDEBUG -Wall"
1620612212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1620712213 $as_echo "yes" >&6; }
1620812214 else
1620912215 CFLAGS="$CFLAGS -O3 -DNDEBUG"
16210 CXXFLAGS="$CXXFLAGS -O3 -DNDEBUG"
1621112216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1621212217 $as_echo "no" >&6; }
1621312218 fi
1638512390 $as_echo "using zlib from $with_zip/include" >&6; }
1638612391 HAVE_ZLIB="yes"
1638712392 ZIP_CONFIG="yes"
12393 LIBS="-L${with_zip}/lib -lz $LIBS"
1638812394 fi
1638912395 fi
1639012396
1671712723
1671812724
1671912725
16720 PROJ_CONFIG="no"
12726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROJ >= 6 library" >&5
12727 $as_echo_n "checking for PROJ >= 6 library... " >&6; }
1672112728
1672212729
1672312730 # Check whether --with-proj was given.
1672412731 if test "${with_proj+set}" = set; then :
16725 withval=$with_proj; PROJ_HOME=$withval
16726 else
16727 PROJ_HOME=
16728 fi
16729
16730
16731 if test "$PROJ_HOME" != "" -a "$PROJ_HOME" != "no" ; then
16732 if test -d "$PROJ_HOME/src/pj_init.c" ; then
16733 PROJ_HOME=$PROJ_HOME/src
16734 fi
16735
16736 if test -f "$PROJ_HOME/libproj.a" -a -f "$PROJ_HOME/proj_api.h" ; then
16737 PROJ_LIB=$PROJ_HOME/libproj.a
16738 PROJ_INC=$PROJ_HOME
16739 PROJ_CONFIG="yes"
16740
16741 elif test -f "$PROJ_HOME/.libs/libproj.a" -a -f "$PROJ_HOME/proj_api.h" ; then
16742 PROJ_LIB=$PROJ_HOME/.libs/libproj.a
16743 PROJ_INC=$PROJ_HOME
16744
16745 PROJ_CONFIG="yes"
16746
16747 elif test \( -f "$PROJ_HOME/lib/libproj.a" -o -f "$PROJ_HOME/lib/libproj.so" \) -a -f "$PROJ_HOME/include/proj_api.h"; then
16748 PROJ_LIB="-L$PROJ_HOME/lib -lproj"
16749 PROJ_INC=$PROJ_HOME/include
16750
16751 PROJ_CONFIG="yes"
16752 else
16753 echo "PROJ_HOME=$PROJ_HOME, but either proj_api.h or libproj.a not found!"
16754 fi
16755 fi
16756
16757
16758 if test "$PROJ_HOME" = "no" ; then
16759 echo "PROJ.4 support disabled."
16760
16761 elif test "$PROJ_LIB" != "" -a "$PROJ_INC" != "" ; then
16762 echo "Found $PROJ_LIB"
16763 echo "Found $PROJ_INC/proj_api.h"
16764
16765 LIBS="$PROJ_LIB $LIBS"
16766 PROJ_INC=-I$PROJ_INC
16767
16768 PROJ_INC=$PROJ_INC
16769
16770 $as_echo "#define HAVE_PROJECTS_H 1" >>confdefs.h
16771
16772 $as_echo "#define HAVE_LIBPROJ 1" >>confdefs.h
16773
16774
16775 PROJ_CONFIG="yes"
16776
16777 else
16778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pj_init in -lproj" >&5
16779 $as_echo_n "checking for pj_init in -lproj... " >&6; }
16780 if ${ac_cv_lib_proj_pj_init+:} false; then :
12732 withval=$with_proj;
12733 fi
12734
12735
12736 PROJ_INCLUDE=""
12737 if test "x$with_proj" = "xno" ; then
12738
12739 as_fn_error $? "PROJ 6 is a required dependency." "$LINENO" 5
12740
12741 else
12742
12743 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
12747 $as_echo_n "checking for proj_create_from_wkt in -lproj... " >&6; }
12748 if ${ac_cv_lib_proj_proj_create_from_wkt+:} false; then :
1678112749 $as_echo_n "(cached) " >&6
1678212750 else
1678312751 ac_check_lib_save_LIBS=$LIBS
16784 LIBS="-lproj -lm $LIBS"
12752 LIBS="-lproj $LIBS"
1678512753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1678612754 /* end confdefs.h. */
1678712755
1679112759 #ifdef __cplusplus
1679212760 extern "C"
1679312761 #endif
16794 char pj_init ();
12762 char proj_create_from_wkt ();
1679512763 int
1679612764 main ()
1679712765 {
16798 return pj_init ();
12766 return proj_create_from_wkt ();
1679912767 ;
1680012768 return 0;
1680112769 }
1680212770 _ACEOF
1680312771 if ac_fn_c_try_link "$LINENO"; then :
16804 ac_cv_lib_proj_pj_init=yes
16805 else
16806 ac_cv_lib_proj_pj_init=no
12772 ac_cv_lib_proj_proj_create_from_wkt=yes
12773 else
12774 ac_cv_lib_proj_proj_create_from_wkt=no
1680712775 fi
1680812776 rm -f core conftest.err conftest.$ac_objext \
1680912777 conftest$ac_exeext conftest.$ac_ext
1681012778 LIBS=$ac_check_lib_save_LIBS
1681112779 fi
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_pj_init" >&5
16813 $as_echo "$ac_cv_lib_proj_pj_init" >&6; }
16814 if test "x$ac_cv_lib_proj_pj_init" = xyes; then :
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_proj_create_from_wkt" >&5
12781 $as_echo "$ac_cv_lib_proj_proj_create_from_wkt" >&6; }
12782 if test "x$ac_cv_lib_proj_proj_create_from_wkt" = xyes; then :
12783 PROJ_FOUND=yes
12784 else
12785 PROJ_FOUND=no
12786 fi
12787
12788 if test "$PROJ_FOUND" = "no"; then
12789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -lproj" >&5
12790 $as_echo_n "checking for internal_proj_create_from_wkt in -lproj... " >&6; }
12791 if ${ac_cv_lib_proj_internal_proj_create_from_wkt+:} false; then :
12792 $as_echo_n "(cached) " >&6
12793 else
12794 ac_check_lib_save_LIBS=$LIBS
12795 LIBS="-lproj $LIBS"
12796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797 /* end confdefs.h. */
12798
12799 /* Override any GCC internal prototype to avoid an error.
12800 Use char because int might match the return type of a GCC
12801 builtin and then its argument prototype would still apply. */
12802 #ifdef __cplusplus
12803 extern "C"
12804 #endif
12805 char internal_proj_create_from_wkt ();
12806 int
12807 main ()
12808 {
12809 return internal_proj_create_from_wkt ();
12810 ;
12811 return 0;
12812 }
12813 _ACEOF
12814 if ac_fn_c_try_link "$LINENO"; then :
12815 ac_cv_lib_proj_internal_proj_create_from_wkt=yes
12816 else
12817 ac_cv_lib_proj_internal_proj_create_from_wkt=no
12818 fi
12819 rm -f core conftest.err conftest.$ac_objext \
12820 conftest$ac_exeext conftest.$ac_ext
12821 LIBS=$ac_check_lib_save_LIBS
12822 fi
12823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_internal_proj_create_from_wkt" >&5
12824 $as_echo "$ac_cv_lib_proj_internal_proj_create_from_wkt" >&6; }
12825 if test "x$ac_cv_lib_proj_internal_proj_create_from_wkt" = xyes; then :
12826 PROJ_FOUND=yes
12827 else
12828 PROJ_FOUND=no
12829 fi
12830
12831 if test "$PROJ_FOUND" = "yes"; then
12832 PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
12833 fi
12834 fi
12835 if test "$PROJ_FOUND" = "no"; then
12836 LIBS="-linternalproj $ORIG_LIBS"
12837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -linternalproj" >&5
12838 $as_echo_n "checking for internal_proj_create_from_wkt in -linternalproj... " >&6; }
12839 if ${ac_cv_lib_internalproj_internal_proj_create_from_wkt+:} false; then :
12840 $as_echo_n "(cached) " >&6
12841 else
12842 ac_check_lib_save_LIBS=$LIBS
12843 LIBS="-linternalproj $LIBS"
12844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12845 /* end confdefs.h. */
12846
12847 /* Override any GCC internal prototype to avoid an error.
12848 Use char because int might match the return type of a GCC
12849 builtin and then its argument prototype would still apply. */
12850 #ifdef __cplusplus
12851 extern "C"
12852 #endif
12853 char internal_proj_create_from_wkt ();
12854 int
12855 main ()
12856 {
12857 return internal_proj_create_from_wkt ();
12858 ;
12859 return 0;
12860 }
12861 _ACEOF
12862 if ac_fn_c_try_link "$LINENO"; then :
12863 ac_cv_lib_internalproj_internal_proj_create_from_wkt=yes
12864 else
12865 ac_cv_lib_internalproj_internal_proj_create_from_wkt=no
12866 fi
12867 rm -f core conftest.err conftest.$ac_objext \
12868 conftest$ac_exeext conftest.$ac_ext
12869 LIBS=$ac_check_lib_save_LIBS
12870 fi
12871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&5
12872 $as_echo "$ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&6; }
12873 if test "x$ac_cv_lib_internalproj_internal_proj_create_from_wkt" = xyes; then :
12874 PROJ_FOUND=yes
12875 else
12876 PROJ_FOUND=no
12877 fi
12878
12879 if test "$PROJ_FOUND" = "yes"; then
12880 PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
12881 fi
12882 fi
12883 if test "$PROJ_FOUND" = "no"; then
12884 as_fn_error $? "PROJ 6 symbols not found" "$LINENO" 5
12885 fi
12886 for ac_header in proj.h
12887 do :
12888 ac_fn_c_check_header_mongrel "$LINENO" "proj.h" "ac_cv_header_proj_h" "$ac_includes_default"
12889 if test "x$ac_cv_header_proj_h" = xyes; then :
1681512890 cat >>confdefs.h <<_ACEOF
16816 #define HAVE_LIBPROJ 1
12891 #define HAVE_PROJ_H 1
1681712892 _ACEOF
1681812893
16819 LIBS="-lproj $LIBS"
16820
16821 fi
16822
16823 for ac_header in proj_api.h
16824 do :
16825 ac_fn_c_check_header_mongrel "$LINENO" "proj_api.h" "ac_cv_header_proj_api_h" "$ac_includes_default"
16826 if test "x$ac_cv_header_proj_api_h" = xyes; then :
16827 cat >>confdefs.h <<_ACEOF
16828 #define HAVE_PROJ_API_H 1
12894 fi
12895
12896 done
12897
12898 if test "$ac_cv_header_proj_h" = "yes" ; then
12899 { $as_echo "$as_me:${as_lineno-$LINENO}: proj.h found" >&5
12900 $as_echo "$as_me: proj.h found" >&6;}
12901 else
12902 as_fn_error $? "proj.h not found" "$LINENO" 5
12903 fi
12904 else
12905
12906 ORIG_LIBS="$LIBS"
12907 LIBS="-L$with_proj/lib -lproj $ORIG_LIBS"
12908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj_create_from_wkt in -lproj" >&5
12909 $as_echo_n "checking for proj_create_from_wkt in -lproj... " >&6; }
12910 if ${ac_cv_lib_proj_proj_create_from_wkt+:} false; then :
12911 $as_echo_n "(cached) " >&6
12912 else
12913 ac_check_lib_save_LIBS=$LIBS
12914 LIBS="-lproj $LIBS"
12915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12916 /* end confdefs.h. */
12917
12918 /* Override any GCC internal prototype to avoid an error.
12919 Use char because int might match the return type of a GCC
12920 builtin and then its argument prototype would still apply. */
12921 #ifdef __cplusplus
12922 extern "C"
12923 #endif
12924 char proj_create_from_wkt ();
12925 int
12926 main ()
12927 {
12928 return proj_create_from_wkt ();
12929 ;
12930 return 0;
12931 }
1682912932 _ACEOF
16830
16831 fi
16832
16833 done
16834
16835 PROJ_CONFIG="yes"
16836 fi
16837
16838 if test ! x$PROJ_CONFIG = xno; then
16839 PROJ_IS_CONFIG_TRUE=
16840 PROJ_IS_CONFIG_FALSE='#'
16841 else
16842 PROJ_IS_CONFIG_TRUE='#'
16843 PROJ_IS_CONFIG_FALSE=
16844 fi
16845
16846 if test ! x$PROJECTS_H_CONFIG = xno; then
16847 PROJECTS_H_IS_CONFIG_TRUE=
16848 PROJECTS_H_IS_CONFIG_FALSE='#'
16849 else
16850 PROJECTS_H_IS_CONFIG_TRUE='#'
16851 PROJECTS_H_IS_CONFIG_FALSE=
16852 fi
16853
16854
16855
16856
16857 CSV_CONFIG="no"
16858 # Check whether --enable-incode-epsg was given.
16859 if test "${enable_incode_epsg+set}" = set; then :
16860 enableval=$enable_incode_epsg;
16861 else
16862 enable_incode_epsg=no
16863 fi
16864
16865
16866 if test "$enable_incode_epsg" != "no" -o "$enable_incode_epsg" = "" ; then
16867
16868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EPSG tables will be read from .csv files" >&5
16869 $as_echo_n "checking if EPSG tables will be read from .csv files... " >&6; }
16870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16871 $as_echo "yes" >&6; }
16872 CSV_CONFIG="yes"
16873 else
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EPSG tables will be read from .csv files" >&5
16875 $as_echo_n "checking if EPSG tables will be read from .csv files... " >&6; }
16876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16877 $as_echo "no" >&6; }
16878
16879 fi
16880 if test ! x$CSV_CONFIG = xno; then
16881 CSV_IS_CONFIG_TRUE=
16882 CSV_IS_CONFIG_FALSE='#'
16883 else
16884 CSV_IS_CONFIG_TRUE='#'
16885 CSV_IS_CONFIG_FALSE=
16886 fi
12933 if ac_fn_c_try_link "$LINENO"; then :
12934 ac_cv_lib_proj_proj_create_from_wkt=yes
12935 else
12936 ac_cv_lib_proj_proj_create_from_wkt=no
12937 fi
12938 rm -f core conftest.err conftest.$ac_objext \
12939 conftest$ac_exeext conftest.$ac_ext
12940 LIBS=$ac_check_lib_save_LIBS
12941 fi
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_proj_create_from_wkt" >&5
12943 $as_echo "$ac_cv_lib_proj_proj_create_from_wkt" >&6; }
12944 if test "x$ac_cv_lib_proj_proj_create_from_wkt" = xyes; then :
12945 PROJ_FOUND=yes
12946 else
12947 PROJ_FOUND=no
12948 fi
12949
12950 if test "$PROJ_FOUND" = "no"; then
12951 LIBS="-L$with_proj/lib -lproj -lsqlite3 $ORIG_LIBS"
12952 unset ac_cv_lib_proj_proj_create_from_wkt
12953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for proj_create_from_wkt in -lproj" >&5
12954 $as_echo_n "checking for proj_create_from_wkt in -lproj... " >&6; }
12955 if ${ac_cv_lib_proj_proj_create_from_wkt+:} false; then :
12956 $as_echo_n "(cached) " >&6
12957 else
12958 ac_check_lib_save_LIBS=$LIBS
12959 LIBS="-lproj $LIBS"
12960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12961 /* end confdefs.h. */
12962
12963 /* Override any GCC internal prototype to avoid an error.
12964 Use char because int might match the return type of a GCC
12965 builtin and then its argument prototype would still apply. */
12966 #ifdef __cplusplus
12967 extern "C"
12968 #endif
12969 char proj_create_from_wkt ();
12970 int
12971 main ()
12972 {
12973 return proj_create_from_wkt ();
12974 ;
12975 return 0;
12976 }
12977 _ACEOF
12978 if ac_fn_c_try_link "$LINENO"; then :
12979 ac_cv_lib_proj_proj_create_from_wkt=yes
12980 else
12981 ac_cv_lib_proj_proj_create_from_wkt=no
12982 fi
12983 rm -f core conftest.err conftest.$ac_objext \
12984 conftest$ac_exeext conftest.$ac_ext
12985 LIBS=$ac_check_lib_save_LIBS
12986 fi
12987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_proj_create_from_wkt" >&5
12988 $as_echo "$ac_cv_lib_proj_proj_create_from_wkt" >&6; }
12989 if test "x$ac_cv_lib_proj_proj_create_from_wkt" = xyes; then :
12990 PROJ_FOUND=yes
12991 else
12992 PROJ_FOUND=no
12993 fi
12994
12995 fi
12996 if test "$PROJ_FOUND" = "no"; then
12997 LIBS="-L$with_proj/lib -lproj $ORIG_LIBS"
12998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -lproj" >&5
12999 $as_echo_n "checking for internal_proj_create_from_wkt in -lproj... " >&6; }
13000 if ${ac_cv_lib_proj_internal_proj_create_from_wkt+:} false; then :
13001 $as_echo_n "(cached) " >&6
13002 else
13003 ac_check_lib_save_LIBS=$LIBS
13004 LIBS="-lproj $LIBS"
13005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13006 /* end confdefs.h. */
13007
13008 /* Override any GCC internal prototype to avoid an error.
13009 Use char because int might match the return type of a GCC
13010 builtin and then its argument prototype would still apply. */
13011 #ifdef __cplusplus
13012 extern "C"
13013 #endif
13014 char internal_proj_create_from_wkt ();
13015 int
13016 main ()
13017 {
13018 return internal_proj_create_from_wkt ();
13019 ;
13020 return 0;
13021 }
13022 _ACEOF
13023 if ac_fn_c_try_link "$LINENO"; then :
13024 ac_cv_lib_proj_internal_proj_create_from_wkt=yes
13025 else
13026 ac_cv_lib_proj_internal_proj_create_from_wkt=no
13027 fi
13028 rm -f core conftest.err conftest.$ac_objext \
13029 conftest$ac_exeext conftest.$ac_ext
13030 LIBS=$ac_check_lib_save_LIBS
13031 fi
13032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_internal_proj_create_from_wkt" >&5
13033 $as_echo "$ac_cv_lib_proj_internal_proj_create_from_wkt" >&6; }
13034 if test "x$ac_cv_lib_proj_internal_proj_create_from_wkt" = xyes; then :
13035 PROJ_FOUND=yes
13036 else
13037 PROJ_FOUND=no
13038 fi
13039
13040 if test "$PROJ_FOUND" = "no"; then
13041 LIBS="-L$with_proj/lib -lproj -lsqlite3 $ORIG_LIBS"
13042 unset ac_cv_lib_proj_internal_proj_create_from_wkt
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -lproj" >&5
13044 $as_echo_n "checking for internal_proj_create_from_wkt in -lproj... " >&6; }
13045 if ${ac_cv_lib_proj_internal_proj_create_from_wkt+:} false; then :
13046 $as_echo_n "(cached) " >&6
13047 else
13048 ac_check_lib_save_LIBS=$LIBS
13049 LIBS="-lproj $LIBS"
13050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051 /* end confdefs.h. */
13052
13053 /* Override any GCC internal prototype to avoid an error.
13054 Use char because int might match the return type of a GCC
13055 builtin and then its argument prototype would still apply. */
13056 #ifdef __cplusplus
13057 extern "C"
13058 #endif
13059 char internal_proj_create_from_wkt ();
13060 int
13061 main ()
13062 {
13063 return internal_proj_create_from_wkt ();
13064 ;
13065 return 0;
13066 }
13067 _ACEOF
13068 if ac_fn_c_try_link "$LINENO"; then :
13069 ac_cv_lib_proj_internal_proj_create_from_wkt=yes
13070 else
13071 ac_cv_lib_proj_internal_proj_create_from_wkt=no
13072 fi
13073 rm -f core conftest.err conftest.$ac_objext \
13074 conftest$ac_exeext conftest.$ac_ext
13075 LIBS=$ac_check_lib_save_LIBS
13076 fi
13077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_proj_internal_proj_create_from_wkt" >&5
13078 $as_echo "$ac_cv_lib_proj_internal_proj_create_from_wkt" >&6; }
13079 if test "x$ac_cv_lib_proj_internal_proj_create_from_wkt" = xyes; then :
13080 PROJ_FOUND=yes
13081 else
13082 PROJ_FOUND=no
13083 fi
13084
13085 fi
13086 if test "$PROJ_FOUND" = "yes"; then
13087 PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
13088 fi
13089 fi
13090 if test "$PROJ_FOUND" = "no"; then
13091 LIBS="-L$with_proj/lib -linternalproj $ORIG_LIBS"
13092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -linternalproj" >&5
13093 $as_echo_n "checking for internal_proj_create_from_wkt in -linternalproj... " >&6; }
13094 if ${ac_cv_lib_internalproj_internal_proj_create_from_wkt+:} false; then :
13095 $as_echo_n "(cached) " >&6
13096 else
13097 ac_check_lib_save_LIBS=$LIBS
13098 LIBS="-linternalproj $LIBS"
13099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13100 /* end confdefs.h. */
13101
13102 /* Override any GCC internal prototype to avoid an error.
13103 Use char because int might match the return type of a GCC
13104 builtin and then its argument prototype would still apply. */
13105 #ifdef __cplusplus
13106 extern "C"
13107 #endif
13108 char internal_proj_create_from_wkt ();
13109 int
13110 main ()
13111 {
13112 return internal_proj_create_from_wkt ();
13113 ;
13114 return 0;
13115 }
13116 _ACEOF
13117 if ac_fn_c_try_link "$LINENO"; then :
13118 ac_cv_lib_internalproj_internal_proj_create_from_wkt=yes
13119 else
13120 ac_cv_lib_internalproj_internal_proj_create_from_wkt=no
13121 fi
13122 rm -f core conftest.err conftest.$ac_objext \
13123 conftest$ac_exeext conftest.$ac_ext
13124 LIBS=$ac_check_lib_save_LIBS
13125 fi
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&5
13127 $as_echo "$ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&6; }
13128 if test "x$ac_cv_lib_internalproj_internal_proj_create_from_wkt" = xyes; then :
13129 PROJ_FOUND=yes
13130 else
13131 PROJ_FOUND=no
13132 fi
13133
13134 if test "$PROJ_FOUND" = "no"; then
13135 LIBS="-L$with_proj/lib -linternalproj -lsqlite3 $ORIG_LIBS"
13136 unset ac_cv_lib_internal_proj_internal_proj_create_from_wkt
13137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for internal_proj_create_from_wkt in -linternalproj" >&5
13138 $as_echo_n "checking for internal_proj_create_from_wkt in -linternalproj... " >&6; }
13139 if ${ac_cv_lib_internalproj_internal_proj_create_from_wkt+:} false; then :
13140 $as_echo_n "(cached) " >&6
13141 else
13142 ac_check_lib_save_LIBS=$LIBS
13143 LIBS="-linternalproj $LIBS"
13144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13145 /* end confdefs.h. */
13146
13147 /* Override any GCC internal prototype to avoid an error.
13148 Use char because int might match the return type of a GCC
13149 builtin and then its argument prototype would still apply. */
13150 #ifdef __cplusplus
13151 extern "C"
13152 #endif
13153 char internal_proj_create_from_wkt ();
13154 int
13155 main ()
13156 {
13157 return internal_proj_create_from_wkt ();
13158 ;
13159 return 0;
13160 }
13161 _ACEOF
13162 if ac_fn_c_try_link "$LINENO"; then :
13163 ac_cv_lib_internalproj_internal_proj_create_from_wkt=yes
13164 else
13165 ac_cv_lib_internalproj_internal_proj_create_from_wkt=no
13166 fi
13167 rm -f core conftest.err conftest.$ac_objext \
13168 conftest$ac_exeext conftest.$ac_ext
13169 LIBS=$ac_check_lib_save_LIBS
13170 fi
13171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&5
13172 $as_echo "$ac_cv_lib_internalproj_internal_proj_create_from_wkt" >&6; }
13173 if test "x$ac_cv_lib_internalproj_internal_proj_create_from_wkt" = xyes; then :
13174 PROJ_FOUND=yes
13175 else
13176 PROJ_FOUND=no
13177 fi
13178
13179 fi
13180 if test "$PROJ_FOUND" = "yes"; then
13181 PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
13182 fi
13183 fi
13184 if test "$PROJ_FOUND" = "no"; then
13185 as_fn_error $? "PROJ 6 symbols not found" "$LINENO" 5
13186 fi
13187 if test -r "$with_proj/include/proj.h" ; then
13188 PROJ_INCLUDE="$PROJ_INCLUDE -I$with_proj/include"
13189 { $as_echo "$as_me:${as_lineno-$LINENO}: proj.h found" >&5
13190 $as_echo "$as_me: proj.h found" >&6;}
13191 else
13192 as_fn_error $? "proj.h not found" "$LINENO" 5
13193 fi
13194 fi
13195 fi
13196
1688713197
1688813198
1688913199
1689013200 # Check whether --enable-towgs84 was given.
1689113201 if test "${enable_towgs84+set}" = set; then :
16892 enableval=$enable_towgs84; $as_echo "#define GEO_NORMALIZE_DISABLE_TOWGS84 1" >>confdefs.h
13202 enableval=$enable_towgs84;
13203 $as_echo "#define GEO_NORMALIZE_DISABLE_TOWGS84 /**/" >>confdefs.h
1689313204
1689413205 fi
1689513206
1883515146
1883615147
1883715148
18838 ac_config_files="$ac_config_files Makefile libxtiff/Makefile bin/Makefile man/Makefile man/man1/Makefile cmake/Makefile"
15149 ac_config_files="$ac_config_files Makefile libxtiff/Makefile bin/Makefile man/Makefile man/man1/Makefile cmake/Makefile test/Makefile"
1883915150
1884015151
1884115152 cat >confcache <<\_ACEOF
1897515286 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
1897615287 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1897715288 fi
18978 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
18979 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
18980 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18981 fi
1898215289 if test -z "${ZIP_IS_CONFIG_TRUE}" && test -z "${ZIP_IS_CONFIG_FALSE}"; then
1898315290 as_fn_error $? "conditional \"ZIP_IS_CONFIG\" was never defined.
1898415291 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1898915296 fi
1899015297 if test -z "${TIFF_IS_CONFIG_TRUE}" && test -z "${TIFF_IS_CONFIG_FALSE}"; then
1899115298 as_fn_error $? "conditional \"TIFF_IS_CONFIG\" was never defined.
18992 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18993 fi
18994 if test -z "${PROJ_IS_CONFIG_TRUE}" && test -z "${PROJ_IS_CONFIG_FALSE}"; then
18995 as_fn_error $? "conditional \"PROJ_IS_CONFIG\" was never defined.
18996 Usually this means the macro was only invoked conditionally." "$LINENO" 5
18997 fi
18998 if test -z "${PROJECTS_H_IS_CONFIG_TRUE}" && test -z "${PROJECTS_H_IS_CONFIG_FALSE}"; then
18999 as_fn_error $? "conditional \"PROJECTS_H_IS_CONFIG\" was never defined.
19000 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19001 fi
19002 if test -z "${CSV_IS_CONFIG_TRUE}" && test -z "${CSV_IS_CONFIG_FALSE}"; then
19003 as_fn_error $? "conditional \"CSV_IS_CONFIG\" was never defined.
1900415299 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1900515300 fi
1900615301 if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then
1948815783 # report actual input values of CONFIG_FILES etc. instead of their
1948915784 # values after options handling.
1949015785 ac_log="
19491 This file was extended by libgeotiff $as_me 1.4.3, which was
15786 This file was extended by libgeotiff $as_me 1.5.0, which was
1949215787 generated by GNU Autoconf 2.69. Invocation command line was
1949315788
1949415789 CONFIG_FILES = $CONFIG_FILES
1955415849 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1955515850 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1955615851 ac_cs_version="\\
19557 libgeotiff config.status 1.4.3
15852 libgeotiff config.status 1.5.0
1955815853 configured by $0, generated by GNU Autoconf 2.69,
1955915854 with options \\"\$ac_cs_config\\"
1956015855
1981816113 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
1981916114 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
1982016115 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
19821 compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
19822 predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
19823 postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
19824 predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
19825 postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
19826 compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
19827 LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
19828 reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
19829 reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19830 old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19831 compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
19832 GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
19833 lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
19834 lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
19835 lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
19836 lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
19837 lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
19838 archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
19839 enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
19840 export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
19841 whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
19842 compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
19843 old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19844 old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19845 archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19846 archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19847 module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19848 module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19849 with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
19850 allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
19851 no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
19852 hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
19853 hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
19854 hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
19855 hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
19856 hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
19857 hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
19858 hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
19859 inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
19860 link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
19861 always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
19862 export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19863 exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
19864 include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
19865 prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19866 postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
19867 file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
19868 hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
19869 compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
19870 predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
19871 postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
19872 predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
19873 postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
19874 compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
1987516116
1987616117 LTCC='$LTCC'
1987716118 LTCFLAGS='$LTCFLAGS'
1995316194 install_override_mode \
1995416195 finish_eval \
1995516196 old_striplib \
19956 striplib \
19957 compiler_lib_search_dirs \
19958 predep_objects \
19959 postdep_objects \
19960 predeps \
19961 postdeps \
19962 compiler_lib_search_path \
19963 LD_CXX \
19964 reload_flag_CXX \
19965 compiler_CXX \
19966 lt_prog_compiler_no_builtin_flag_CXX \
19967 lt_prog_compiler_pic_CXX \
19968 lt_prog_compiler_wl_CXX \
19969 lt_prog_compiler_static_CXX \
19970 lt_cv_prog_compiler_c_o_CXX \
19971 export_dynamic_flag_spec_CXX \
19972 whole_archive_flag_spec_CXX \
19973 compiler_needs_object_CXX \
19974 with_gnu_ld_CXX \
19975 allow_undefined_flag_CXX \
19976 no_undefined_flag_CXX \
19977 hardcode_libdir_flag_spec_CXX \
19978 hardcode_libdir_separator_CXX \
19979 exclude_expsyms_CXX \
19980 include_expsyms_CXX \
19981 file_list_spec_CXX \
19982 compiler_lib_search_dirs_CXX \
19983 predep_objects_CXX \
19984 postdep_objects_CXX \
19985 predeps_CXX \
19986 postdeps_CXX \
19987 compiler_lib_search_path_CXX; do
16197 striplib; do
1998816198 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1998916199 *[\\\\\\\`\\"\\\$]*)
1999016200 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2001516225 finish_cmds \
2001616226 sys_lib_search_path_spec \
2001716227 configure_time_dlsearch_path \
20018 configure_time_lt_sys_library_path \
20019 reload_cmds_CXX \
20020 old_archive_cmds_CXX \
20021 old_archive_from_new_cmds_CXX \
20022 old_archive_from_expsyms_cmds_CXX \
20023 archive_cmds_CXX \
20024 archive_expsym_cmds_CXX \
20025 module_cmds_CXX \
20026 module_expsym_cmds_CXX \
20027 export_symbols_cmds_CXX \
20028 prelink_cmds_CXX \
20029 postlink_cmds_CXX; do
16228 configure_time_lt_sys_library_path; do
2003016229 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
2003116230 *[\\\\\\\`\\"\\\$]*)
2003216231 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
2005016249 VERSION='$VERSION'
2005116250 RM='$RM'
2005216251 ofile='$ofile'
20053
20054
2005516252
2005616253
2005716254
2007316270 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
2007416271 "man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES man/man1/Makefile" ;;
2007516272 "cmake/Makefile") CONFIG_FILES="$CONFIG_FILES cmake/Makefile" ;;
16273 "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
2007616274
2007716275 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
2007816276 esac
2080617004
2080717005
2080817006 # The names of the tagged configurations supported by this script.
20809 available_tags='CXX '
17007 available_tags=''
2081017008
2081117009 # Configured defaults for sys_lib_dlsearch_path munging.
2081217010 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
2121017408
2121117409 # How to hardcode a shared library path into an executable.
2121217410 hardcode_action=$hardcode_action
21213
21214 # The directories searched by this compiler when creating a shared library.
21215 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
21216
21217 # Dependencies to place before and after the objects being linked to
21218 # create a shared library.
21219 predep_objects=$lt_predep_objects
21220 postdep_objects=$lt_postdep_objects
21221 predeps=$lt_predeps
21222 postdeps=$lt_postdeps
21223
21224 # The library search path used internally by the compiler when linking
21225 # a shared library.
21226 compiler_lib_search_path=$lt_compiler_lib_search_path
2122717411
2122817412 # ### END LIBTOOL CONFIG
2122917413
2131717501 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2131817502 chmod +x "$ofile"
2131917503
21320
21321 cat <<_LT_EOF >> "$ofile"
21322
21323 # ### BEGIN LIBTOOL TAG CONFIG: CXX
21324
21325 # The linker used to build libraries.
21326 LD=$lt_LD_CXX
21327
21328 # How to create reloadable object files.
21329 reload_flag=$lt_reload_flag_CXX
21330 reload_cmds=$lt_reload_cmds_CXX
21331
21332 # Commands used to build an old-style archive.
21333 old_archive_cmds=$lt_old_archive_cmds_CXX
21334
21335 # A language specific compiler.
21336 CC=$lt_compiler_CXX
21337
21338 # Is the compiler the GNU compiler?
21339 with_gcc=$GCC_CXX
21340
21341 # Compiler flag to turn off builtin functions.
21342 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
21343
21344 # Additional compiler flags for building library objects.
21345 pic_flag=$lt_lt_prog_compiler_pic_CXX
21346
21347 # How to pass a linker flag through the compiler.
21348 wl=$lt_lt_prog_compiler_wl_CXX
21349
21350 # Compiler flag to prevent dynamic linking.
21351 link_static_flag=$lt_lt_prog_compiler_static_CXX
21352
21353 # Does compiler simultaneously support -c and -o options?
21354 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
21355
21356 # Whether or not to add -lc for building shared libraries.
21357 build_libtool_need_lc=$archive_cmds_need_lc_CXX
21358
21359 # Whether or not to disallow shared libs when runtime libs are static.
21360 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
21361
21362 # Compiler flag to allow reflexive dlopens.
21363 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
21364
21365 # Compiler flag to generate shared objects directly from archives.
21366 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
21367
21368 # Whether the compiler copes with passing no objects directly.
21369 compiler_needs_object=$lt_compiler_needs_object_CXX
21370
21371 # Create an old-style archive from a shared archive.
21372 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
21373
21374 # Create a temporary old-style archive to link instead of a shared archive.
21375 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
21376
21377 # Commands used to build a shared archive.
21378 archive_cmds=$lt_archive_cmds_CXX
21379 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
21380
21381 # Commands used to build a loadable module if different from building
21382 # a shared archive.
21383 module_cmds=$lt_module_cmds_CXX
21384 module_expsym_cmds=$lt_module_expsym_cmds_CXX
21385
21386 # Whether we are building with GNU ld or not.
21387 with_gnu_ld=$lt_with_gnu_ld_CXX
21388
21389 # Flag that allows shared libraries with undefined symbols to be built.
21390 allow_undefined_flag=$lt_allow_undefined_flag_CXX
21391
21392 # Flag that enforces no undefined symbols.
21393 no_undefined_flag=$lt_no_undefined_flag_CXX
21394
21395 # Flag to hardcode \$libdir into a binary during linking.
21396 # This must work even if \$libdir does not exist
21397 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
21398
21399 # Whether we need a single "-rpath" flag with a separated argument.
21400 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
21401
21402 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
21403 # DIR into the resulting binary.
21404 hardcode_direct=$hardcode_direct_CXX
21405
21406 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
21407 # DIR into the resulting binary and the resulting library dependency is
21408 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
21409 # library is relocated.
21410 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
21411
21412 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
21413 # into the resulting binary.
21414 hardcode_minus_L=$hardcode_minus_L_CXX
21415
21416 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
21417 # into the resulting binary.
21418 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
21419
21420 # Set to "yes" if building a shared library automatically hardcodes DIR
21421 # into the library and all subsequent libraries and executables linked
21422 # against it.
21423 hardcode_automatic=$hardcode_automatic_CXX
21424
21425 # Set to yes if linker adds runtime paths of dependent libraries
21426 # to runtime path list.
21427 inherit_rpath=$inherit_rpath_CXX
21428
21429 # Whether libtool must link a program against all its dependency libraries.
21430 link_all_deplibs=$link_all_deplibs_CXX
21431
21432 # Set to "yes" if exported symbols are required.
21433 always_export_symbols=$always_export_symbols_CXX
21434
21435 # The commands to list exported symbols.
21436 export_symbols_cmds=$lt_export_symbols_cmds_CXX
21437
21438 # Symbols that should not be listed in the preloaded symbols.
21439 exclude_expsyms=$lt_exclude_expsyms_CXX
21440
21441 # Symbols that must always be exported.
21442 include_expsyms=$lt_include_expsyms_CXX
21443
21444 # Commands necessary for linking programs (against libraries) with templates.
21445 prelink_cmds=$lt_prelink_cmds_CXX
21446
21447 # Commands necessary for finishing linking programs.
21448 postlink_cmds=$lt_postlink_cmds_CXX
21449
21450 # Specify filename containing input files.
21451 file_list_spec=$lt_file_list_spec_CXX
21452
21453 # How to hardcode a shared library path into an executable.
21454 hardcode_action=$hardcode_action_CXX
21455
21456 # The directories searched by this compiler when creating a shared library.
21457 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
21458
21459 # Dependencies to place before and after the objects being linked to
21460 # create a shared library.
21461 predep_objects=$lt_predep_objects_CXX
21462 postdep_objects=$lt_postdep_objects_CXX
21463 predeps=$lt_predeps_CXX
21464 postdeps=$lt_postdeps_CXX
21465
21466 # The library search path used internally by the compiler when linking
21467 # a shared library.
21468 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
21469
21470 # ### END LIBTOOL TAG CONFIG: CXX
21471 _LT_EOF
21472
2147317504 ;;
2147417505
2147517506 esac
2153017561 echo " C compiler...............: ${CC} ${CFLAGS}"
2153117562
2153217563
21533 echo " C++ compiler.............: ${CXX} ${CXXFLAGS}"
21534
21535
2153617564
2153717565 echo " Debugging support........: ${enable_debug}"
2153817566
2155617584 echo " -PREFIX ........: ${TIFF_PREFIX}"
2155717585
2155817586
21559 echo " PROJ support......: ${PROJ_CONFIG}"
21560
21561
21562 echo " -INCLUDE .......: ${PROJ_INC}"
21563
21564
21565 echo " -PREFIX ........: ${PROJ_PREFIX}"
21566
21567
21568 echo " Incode CSV support: ${CSV_CONFIG}"
17587 echo " PROJ support......: yes"
17588
17589
17590 echo " -INCLUDE .......: ${PROJ_INCLUDE}"
2156917591
2157017592
2157117593
00
11
22 m4_define([VERSION_MAJOR], [1])
3 m4_define([VERSION_MINOR], [4])
4 m4_define([VERSION_POINT], [3])
3 m4_define([VERSION_MINOR], [5])
4 m4_define([VERSION_POINT], [0])
55 m4_define([GEOTIFF_VERSION],
66 [VERSION_MAJOR.VERSION_MINOR.VERSION_POINT])
77
2424 AM_INIT_AUTOMAKE
2525 AM_MAINTAINER_MODE
2626 AC_PROG_CC
27 AC_PROG_CXX
28 AC_PROG_CXXCPP
2927 AC_PROG_INSTALL
3028 AC_PROG_LN_S
3129 AC_PROG_MAKE_SET
4543 m4_define([debug_default],[no])
4644
4745 CFLAGS="$CFLAGS"
48 CXXFLAGS="$CXXFLAGS"
4946
5047 dnl We want to honor the users wishes with regard to linking.
5148 LIBS="$LDFLAGS $LIBS"
8178
8279 if test "x$enable_debug" = "xyes"; then
8380 CFLAGS="$CFLAGS -g -DDEBUG -Wall"
84 CXXFLAGS="$CXXFLAGS -g -DDEBUG -Wall"
8581 AC_MSG_RESULT(yes)
8682 else
8783 CFLAGS="$CFLAGS -O3 -DNDEBUG"
88 CXXFLAGS="$CXXFLAGS -O3 -DNDEBUG"
8984 AC_MSG_RESULT(no)
9085 fi
9186
139134 AC_MSG_RESULT([using zlib from $with_zip/include])
140135 HAVE_ZLIB="yes"
141136 ZIP_CONFIG="yes"
137 LIBS="-L${with_zip}/lib -lz $LIBS"
142138 fi
143139 fi
144140
231227 AC_SUBST([TIFF_PREFIX])
232228 AM_CONDITIONAL([TIFF_IS_CONFIG], [test ! x$TIFF_CONFIG = xno])
233229
234 dnl
235 dnl Try and find libproj.a, and projects.h
236 dnl
237
238 PROJ_CONFIG="no"
239
240 AC_ARG_WITH(proj, [ --with-proj[=ARG] Use PROJ.4 library (ARG=no or path)],[PROJ_HOME=$withval],[PROJ_HOME=])
241
242 if test "$PROJ_HOME" != "" -a "$PROJ_HOME" != "no" ; then
243 if test -d "$PROJ_HOME/src/pj_init.c" ; then
244 PROJ_HOME=$PROJ_HOME/src
230 dnl ---------------------------------------------------------------------------
231 dnl PROJ.6 related stuff
232 dnl ---------------------------------------------------------------------------
233
234 AC_MSG_CHECKING([for PROJ >= 6 library])
235
236 AC_ARG_WITH(proj,[ --with-proj=ARG Compile with PROJ.x (ARG=yes or path)],,)
237
238 PROJ_INCLUDE=""
239 if test "x$with_proj" = "xno" ; then
240
241 AC_MSG_ERROR([PROJ 6 is a required dependency.])
242
243 else
244
245 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,)
249 if test "$PROJ_FOUND" = "no"; then
250 AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
251 if test "$PROJ_FOUND" = "yes"; then
252 PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
253 fi
254 fi
255 if test "$PROJ_FOUND" = "no"; then
256 LIBS="-linternalproj $ORIG_LIBS"
257 AC_CHECK_LIB(internalproj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
258 if test "$PROJ_FOUND" = "yes"; then
259 PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
260 fi
261 fi
262 if test "$PROJ_FOUND" = "no"; then
263 AC_MSG_ERROR([PROJ 6 symbols not found])
264 fi
265 AC_CHECK_HEADERS([proj.h])
266 if test "$ac_cv_header_proj_h" = "yes" ; then
267 AC_MSG_NOTICE([proj.h found])
268 else
269 AC_MSG_ERROR([proj.h not found])
270 fi
271 else
272
273 ORIG_LIBS="$LIBS"
274 LIBS="-L$with_proj/lib -lproj $ORIG_LIBS"
275 AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
276 if test "$PROJ_FOUND" = "no"; then
277 LIBS="-L$with_proj/lib -lproj -lsqlite3 $ORIG_LIBS"
278 unset ac_cv_lib_proj_proj_create_from_wkt
279 AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
280 fi
281 if test "$PROJ_FOUND" = "no"; then
282 LIBS="-L$with_proj/lib -lproj $ORIG_LIBS"
283 AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
284 if test "$PROJ_FOUND" = "no"; then
285 LIBS="-L$with_proj/lib -lproj -lsqlite3 $ORIG_LIBS"
286 unset ac_cv_lib_proj_internal_proj_create_from_wkt
287 AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
288 fi
289 if test "$PROJ_FOUND" = "yes"; then
290 PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
291 fi
292 fi
293 if test "$PROJ_FOUND" = "no"; then
294 LIBS="-L$with_proj/lib -linternalproj $ORIG_LIBS"
295 AC_CHECK_LIB(internalproj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
296 if test "$PROJ_FOUND" = "no"; then
297 LIBS="-L$with_proj/lib -linternalproj -lsqlite3 $ORIG_LIBS"
298 unset ac_cv_lib_internal_proj_internal_proj_create_from_wkt
299 AC_CHECK_LIB(internalproj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
300 fi
301 if test "$PROJ_FOUND" = "yes"; then
302 PROJ_INCLUDE="-DPROJ_RENAME_SYMBOLS"
303 fi
304 fi
305 if test "$PROJ_FOUND" = "no"; then
306 AC_MSG_ERROR([PROJ 6 symbols not found])
307 fi
308 if test -r "$with_proj/include/proj.h" ; then
309 PROJ_INCLUDE="$PROJ_INCLUDE -I$with_proj/include"
310 AC_MSG_NOTICE([proj.h found])
311 else
312 AC_MSG_ERROR([proj.h not found])
313 fi
245314 fi
246
247 dnl Old PROJ.4 build tree, without automake
248 if test -f "$PROJ_HOME/libproj.a" -a -f "$PROJ_HOME/proj_api.h" ; then
249 PROJ_LIB=$PROJ_HOME/libproj.a
250 PROJ_INC=$PROJ_HOME
251 PROJ_CONFIG="yes"
252
253 dnl New PROJ.4 build tree, with automake
254 elif test -f "$PROJ_HOME/.libs/libproj.a" -a -f "$PROJ_HOME/proj_api.h" ; then
255 PROJ_LIB=$PROJ_HOME/.libs/libproj.a
256 PROJ_INC=$PROJ_HOME
257
258 PROJ_CONFIG="yes"
259
260 dnl Installed tree in an odd place
261 elif test \( -f "$PROJ_HOME/lib/libproj.a" -o -f "$PROJ_HOME/lib/libproj.so" \) -a -f "$PROJ_HOME/include/proj_api.h"; then
262 PROJ_LIB="-L$PROJ_HOME/lib -lproj"
263 PROJ_INC=$PROJ_HOME/include
264
265 PROJ_CONFIG="yes"
266 else
267 echo "PROJ_HOME=$PROJ_HOME, but either proj_api.h or libproj.a not found!"
268 fi
269 fi
270
271
272 if test "$PROJ_HOME" = "no" ; then
273 echo "PROJ.4 support disabled."
274
275 elif test "$PROJ_LIB" != "" -a "$PROJ_INC" != "" ; then
276 echo "Found $PROJ_LIB"
277 echo "Found $PROJ_INC/proj_api.h"
278
279 LIBS="$PROJ_LIB $LIBS"
280 PROJ_INC=-I$PROJ_INC
281
282 AC_SUBST(PROJ_INC,$PROJ_INC)
283 AC_DEFINE(HAVE_PROJECTS_H)
284 AC_DEFINE(HAVE_LIBPROJ)
285 AC_SUBST([HAVE_LIBPROJ])
286 PROJ_CONFIG="yes"
287
288 else
289 AC_CHECK_LIB(proj,pj_init,,,-lm)
290 AC_CHECK_HEADERS(proj_api.h,,)
291 PROJ_CONFIG="yes"
292 fi
293
294 AM_CONDITIONAL([PROJ_IS_CONFIG], [test ! x$PROJ_CONFIG = xno])
295 AM_CONDITIONAL([PROJECTS_H_IS_CONFIG], [test ! x$PROJECTS_H_CONFIG = xno])
296
297
298 dnl
299 dnl Has the user requested "incode" EPSG tables, overriding the
300 dnl default use of EPSG tables in csv files? Temporarily unvailable.
301 dnl
302
303 CSV_CONFIG="no"
304 AC_ARG_ENABLE(incode-epsg, [ --enable-incode-epsg Use C code EPSG tables],, enable_incode_epsg=no)
305
306 if test "$enable_incode_epsg" != "no" -o "$enable_incode_epsg" = "" ; then
307
308 AC_MSG_CHECKING([if EPSG tables will be read from .csv files])
309 AC_MSG_RESULT([yes])
310 CSV_CONFIG="yes"
311 else
312 AC_MSG_CHECKING([if EPSG tables will be read from .csv files])
313 AC_MSG_RESULT([no])
314
315 fi
316 AM_CONDITIONAL([CSV_IS_CONFIG], [test ! x$CSV_CONFIG = xno])
317
318
319 AC_ARG_ENABLE(towgs84, [ --disable-towgs84 Disable WGS84 parameters for binary compatibility with pre-1.4.1], AC_DEFINE(GEO_NORMALIZE_DISABLE_TOWGS84))
315 fi
316
317 AC_SUBST(PROJ_INCLUDE)
318
319
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]))
320321
321322 dnl #########################################################################
322323 dnl Doxygen settings
346347 man/Makefile
347348 man/man1/Makefile
348349 cmake/Makefile
350 test/Makefile
349351 ])
350352
351353 AC_OUTPUT
360362 LOC_MSG([ Version..................: ${RELEASE_VERSION}])
361363 LOC_MSG([ Installation directory...: ${prefix}])
362364 LOC_MSG([ C compiler...............: ${CC} ${CFLAGS}])
363 LOC_MSG([ C++ compiler.............: ${CXX} ${CXXFLAGS}])
364365
365366 LOC_MSG([ Debugging support........: ${enable_debug}])
366367 LOC_MSG()
370371 LOC_MSG([ TIFF support......: ${TIFF_CONFIG}])
371372 LOC_MSG([ -INCLUDE .......: ${TIFF_INC}])
372373 LOC_MSG([ -PREFIX ........: ${TIFF_PREFIX}])
373 LOC_MSG([ PROJ support......: ${PROJ_CONFIG}])
374 LOC_MSG([ -INCLUDE .......: ${PROJ_INC}])
375 LOC_MSG([ -PREFIX ........: ${PROJ_PREFIX}])
376 LOC_MSG([ Incode CSV support: ${CSV_CONFIG}])
374 LOC_MSG([ PROJ support......: yes])
375 LOC_MSG([ -INCLUDE .......: ${PROJ_INCLUDE}])
377376
378377 LOC_MSG([ LIBS.....................: ${LIBS}])
379378 LOC_MSG()
+0
-959
cpl_csv.c less more
0 /******************************************************************************
1 * Copyright (c) 1999, Frank Warmerdam
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a
4 * copy of this software and associated documentation files (the "Software"),
5 * to deal in the Software without restriction, including without limitation
6 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 * and/or sell copies of the Software, and to permit persons to whom the
8 * Software is furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included
11 * in all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19 * DEALINGS IN THE SOFTWARE.
20 ******************************************************************************
21 *
22 * cpl_csv.c: Support functions for accessing CSV files.
23 */
24
25 #include "cpl_serv.h"
26 #include "geo_tiffp.h"
27
28 /* ==================================================================== */
29 /* The CSVTable is a persistant set of info about an open CSV */
30 /* table. While it doesn't currently maintain a record index, */
31 /* or in-memory copy of the table, it could be changed to do so */
32 /* in the future. */
33 /* ==================================================================== */
34 typedef struct ctb {
35 FILE *fp;
36
37 struct ctb *psNext;
38
39 char *pszFilename;
40
41 char **papszFieldNames;
42
43 char **papszRecFields;
44
45 int iLastLine;
46
47 /* Cache for whole file */
48 int nLineCount;
49 char **papszLines;
50 int *panLineIndex;
51 char *pszRawData;
52 } CSVTable;
53
54 static CSVTable *psCSVTableList = NULL;
55
56 /************************************************************************/
57 /* CSVAccess() */
58 /* */
59 /* This function will fetch a handle to the requested table. */
60 /* If not found in the ``open table list'' the table will be */
61 /* opened and added to the list. Eventually this function may */
62 /* become public with an abstracted return type so that */
63 /* applications can set options about the table. For now this */
64 /* isn't done. */
65 /************************************************************************/
66
67 static CSVTable *gtCSVAccess( const char * pszFilename )
68
69 {
70 CSVTable *psTable;
71 FILE *fp;
72
73 if( pszFilename == NULL )
74 return NULL;
75
76 /* -------------------------------------------------------------------- */
77 /* Is the table already in the list. */
78 /* -------------------------------------------------------------------- */
79 for( psTable = psCSVTableList; psTable != NULL; psTable = psTable->psNext )
80 {
81 if( EQUAL(psTable->pszFilename,pszFilename) )
82 {
83 /*
84 * Eventually we should consider promoting to the front of
85 * the list to accelerate frequently accessed tables.
86 */
87
88 return( psTable );
89 }
90 }
91
92 /* -------------------------------------------------------------------- */
93 /* If not, try to open it. */
94 /* -------------------------------------------------------------------- */
95 fp = VSIFOpen( pszFilename, "rb" );
96 if( fp == NULL )
97 return NULL;
98
99 /* -------------------------------------------------------------------- */
100 /* Create an information structure about this table, and add to */
101 /* the front of the list. */
102 /* -------------------------------------------------------------------- */
103 psTable = (CSVTable *) CPLCalloc(sizeof(CSVTable),1);
104
105 psTable->fp = fp;
106 psTable->pszFilename = CPLStrdup( pszFilename );
107 psTable->psNext = psCSVTableList;
108
109 psCSVTableList = psTable;
110
111 /* -------------------------------------------------------------------- */
112 /* Read the table header record containing the field names. */
113 /* -------------------------------------------------------------------- */
114 psTable->papszFieldNames = CSVReadParseLine( fp );
115
116 return( psTable );
117 }
118
119 /************************************************************************/
120 /* CSVDeaccess() */
121 /************************************************************************/
122
123 void CSVDeaccess( const char * pszFilename )
124
125 {
126 CSVTable *psLast, *psTable;
127
128 /* -------------------------------------------------------------------- */
129 /* A NULL means deaccess all tables. */
130 /* -------------------------------------------------------------------- */
131 if( pszFilename == NULL )
132 {
133 while( psCSVTableList != NULL )
134 CSVDeaccess( psCSVTableList->pszFilename );
135
136 return;
137 }
138
139 /* -------------------------------------------------------------------- */
140 /* Find this table. */
141 /* -------------------------------------------------------------------- */
142 psLast = NULL;
143 for( psTable = psCSVTableList;
144 psTable != NULL && !EQUAL(psTable->pszFilename,pszFilename);
145 psTable = psTable->psNext )
146 {
147 psLast = psTable;
148 }
149
150 if( psTable == NULL )
151 {
152 return;
153 }
154
155 /* -------------------------------------------------------------------- */
156 /* Remove the link from the list. */
157 /* -------------------------------------------------------------------- */
158 if( psLast != NULL )
159 psLast->psNext = psTable->psNext;
160 else
161 psCSVTableList = psTable->psNext;
162
163 /* -------------------------------------------------------------------- */
164 /* Free the table. */
165 /* -------------------------------------------------------------------- */
166 if( psTable->fp != NULL )
167 VSIFClose( psTable->fp );
168
169 CSLDestroy( psTable->papszFieldNames );
170 CSLDestroy( psTable->papszRecFields );
171 CPLFree( psTable->pszFilename );
172 CPLFree( psTable->panLineIndex );
173 CPLFree( psTable->pszRawData );
174 CPLFree( psTable->papszLines );
175
176 CPLFree( psTable );
177
178 CPLReadLine( NULL );
179 }
180
181 /************************************************************************/
182 /* CSVSplitLine() */
183 /* */
184 /* Tokenize a CSV line into fields in the form of a string */
185 /* list. This is used instead of the CPLTokenizeString() */
186 /* because it provides correct CSV escaping and quoting */
187 /* semantics. */
188 /************************************************************************/
189
190 static char **CSVSplitLine( const char *pszString )
191
192 {
193 char **papszRetList = NULL;
194 char *pszToken;
195 int nTokenMax, nTokenLen;
196
197 pszToken = (char *) CPLCalloc(10,1);
198 nTokenMax = 10;
199
200 while( pszString != NULL && *pszString != '\0' )
201 {
202 int bInString = FALSE;
203
204 nTokenLen = 0;
205
206 /* Try to find the next delimeter, marking end of token */
207 for( ; *pszString != '\0'; pszString++ )
208 {
209
210 /* End if this is a delimeter skip it and break. */
211 if( !bInString && *pszString == ',' )
212 {
213 pszString++;
214 break;
215 }
216
217 if( *pszString == '"' )
218 {
219 if( !bInString || pszString[1] != '"' )
220 {
221 bInString = !bInString;
222 continue;
223 }
224 else /* doubled quotes in string resolve to one quote */
225 {
226 pszString++;
227 }
228 }
229
230 if( nTokenLen >= nTokenMax-2 )
231 {
232 nTokenMax = nTokenMax * 2 + 10;
233 pszToken = (char *) CPLRealloc( pszToken, nTokenMax );
234 }
235
236 pszToken[nTokenLen] = *pszString;
237 nTokenLen++;
238 }
239
240 pszToken[nTokenLen] = '\0';
241 papszRetList = CSLAddString( papszRetList, pszToken );
242
243 /* If the last token is an empty token, then we have to catch
244 * it now, otherwise we won't reenter the loop and it will be lost.
245 */
246 if ( *pszString == '\0' && *(pszString-1) == ',' )
247 {
248 papszRetList = CSLAddString( papszRetList, "" );
249 }
250 }
251
252 if( papszRetList == NULL )
253 papszRetList = (char **) CPLCalloc(sizeof(char *),1);
254
255 CPLFree( pszToken );
256
257 return papszRetList;
258 }
259
260 /************************************************************************/
261 /* CSVFindNextLine() */
262 /* */
263 /* Find the start of the next line, while at the same time zero */
264 /* terminating this line. Take into account that there may be */
265 /* newline indicators within quoted strings, and that quotes */
266 /* can be escaped with a backslash. */
267 /************************************************************************/
268
269 static char *CSVFindNextLine( char *pszThisLine )
270
271 {
272 int nQuoteCount = 0, i;
273
274 for( i = 0; pszThisLine[i] != '\0'; i++ )
275 {
276 if( pszThisLine[i] == '\"'
277 && (i == 0 || pszThisLine[i-1] != '\\') )
278 nQuoteCount++;
279
280 if( (pszThisLine[i] == 10 || pszThisLine[i] == 13)
281 && (nQuoteCount % 2) == 0 )
282 break;
283 }
284
285 while( pszThisLine[i] == 10 || pszThisLine[i] == 13 )
286 pszThisLine[i++] = '\0';
287
288 if( pszThisLine[i] == '\0' )
289 return NULL;
290 else
291 return pszThisLine + i;
292 }
293
294 /************************************************************************/
295 /* CSVIngest() */
296 /* */
297 /* Load entire file into memory and setup index if possible. */
298 /************************************************************************/
299
300 static void CSVIngest( const char *pszFilename )
301
302 {
303 CSVTable *psTable = gtCSVAccess( pszFilename );
304 int nFileLen, i, nMaxLineCount, iLine = 0;
305 char *pszThisLine;
306
307 if( psTable->pszRawData != NULL )
308 return;
309
310 /* -------------------------------------------------------------------- */
311 /* Ingest whole file. */
312 /* -------------------------------------------------------------------- */
313 VSIFSeek( psTable->fp, 0, SEEK_END );
314 nFileLen = VSIFTell( psTable->fp );
315 VSIRewind( psTable->fp );
316
317 psTable->pszRawData = (char *) CPLMalloc(nFileLen+1);
318 if( (int) VSIFRead( psTable->pszRawData, 1, nFileLen, psTable->fp )
319 != nFileLen )
320 {
321 CPLFree( psTable->pszRawData );
322 psTable->pszRawData = NULL;
323
324 CPLError( CE_Failure, CPLE_FileIO, "Read of file %s failed.",
325 psTable->pszFilename );
326 return;
327 }
328
329 psTable->pszRawData[nFileLen] = '\0';
330
331 /* -------------------------------------------------------------------- */
332 /* Get count of newlines so we can allocate line array. */
333 /* -------------------------------------------------------------------- */
334 nMaxLineCount = 0;
335 for( i = 0; i < nFileLen; i++ )
336 {
337 if( psTable->pszRawData[i] == 10 )
338 nMaxLineCount++;
339 }
340
341 psTable->papszLines = (char **) CPLCalloc(sizeof(char*),nMaxLineCount);
342
343 /* -------------------------------------------------------------------- */
344 /* Build a list of record pointers into the raw data buffer */
345 /* based on line terminators. Zero terminate the line */
346 /* strings. */
347 /* -------------------------------------------------------------------- */
348 /* skip header line */
349 pszThisLine = CSVFindNextLine( psTable->pszRawData );
350
351 while( pszThisLine != NULL && iLine < nMaxLineCount )
352 {
353 psTable->papszLines[iLine++] = pszThisLine;
354 pszThisLine = CSVFindNextLine( pszThisLine );
355 }
356
357 psTable->nLineCount = iLine;
358
359 /* -------------------------------------------------------------------- */
360 /* Allocate and populate index array. Ensure they are in */
361 /* ascending order so that binary searches can be done on the */
362 /* array. */
363 /* -------------------------------------------------------------------- */
364 psTable->panLineIndex = (int *) CPLMalloc(sizeof(int)*psTable->nLineCount);
365 for( i = 0; i < psTable->nLineCount; i++ )
366 {
367 psTable->panLineIndex[i] = atoi(psTable->papszLines[i]);
368
369 if( i > 0 && psTable->panLineIndex[i] < psTable->panLineIndex[i-1] )
370 {
371 CPLFree( psTable->panLineIndex );
372 psTable->panLineIndex = NULL;
373 break;
374 }
375 }
376
377 psTable->iLastLine = -1;
378
379 /* -------------------------------------------------------------------- */
380 /* We should never need the file handle against, so close it. */
381 /* -------------------------------------------------------------------- */
382 VSIFClose( psTable->fp );
383 psTable->fp = NULL;
384 }
385
386 /************************************************************************/
387 /* CSVReadParseLine() */
388 /* */
389 /* Read one line, and return split into fields. The return */
390 /* result is a stringlist, in the sense of the CSL functions. */
391 /************************************************************************/
392
393 char **CSVReadParseLine( FILE * fp )
394
395 {
396 const char *pszLine;
397 char *pszWorkLine;
398 char **papszReturn;
399
400 CPLAssert( fp != NULL );
401 if( fp == NULL )
402 return( NULL );
403
404 pszLine = CPLReadLine( fp );
405 if( pszLine == NULL )
406 return( NULL );
407
408 /* -------------------------------------------------------------------- */
409 /* If there are no quotes, then this is the simple case. */
410 /* Parse, and return tokens. */
411 /* -------------------------------------------------------------------- */
412 if( strchr(pszLine,'\"') == NULL )
413 return CSVSplitLine( pszLine );
414
415 /* -------------------------------------------------------------------- */
416 /* We must now count the quotes in our working string, and as */
417 /* long as it is odd, keep adding new lines. */
418 /* -------------------------------------------------------------------- */
419 pszWorkLine = CPLStrdup( pszLine );
420
421 while( TRUE )
422 {
423 int i, nCount = 0;
424
425 for( i = 0; pszWorkLine[i] != '\0'; i++ )
426 {
427 if( pszWorkLine[i] == '\"'
428 && (i == 0 || pszWorkLine[i-1] != '\\') )
429 nCount++;
430 }
431
432 if( nCount % 2 == 0 )
433 break;
434
435 pszLine = CPLReadLine( fp );
436 if( pszLine == NULL )
437 break;
438
439 pszWorkLine = (char *)
440 CPLRealloc(pszWorkLine,
441 strlen(pszWorkLine) + strlen(pszLine) + 1);
442 strcat( pszWorkLine, pszLine );
443 }
444
445 papszReturn = CSVSplitLine( pszWorkLine );
446
447 CPLFree( pszWorkLine );
448
449 return papszReturn;
450 }
451
452 /************************************************************************/
453 /* CSVCompare() */
454 /* */
455 /* Compare a field to a search value using a particular */
456 /* criteria. */
457 /************************************************************************/
458
459 static int CSVCompare( const char * pszFieldValue, const char * pszTarget,
460 CSVCompareCriteria eCriteria )
461
462 {
463 if( eCriteria == CC_ExactString )
464 {
465 return( strcmp( pszFieldValue, pszTarget ) == 0 );
466 }
467 else if( eCriteria == CC_ApproxString )
468 {
469 return( EQUAL( pszFieldValue, pszTarget ) );
470 }
471 else if( eCriteria == CC_Integer )
472 {
473 return( atoi(pszFieldValue) == atoi(pszTarget) );
474 }
475
476 return FALSE;
477 }
478
479 /************************************************************************/
480 /* CSVScanLines() */
481 /* */
482 /* Read the file scanline for lines where the key field equals */
483 /* the indicated value with the suggested comparison criteria. */
484 /* Return the first matching line split into fields. */
485 /************************************************************************/
486
487 char **CSVScanLines( FILE *fp, int iKeyField, const char * pszValue,
488 CSVCompareCriteria eCriteria )
489
490 {
491 char **papszFields = NULL;
492 int bSelected = FALSE, nTestValue;
493
494 CPLAssert( pszValue != NULL );
495 CPLAssert( iKeyField >= 0 );
496 CPLAssert( fp != NULL );
497
498 nTestValue = atoi(pszValue);
499
500 while( !bSelected ) {
501 papszFields = CSVReadParseLine( fp );
502 if( papszFields == NULL )
503 return( NULL );
504
505 if( CSLCount( papszFields ) < iKeyField+1 )
506 {
507 /* not selected */
508 }
509 else if( eCriteria == CC_Integer
510 && atoi(papszFields[iKeyField]) == nTestValue )
511 {
512 bSelected = TRUE;
513 }
514 else
515 {
516 bSelected = CSVCompare( papszFields[iKeyField], pszValue,
517 eCriteria );
518 }
519
520 if( !bSelected )
521 {
522 CSLDestroy( papszFields );
523 papszFields = NULL;
524 }
525 }
526
527 return( papszFields );
528 }
529
530 /************************************************************************/
531 /* CSVScanLinesIndexed() */
532 /* */
533 /* Read the file scanline for lines where the key field equals */
534 /* the indicated value with the suggested comparison criteria. */
535 /* Return the first matching line split into fields. */
536 /************************************************************************/
537
538 static char **
539 CSVScanLinesIndexed( CSVTable *psTable, int nKeyValue )
540
541 {
542 int iTop, iBottom, iMiddle, iResult = -1;
543
544 CPLAssert( psTable->panLineIndex != NULL );
545
546 /* -------------------------------------------------------------------- */
547 /* Find target record with binary search. */
548 /* -------------------------------------------------------------------- */
549 iTop = psTable->nLineCount-1;
550 iBottom = 0;
551
552 while( iTop >= iBottom )
553 {
554 iMiddle = (iTop + iBottom) / 2;
555 if( psTable->panLineIndex[iMiddle] > nKeyValue )
556 iTop = iMiddle - 1;
557 else if( psTable->panLineIndex[iMiddle] < nKeyValue )
558 iBottom = iMiddle + 1;
559 else
560 {
561 iResult = iMiddle;
562 break;
563 }
564 }
565
566 if( iResult == -1 )
567 return NULL;
568
569 /* -------------------------------------------------------------------- */
570 /* Parse target line, and update iLastLine indicator. */
571 /* -------------------------------------------------------------------- */
572 psTable->iLastLine = iResult;
573
574 return CSVSplitLine( psTable->papszLines[iResult] );
575 }
576
577 /************************************************************************/
578 /* CSVScanLinesIngested() */
579 /* */
580 /* Read the file scanline for lines where the key field equals */
581 /* the indicated value with the suggested comparison criteria. */
582 /* Return the first matching line split into fields. */
583 /************************************************************************/
584
585 static char **
586 CSVScanLinesIngested( CSVTable *psTable, int iKeyField, const char * pszValue,
587 CSVCompareCriteria eCriteria )
588
589 {
590 char **papszFields = NULL;
591 int bSelected = FALSE, nTestValue;
592
593 CPLAssert( pszValue != NULL );
594 CPLAssert( iKeyField >= 0 );
595
596 nTestValue = atoi(pszValue);
597
598 /* -------------------------------------------------------------------- */
599 /* Short cut for indexed files. */
600 /* -------------------------------------------------------------------- */
601 if( iKeyField == 0 && eCriteria == CC_Integer
602 && psTable->panLineIndex != NULL )
603 return CSVScanLinesIndexed( psTable, nTestValue );
604
605 /* -------------------------------------------------------------------- */
606 /* Scan from in-core lines. */
607 /* -------------------------------------------------------------------- */
608 while( !bSelected && psTable->iLastLine+1 < psTable->nLineCount ) {
609 psTable->iLastLine++;
610 papszFields = CSVSplitLine( psTable->papszLines[psTable->iLastLine] );
611
612 if( CSLCount( papszFields ) < iKeyField+1 )
613 {
614 /* not selected */
615 }
616 else if( eCriteria == CC_Integer
617 && atoi(papszFields[iKeyField]) == nTestValue )
618 {
619 bSelected = TRUE;
620 }
621 else
622 {
623 bSelected = CSVCompare( papszFields[iKeyField], pszValue,
624 eCriteria );
625 }
626
627 if( !bSelected )
628 {
629 CSLDestroy( papszFields );
630 papszFields = NULL;
631 }
632 }
633
634 return( papszFields );
635 }
636
637 /************************************************************************/
638 /* CSVScanFile() */
639 /* */
640 /* Scan a whole file using criteria similar to above, but also */
641 /* taking care of file opening and closing. */
642 /************************************************************************/
643
644 char **CSVScanFile( const char * pszFilename, int iKeyField,
645 const char * pszValue, CSVCompareCriteria eCriteria )
646
647 {
648 CSVTable *psTable;
649
650 /* -------------------------------------------------------------------- */
651 /* Get access to the table. */
652 /* -------------------------------------------------------------------- */
653 CPLAssert( pszFilename != NULL );
654
655 if( iKeyField < 0 )
656 return NULL;
657
658 psTable = gtCSVAccess( pszFilename );
659 if( psTable == NULL )
660 return NULL;
661
662 CSVIngest( pszFilename );
663
664 /* -------------------------------------------------------------------- */
665 /* Does the current record match the criteria? If so, just */
666 /* return it again. */
667 /* -------------------------------------------------------------------- */
668 if( iKeyField >= 0
669 && iKeyField < CSLCount(psTable->papszRecFields)
670 && CSVCompare(pszValue,psTable->papszRecFields[iKeyField],eCriteria) )
671 {
672 return psTable->papszRecFields;
673 }
674
675 /* -------------------------------------------------------------------- */
676 /* Scan the file from the beginning, replacing the ``current */
677 /* record'' in our structure with the one that is found. */
678 /* -------------------------------------------------------------------- */
679 psTable->iLastLine = -1;
680 CSLDestroy( psTable->papszRecFields );
681
682 if( psTable->pszRawData != NULL )
683 psTable->papszRecFields =
684 CSVScanLinesIngested( psTable, iKeyField, pszValue, eCriteria );
685 else
686 {
687 VSIRewind( psTable->fp );
688 CPLReadLine( psTable->fp ); /* throw away the header line */
689
690 psTable->papszRecFields =
691 CSVScanLines( psTable->fp, iKeyField, pszValue, eCriteria );
692 }
693
694 return( psTable->papszRecFields );
695 }
696
697 /************************************************************************/
698 /* CPLGetFieldId() */
699 /* */
700 /* Read the first record of a CSV file (rewinding to be sure), */
701 /* and find the field with the indicated name. Returns -1 if */
702 /* it fails to find the field name. Comparison is case */
703 /* insensitive, but otherwise exact. After this function has */
704 /* been called the file pointer will be positioned just after */
705 /* the first record. */
706 /************************************************************************/
707
708 int CSVGetFieldId( FILE * fp, const char * pszFieldName )
709
710 {
711 char **papszFields;
712 int i;
713
714 CPLAssert( fp != NULL && pszFieldName != NULL );
715
716 VSIRewind( fp );
717
718 papszFields = CSVReadParseLine( fp );
719 for( i = 0; papszFields != NULL && papszFields[i] != NULL; i++ )
720 {
721 if( EQUAL(papszFields[i],pszFieldName) )
722 {
723 CSLDestroy( papszFields );
724 return i;
725 }
726 }
727
728 CSLDestroy( papszFields );
729
730 return -1;
731 }
732
733 /************************************************************************/
734 /* CSVGetFileFieldId() */
735 /* */
736 /* Same as CPLGetFieldId(), except that we get the file based */
737 /* on filename, rather than having an existing handle. */
738 /************************************************************************/
739
740 int CSVGetFileFieldId( const char * pszFilename, const char * pszFieldName )
741
742 {
743 CSVTable *psTable;
744 int i;
745
746 /* -------------------------------------------------------------------- */
747 /* Get access to the table. */
748 /* -------------------------------------------------------------------- */
749 CPLAssert( pszFilename != NULL );
750
751 psTable = gtCSVAccess( pszFilename );
752 if( psTable == NULL )
753 return -1;
754
755 /* -------------------------------------------------------------------- */
756 /* Find the requested field. */
757 /* -------------------------------------------------------------------- */
758 for( i = 0;
759 psTable->papszFieldNames != NULL
760 && psTable->papszFieldNames[i] != NULL;
761 i++ )
762 {
763 if( EQUAL(psTable->papszFieldNames[i],pszFieldName) )
764 {
765 return i;
766 }
767 }
768
769 return -1;
770 }
771
772
773 /************************************************************************/
774 /* CSVScanFileByName() */
775 /* */
776 /* Same as CSVScanFile(), but using a field name instead of a */
777 /* field number. */
778 /************************************************************************/
779
780 char **CSVScanFileByName( const char * pszFilename,
781 const char * pszKeyFieldName,
782 const char * pszValue, CSVCompareCriteria eCriteria )
783
784 {
785 int iKeyField;
786
787 iKeyField = CSVGetFileFieldId( pszFilename, pszKeyFieldName );
788 if( iKeyField == -1 )
789 return NULL;
790
791 return( CSVScanFile( pszFilename, iKeyField, pszValue, eCriteria ) );
792 }
793
794 /************************************************************************/
795 /* CSVGetField() */
796 /* */
797 /* The all-in-one function to fetch a particular field value */
798 /* from a CSV file. Note this function will return an empty */
799 /* string, rather than NULL if it fails to find the desired */
800 /* value for some reason. The caller can't establish that the */
801 /* fetch failed. */
802 /************************************************************************/
803
804 const char *CSVGetField( const char * pszFilename,
805 const char * pszKeyFieldName,
806 const char * pszKeyFieldValue,
807 CSVCompareCriteria eCriteria,
808 const char * pszTargetField )
809
810 {
811 CSVTable *psTable;
812 char **papszRecord;
813 int iTargetField;
814
815 /* -------------------------------------------------------------------- */
816 /* Find the table. */
817 /* -------------------------------------------------------------------- */
818 psTable = gtCSVAccess( pszFilename );
819 if( psTable == NULL )
820 return "";
821
822 /* -------------------------------------------------------------------- */
823 /* Find the correct record. */
824 /* -------------------------------------------------------------------- */
825 papszRecord = CSVScanFileByName( pszFilename, pszKeyFieldName,
826 pszKeyFieldValue, eCriteria );
827
828 if( papszRecord == NULL )
829 return "";
830
831 /* -------------------------------------------------------------------- */
832 /* Figure out which field we want out of this. */
833 /* -------------------------------------------------------------------- */
834 iTargetField = CSVGetFileFieldId( pszFilename, pszTargetField );
835 if( iTargetField < 0 )
836 return "";
837
838 if( iTargetField >= CSLCount( papszRecord ) )
839 return "";
840
841 return( papszRecord[iTargetField] );
842 }
843
844 /************************************************************************/
845 /* CSVFilename() */
846 /* */
847 /* Return the full path to a particular CSV file. This will */
848 /* eventually be something the application can override. */
849 /************************************************************************/
850
851 static const char *(*pfnCSVFilenameHook)(const char *) = NULL;
852
853 const char * CSVFilename( const char *pszBasename )
854
855 {
856 static char szPath[512];
857
858 if( pfnCSVFilenameHook == NULL )
859 {
860 FILE *fp = NULL;
861
862 if( getenv("GEOTIFF_CSV") != NULL )
863 {
864 sprintf( szPath, "%s/%s", getenv("GEOTIFF_CSV"), pszBasename );
865 }
866 #ifdef CSV_DATA_DIR
867 else
868 {
869 sprintf( szPath, "%s/%s", CSV_DATA_DIR, pszBasename );
870 }
871 #else
872 else if( (fp = fopen( "/usr/local/share/epsg/csv/pcs.csv", "rt" )) != NULL )
873 {
874 sprintf( szPath, "/usr/local/share/epsg/csv/%s", pszBasename );
875 }
876 else if( (fp = fopen( "csv/pcs.csv", "rt" )) != NULL )
877 {
878 sprintf( szPath, "csv/%s", pszBasename );
879 }
880 else if( (fp = fopen( "share/epsg_csv/pcs.csv", "rt" )) != NULL )
881 {
882 sprintf( szPath, "share/epsg_csv/%s", pszBasename );
883 }
884 else if( (fp = fopen( "/usr/share/epsg_csv/pcs.csv", "rt" )) != NULL )
885 {
886 sprintf( szPath, "/usr/share/epsg_csv/%s", pszBasename );
887 }
888 else
889 {
890 sprintf( szPath, "/usr/local/share/epsg_csv/%s", pszBasename );
891 }
892 #endif
893
894 if( fp != NULL )
895 fclose( fp );
896
897 return( szPath );
898 }
899 else
900 return( pfnCSVFilenameHook( pszBasename ) );
901 }
902
903 /************************************************************************/
904 /* SetCSVFilenameHook() */
905 /* */
906 /* Applications can use this to set a function that will */
907 /* massage CSV filenames. */
908 /************************************************************************/
909
910 /**
911 * Override CSV file search method.
912 *
913 * @param CSVFileOverride The pointer to a function which will return the
914 * full path for a given filename.
915 *
916
917 This function allows an application to override how the GTIFGetDefn() and related function find the CSV (Comma Separated
918 Value) values required. The pfnHook argument should be a pointer to a function that will take in a CSV filename and return a
919 full path to the file. The returned string should be to an internal static buffer so that the caller doesn't have to free the result.
920
921 <b>Example:</b><br>
922
923 The listgeo utility uses the following override function if the user
924 specified a CSV file directory with the -t commandline switch (argument
925 put into CSVDirName). <p>
926
927 <pre>
928
929 ...
930
931
932 SetCSVFilenameHook( CSVFileOverride );
933
934 ...
935
936
937 static const char *CSVFileOverride( const char * pszInput )
938
939 {
940 static char szPath[1024];
941
942 #ifdef WIN32
943 sprintf( szPath, "%s\\%s", CSVDirName, pszInput );
944 #else
945 sprintf( szPath, "%s/%s", CSVDirName, pszInput );
946 #endif
947
948 return( szPath );
949 }
950 </pre>
951
952 */
953
954 void SetCSVFilenameHook( const char *(*pfnNewHook)( const char * ) )
955
956 {
957 pfnCSVFilenameHook = pfnNewHook;
958 }
248248 const char *pszDelimiter,
249249 int bHonourStrings, int bAllowEmptyTokens );
250250
251 /* ==================================================================== */
252 /* .csv file related functions (from cpl_csv.c) */
253 /* ==================================================================== */
254
255 typedef enum {
256 CC_ExactString,
257 CC_ApproxString,
258 CC_Integer
259 } CSVCompareCriteria;
260
261 #define CSVFilename gtCSVFilename
262 #define CSVReadParseLine gtCSVReadParseLine
263 #define CSVScanLines gtCSVScanLines
264 #define CSVScanFile gtCSVScanFile
265 #define CSVScanFileByName gtCSVScanFileByName
266 #define CSVGetFieldId gtCSVGetFieldId
267 #define CSVDeaccess gtCSVDeaccess
268 #define CSVGetField gtCSVGetField
269 #define SetCSVFilenameHook gtSetCSVFilenameHook
270 #define CSVGetFileFieldId gtCSVGetFileFieldId
271
272 const char GTIF_DLL *CSVFilename( const char * );
273
274 char GTIF_DLL **CSVReadParseLine( FILE * );
275 char GTIF_DLL **CSVScanLines( FILE *, int, const char *, CSVCompareCriteria );
276 char GTIF_DLL **CSVScanFile( const char *, int, const char *,
277 CSVCompareCriteria );
278 char GTIF_DLL **CSVScanFileByName( const char *, const char *, const char *,
279 CSVCompareCriteria );
280 int GTIF_DLL CSVGetFieldId( FILE *, const char * );
281 int GTIF_DLL CSVGetFileFieldId( const char *, const char * );
282
283 void GTIF_DLL CSVDeaccess( const char * );
284
285 const char GTIF_DLL *CSVGetField( const char *, const char *, const char *,
286 CSVCompareCriteria, const char * );
287
288 void GTIF_DLL SetCSVFilenameHook( const char *(*)(const char *) );
251 /*
252 * The following functions were used up to libgeotiff 1.4.X series, but
253 * are now no-operation, since there is no longer any CSV use in libgeotiff.
254 */
255 void GTIF_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
256
289257
290258 CPL_C_END
291259
1212 <li> GTIFKeySet(): Write GeoTIFF GeoKey.
1313 <li> GTIFNew(): Create GeoTIFF access handle.
1414 <li> GTIFWriteKeys(): Flush GeoTIFF Keys.
15 <li> SetCSVFilenameHook(): Override CSV File Searching.
1615 <li> XTIFFClose(): Close GeoTIFF file.
1716 <li> XTIFFOpen(): Open GeoTIFF file.
1817 </ul>
4746 <li> geokeys.h: defines all valid GEOTIFF GeoKeys.<p>
4847
4948 <li> geo_normalize.h: Defined all functions and structures related
50 to normalization of GeoTIFF information based on CSV files.<p>
49 to normalization of GeoTIFF information based on PROJ database.<p>
5150
5251 </ul>
5352
5756 an X style license. In any event it is all considered to be free to use
5857 for any purpose (including commercial software). No credit is required
5958 though some of the code requires that the specific source code modules
60 retain their existing copyright statements. The CSV files, and other tables
61 derived from the EPSG coordinate system database are also free for commercial
62 and non-commercial use. In particular, no part of this code is
59 retain their existing copyright statements. In particular, no part of this code is
6360 <i>copyleft</i>, nor does it imply any requirement for users to disclose
6461 this or their own source code.<p>
6562
2525
2626 The <b>-proj4</b> flag forces listgeo to report the PROJ.4 projection
2727 string it uses for reprojecting corners to lat/long.<p>
28
29 The <b>-t tabledir</b> flag overrides the programs concept of how to file the
30 EPSG CSV files, causing it to look in directory "tabledir". <p>
3128
3229 <h2>GeoTIFF Metadata Format</h2>
3330
9390 to supress) report on the <i>normalized</i> projection parameters for the
9491 file. This is an attempt to lookup PCS and GCS definitions to get detailed
9592 datum, ellipsoid, and projection definitions for the file. In general it
96 requires access to the EPSG CSV files to work properly. The GEOTIFF_CSV
97 environment variable can be used to point to directory containing the EPSG
98 CSV files (normally distributed with libgeotiff, or this executable). If
99 GEOTIFF_CSV is not defined listgeo will look for a csv subdirectory, or
100 the /usr/local/shared/epsg_csv directory. The -t commandline switch can
101 also be used to indicate where the CSV files are located.<p>
93 requires access to the EPSG database provided by the PROJ library to work
94 properly.<p>
10295
10396 Following the normalized projection information listgeo will report the
10497 positions of the four corner coordinates, and if possible their lat/long
340340
341341 The -no_norm flag will supress reporting of normalized parameters, and
342342 reporting of corner points.
343
344 The "-t tabledir" flag overrides the programs concept of how to file the
345 EPSG CSV files, causing it to look in directory "tabledir".
346343
347344 ------------------------
348345 GeoTIFF Metadata Format:
00 /******************************************************************************
1 * $Id: geo_ctrans.inc 2209 2012-05-09 01:34:58Z warmerdam $
1 * $Id$
22 *
33 * Project: libgeotiff
44 * Purpose: GeoTIFF Projection Method codes.
00 /******************************************************************************
1 * $Id: geo_extra.c 2741 2016-09-04 18:50:49Z rouault $
1 * $Id$
22 *
33 * Project: libgeotiff
4 * Purpose: Code to normalize a few common PCS values without use of CSV
5 * files.
4 * Purpose: Code to normalize a few common PCS values
65 * Author: Frank Warmerdam, warmerda@home.com
76 *
87 ******************************************************************************
531530 * The datum (really this is the GCS) is set to a GCS_ value such as GCS_NAD27.
532531 *
533532 * This function is useful to recognise (most) UTM and State Plane coordinate
534 * systems, even if CSV files aren't available to translate them automatically.
533 * systems.
535534 * It is used as a fallback mechanism by GTIFGetDefn() for normalization when
536 * CSV files aren't found.
535 * PROJ database is not found.
537536 */
538537
539538 int GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone )
1414 #include "geo_tiffp.h" /* external TIFF interface */
1515 #include "geo_keyp.h" /* private interface */
1616
17 #include "proj.h"
1718
1819 /**********************************************************************
1920 *
5758 }
5859 if (gtif->gt_keyindex) _GTIFFree (gtif->gt_keyindex);
5960
61 if (gtif->own_pj_context)
62 {
63 proj_context_destroy(gtif->pj_context);
64 }
65
6066 _GTIFFree (gtif);
6167 }
+0
-18
geo_incode_defs.h less more
0
1 /*
2 * This file is included by the CSV ".c" files in the csv directory.
3 *
4 * copyright (c) 1995 Niles D. Ritter
5 *
6 * Permission granted to use this software, so long as this copyright
7 * notice accompanies any products derived therefrom.
8 */
9
10 #include <stdio.h>
11
12 /* Data structures */
13 typedef const char * datafile_rows_t;
14 typedef struct datafile_s {
15 const char *name;
16 const datafile_rows_t **rows;
17 } datafile_t;
1313 #define LIBGEOTIFF_GEO_KEYP_H_
1414
1515 #include <stdlib.h> /* for size_t */
16
17 #include "proj.h"
1618
1719 /*
1820 * This structure contains the internal program
106108
107109 GTErrorCallback gt_error_callback;
108110 void* gt_user_data;
111
112 PJ_CONTEXT *pj_context; /* PROJ context */
113 int own_pj_context; /* whether we own the PROJ context */
114
115 char szTmpBufferForGTIFValueNameEx[160];
109116 };
110117
111118 typedef enum {
1515 #include "geotiffio.h"
1616 #include "geonames.h"
1717 #include "geo_tiffp.h" /* for tag names */
18 #include "geo_keyp.h"
19
20 #include "proj.h"
1821
1922 static const KeyInfo _formatInfo[] = {
2023 {TYPE_BYTE, "Byte"},
6972 return FindName( &_tagInfo[0],tag);
7073 }
7174
72 char *GTIFValueName(geokey_t key, int value)
75 static const KeyInfo* FindTable(geokey_t key)
7376 {
7477 const KeyInfo *info;
7578
8083 case ProjLinearUnitsGeoKey:
8184 case GeogAngularUnitsGeoKey:
8285 case GeogAzimuthUnitsGeoKey:
83 case VerticalUnitsGeoKey:
86 case VerticalUnitsGeoKey:
8487 info=_geounitsValue; break;
8588
8689 /* put other key-dependent lists here */
100103 default: info = _csdefaultValue;break;
101104 }
102105
103 return FindName( info,value);
106 return info;
107 }
108
109 char *GTIFValueName(geokey_t key, int value)
110 {
111
112 return FindName(FindTable(key), value);
113 }
114
115 static void GetNameFromDatabase(GTIF* gtif,
116 const char* pszCode,
117 PJ_CATEGORY category,
118 char* pszOut,
119 size_t nOutSize)
120 {
121 PJ* obj = proj_create_from_database(
122 gtif->pj_context, "EPSG", pszCode, category,
123 FALSE, NULL);
124 if( obj )
125 {
126 const char* pszName = proj_get_name(obj);
127 if( pszName )
128 {
129 strncpy(pszOut, pszName, nOutSize);
130 pszOut[nOutSize-1] = 0;
131 }
132 proj_destroy(obj);
133 }
134 else
135 {
136 pszOut[0] = 0;
137 }
138 }
139
140 const char *GTIFValueNameEx(GTIF* gtif, geokey_t key, int value)
141 {
142 const KeyInfo *info = FindTable(key);
143
144 while (info->ki_key>=0 && info->ki_key != value) info++;
145
146 if (info->ki_key<0)
147 {
148 sprintf(gtif->szTmpBufferForGTIFValueNameEx,"Unknown-%d", value );
149
150 if( gtif->pj_context == NULL )
151 {
152 gtif->pj_context = proj_context_create();
153 if( gtif->pj_context )
154 {
155 gtif->own_pj_context = TRUE;
156 }
157 }
158 if( gtif->pj_context )
159 {
160 char szCode[12];
161 char szName[120];
162
163 szName[0] = 0;
164 sprintf(szCode, "%d", value);
165
166 switch (key)
167 {
168 /* All codes using linear/angular/whatever units */
169 case GeogLinearUnitsGeoKey:
170 case ProjLinearUnitsGeoKey:
171 case GeogAngularUnitsGeoKey:
172 case GeogAzimuthUnitsGeoKey:
173 case VerticalUnitsGeoKey:
174 {
175 const char* pszName = NULL;
176 if( proj_uom_get_info_from_database(gtif->pj_context,
177 "EPSG", szCode, &pszName, NULL, NULL) && pszName )
178 {
179 strncpy(szName, pszName, sizeof(szName));
180 szName[sizeof(szName)-1] = 0;
181 }
182 break;
183 }
184
185 case GeogGeodeticDatumGeoKey:
186 case VerticalDatumGeoKey:
187 GetNameFromDatabase(gtif, szCode, PJ_CATEGORY_DATUM,
188 szName, sizeof(szName));
189 break;
190
191 case GeogEllipsoidGeoKey:
192 GetNameFromDatabase(gtif, szCode, PJ_CATEGORY_ELLIPSOID,
193 szName, sizeof(szName));
194 break;
195
196 case GeogPrimeMeridianGeoKey:
197 GetNameFromDatabase(gtif, szCode,
198 PJ_CATEGORY_PRIME_MERIDIAN,
199 szName, sizeof(szName));
200 break;
201
202 case GeographicTypeGeoKey:
203 case ProjectedCSTypeGeoKey:
204 case VerticalCSTypeGeoKey:
205 GetNameFromDatabase(gtif, szCode,
206 PJ_CATEGORY_CRS,
207 szName, sizeof(szName));
208 break;
209
210 case ProjectionGeoKey:
211 GetNameFromDatabase(gtif, szCode,
212 PJ_CATEGORY_COORDINATE_OPERATION,
213 szName, sizeof(szName));
214 break;
215
216 default:
217 break;
218 }
219
220 if( szName[0] != 0 )
221 {
222 sprintf(gtif->szTmpBufferForGTIFValueNameEx,
223 "Code-%d (%s)", value, szName );
224 }
225
226 }
227
228 return gtif->szTmpBufferForGTIFValueNameEx;
229 }
230 return info->ki_name;
104231 }
105232
106233 /*
120247 int code=-1;
121248 sscanf(key,"Unknown-%d",&code);
122249 return code;
250 } else if (!strncmp(key,"Code-",5))
251 {
252 int code=-1;
253 sscanf(key,"Code-%d",&code);
254 return code;
123255 }
124256 else return -1;
125257 }
148280 */
149281 int GTIFValueCode(geokey_t key, char *name)
150282 {
151 const KeyInfo *info;
152
153 switch (key)
154 {
155 /* All codes using linear/angular/whatever units */
156 case GeogLinearUnitsGeoKey:
157 case ProjLinearUnitsGeoKey:
158 case GeogAngularUnitsGeoKey:
159 case GeogAzimuthUnitsGeoKey:
160 case VerticalUnitsGeoKey:
161 info=_geounitsValue; break;
162
163 /* put other key-dependent lists here */
164 case GTModelTypeGeoKey: info=_modeltypeValue; break;
165 case GTRasterTypeGeoKey: info=_rastertypeValue; break;
166 case GeographicTypeGeoKey: info=_geographicValue; break;
167 case GeogGeodeticDatumGeoKey: info=_geodeticdatumValue; break;
168 case GeogEllipsoidGeoKey: info=_ellipsoidValue; break;
169 case GeogPrimeMeridianGeoKey: info=_primemeridianValue; break;
170 case ProjectedCSTypeGeoKey: info=_pcstypeValue; break;
171 case ProjectionGeoKey: info=_projectionValue; break;
172 case ProjCoordTransGeoKey: info=_coordtransValue; break;
173 case VerticalCSTypeGeoKey: info=_vertcstypeValue; break;
174 case VerticalDatumGeoKey: info=_vdatumValue; break;
175
176 /* And if all else fails... */
177 default: info = _csdefaultValue;break;
178 }
179
180 return FindCode( info,name);
181 }
283 return FindCode(FindTable(key),name);
284 }
00 /******************************************************************************
1 * $Id: geo_normalize.c 2807 2018-01-26 12:55:19Z rouault $
1 * $Id$
22 *
33 * Project: libgeotiff
44 * Purpose: Code to normalize PCS and other composite codes in a GeoTIFF file.
66 *
77 ******************************************************************************
88 * Copyright (c) 1999, Frank Warmerdam
9 * Copyright (c) 2018, Even Rouault <even.rouault at spatialys.com>
910 *
1011 * Permission is hereby granted, free of charge, to any person obtaining a
1112 * copy of this software and associated documentation files (the "Software"),
2627 * DEALINGS IN THE SOFTWARE.
2728 *****************************************************************************/
2829
30 #include <assert.h>
31
2932 #include "cpl_serv.h"
3033 #include "geo_tiffp.h"
3134 #include "geovalues.h"
3235 #include "geo_normalize.h"
3336 #include "geo_keyp.h"
37
38 #include "proj.h"
3439
3540 #ifndef KvUserDefined
3641 # define KvUserDefined 32767
102107 /* GTIFGetPCSInfo() */
103108 /************************************************************************/
104109
105 int GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
106 short *pnProjOp, short *pnUOMLengthCode,
107 short *pnGeogCS )
108
109 {
110 char **papszRecord;
111 char szSearchKey[24];
112 const char *pszFilename;
110 static
111 int GTIFGetPCSInfoEx( PJ_CONTEXT* ctx,
112 int nPCSCode, char **ppszEPSGName,
113 short *pnProjOp, short *pnUOMLengthCode,
114 short *pnGeogCS )
115
116 {
113117 int nDatum;
114118 int nZone;
115119
120 /* Deal with a few well known CRS */
116121 int Proj = GTIFPCSToMapSys( nPCSCode, &nDatum, &nZone );
117122 if ((Proj == MapSys_UTM_North || Proj == MapSys_UTM_South) &&
118123 nDatum != KvUserDefined)
151156 }
152157 }
153158
154 /* -------------------------------------------------------------------- */
155 /* Search the pcs.override table for this PCS. */
156 /* -------------------------------------------------------------------- */
157 pszFilename = CSVFilename( "pcs.override.csv" );
158 sprintf( szSearchKey, "%d", nPCSCode );
159 papszRecord = CSVScanFileByName( pszFilename, "COORD_REF_SYS_CODE",
160 szSearchKey, CC_Integer );
161
162 /* -------------------------------------------------------------------- */
163 /* If not found, search the EPSG PCS database. */
164 /* -------------------------------------------------------------------- */
165 if( papszRecord == NULL )
166 {
167 pszFilename = CSVFilename( "pcs.csv" );
168
169 sprintf( szSearchKey, "%d", nPCSCode );
170 papszRecord = CSVScanFileByName( pszFilename, "COORD_REF_SYS_CODE",
171 szSearchKey, CC_Integer );
172
173 if( papszRecord == NULL )
174 {
175 static int bWarnedOrTried = FALSE;
176 if( !bWarnedOrTried )
159 {
160 char szCode[12];
161 PJ* proj_crs;
162
163 sprintf(szCode, "%d", nPCSCode);
164 proj_crs = proj_create_from_database(
165 ctx, "EPSG", szCode, PJ_CATEGORY_CRS, 0, NULL);
166 if( !proj_crs )
167 {
168 return FALSE;
169 }
170
171 if( proj_get_type(proj_crs) != PJ_TYPE_PROJECTED_CRS )
172 {
173 proj_destroy(proj_crs);
174 return FALSE;
175 }
176
177 if( ppszEPSGName )
178 {
179 const char* pszName = proj_get_name(proj_crs);
180 if( !pszName )
177181 {
178 FILE* f = VSIFOpen(CSVFilename( "pcs.csv" ), "rb");
179 if( f == NULL )
180 CPLError(CE_Warning, CPLE_AppDefined, "Cannot find pcs.csv");
181 else
182 VSIFClose(f);
183 bWarnedOrTried = TRUE;
182 // shouldn't happen
183 proj_destroy(proj_crs);
184 return FALSE;
184185 }
185 return FALSE;
186 }
187 }
188
189 /* -------------------------------------------------------------------- */
190 /* Get the name, if requested. */
191 /* -------------------------------------------------------------------- */
192 if( ppszEPSGName != NULL )
193 {
194 *ppszEPSGName =
195 CPLStrdup( CSLGetField( papszRecord,
196 CSVGetFileFieldId(pszFilename,
197 "COORD_REF_SYS_NAME") ));
198 }
199
200 /* -------------------------------------------------------------------- */
201 /* Get the UOM Length code, if requested. */
202 /* -------------------------------------------------------------------- */
203 if( pnUOMLengthCode != NULL )
204 {
205 const char *pszValue;
206
207 pszValue =
208 CSLGetField( papszRecord,
209 CSVGetFileFieldId(pszFilename,"UOM_CODE"));
210 if( atoi(pszValue) > 0 )
211 *pnUOMLengthCode = (short) atoi(pszValue);
212 else
213 *pnUOMLengthCode = KvUserDefined;
214 }
215
216 /* -------------------------------------------------------------------- */
217 /* Get the UOM Length code, if requested. */
218 /* -------------------------------------------------------------------- */
219 if( pnProjOp != NULL )
220 {
221 const char *pszValue;
222
223 pszValue =
224 CSLGetField( papszRecord,
225 CSVGetFileFieldId(pszFilename,"COORD_OP_CODE"));
226 if( atoi(pszValue) > 0 )
227 *pnProjOp = (short) atoi(pszValue);
228 else
229 *pnProjOp = KvUserDefined;
230 }
231
232 /* -------------------------------------------------------------------- */
233 /* Get the GeogCS (Datum with PM) code, if requested. */
234 /* -------------------------------------------------------------------- */
235 if( pnGeogCS != NULL )
236 {
237 const char *pszValue;
238
239 pszValue =
240 CSLGetField( papszRecord,
241 CSVGetFileFieldId(pszFilename,"SOURCE_GEOGCRS_CODE"));
242 if( atoi(pszValue) > 0 )
243 *pnGeogCS = (short) atoi(pszValue);
244 else
245 *pnGeogCS = KvUserDefined;
246 }
247
248 return TRUE;
186 *ppszEPSGName = CPLStrdup(pszName);
187 }
188
189 if( pnProjOp )
190 {
191 PJ* conversion = proj_crs_get_coordoperation(
192 ctx, proj_crs);
193 if( !conversion )
194 {
195 // shouldn't happen except out of memory
196 proj_destroy(proj_crs);
197 return FALSE;
198 }
199
200 {
201 const char* pszConvCode = proj_get_id_code(conversion, 0);
202 assert( pszConvCode );
203 *pnProjOp = (short) atoi(pszConvCode);
204 }
205
206 proj_destroy(conversion);
207 }
208
209 if( pnUOMLengthCode )
210 {
211 PJ* coordSys = proj_crs_get_coordinate_system(
212 ctx, proj_crs);
213 if( !coordSys )
214 {
215 // shouldn't happen except out of memory
216 proj_destroy(proj_crs);
217 return FALSE;
218 }
219
220 {
221 const char* pszUnitCode = NULL;
222 if( !proj_cs_get_axis_info(
223 ctx, coordSys, 0,
224 NULL, /* name */
225 NULL, /* abbreviation*/
226 NULL, /* direction */
227 NULL, /* conversion factor */
228 NULL, /* unit name */
229 NULL, /* unit auth name (should be EPSG) */
230 &pszUnitCode) || pszUnitCode == NULL )
231 {
232 proj_destroy(coordSys);
233 return FALSE;
234 }
235 *pnUOMLengthCode = (short) atoi(pszUnitCode);
236 proj_destroy(coordSys);
237 }
238 }
239
240 if( pnGeogCS )
241 {
242 PJ* geod_crs = proj_crs_get_geodetic_crs(ctx, proj_crs);
243 if( !geod_crs )
244 {
245 // shouldn't happen except out of memory
246 proj_destroy(proj_crs);
247 return FALSE;
248 }
249
250 {
251 const char* pszGeodCode = proj_get_id_code(geod_crs, 0);
252 assert( pszGeodCode );
253 *pnGeogCS = (short) atoi(pszGeodCode);
254 }
255
256 proj_destroy(geod_crs);
257 }
258
259
260 proj_destroy(proj_crs);
261 return TRUE;
262 }
263 }
264
265
266 int GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
267 short *pnProjOp, short *pnUOMLengthCode,
268 short *pnGeogCS )
269
270 {
271 PJ_CONTEXT* ctx = proj_context_create();
272 int ret = GTIFGetPCSInfoEx(ctx, nPCSCode, ppszEPSGName, pnProjOp,
273 pnUOMLengthCode, pnGeogCS);
274 proj_context_destroy(ctx);
275 return ret;
249276 }
250277
251278 /************************************************************************/
365392 /* GCS. */
366393 /************************************************************************/
367394
368 int GTIFGetGCSInfo( int nGCSCode, char ** ppszName,
369 short * pnDatum, short * pnPM, short *pnUOMAngle )
370
371 {
372 char szSearchKey[24];
395 static
396 int GTIFGetGCSInfoEx( PJ_CONTEXT* ctx,
397 int nGCSCode, char ** ppszName,
398 short * pnDatum, short * pnPM, short *pnUOMAngle )
399
400 {
373401 int nDatum=0, nPM, nUOMAngle;
374 const char *pszFilename;
375402
376403 /* -------------------------------------------------------------------- */
377404 /* Handle some "well known" GCS codes directly */
419446 }
420447
421448 /* -------------------------------------------------------------------- */
422 /* Search the database for the corresponding datum code. */
423 /* -------------------------------------------------------------------- */
424 pszFilename = CSVFilename("gcs.override.csv");
425 sprintf( szSearchKey, "%d", nGCSCode );
426 nDatum = atoi(CSVGetField( pszFilename,
427 "COORD_REF_SYS_CODE", szSearchKey,
428 CC_Integer, "DATUM_CODE" ) );
429
430 if( nDatum < 1 )
431 {
432 pszFilename = CSVFilename("gcs.csv");
433 sprintf( szSearchKey, "%d", nGCSCode );
434 nDatum = atoi(CSVGetField( pszFilename,
435 "COORD_REF_SYS_CODE", szSearchKey,
436 CC_Integer, "DATUM_CODE" ) );
437 }
438
439 if( nDatum < 1 )
440 {
441 static int bWarnedOrTried = FALSE;
442 if( !bWarnedOrTried )
443 {
444 FILE* f = VSIFOpen(CSVFilename( "gcs.csv" ), "rb");
445 if( f == NULL )
446 CPLError(CE_Warning, CPLE_AppDefined, "Cannot find gcs.csv");
447 else
448 VSIFClose(f);
449 bWarnedOrTried = TRUE;
450 }
451 return FALSE;
452 }
453
454 if( pnDatum != NULL )
455 *pnDatum = (short) nDatum;
456
457 /* -------------------------------------------------------------------- */
458 /* Get the PM. */
459 /* -------------------------------------------------------------------- */
460 if( pnPM != NULL )
461 {
462 nPM = atoi(CSVGetField( pszFilename,
463 "COORD_REF_SYS_CODE", szSearchKey, CC_Integer,
464 "PRIME_MERIDIAN_CODE" ) );
465
466 if( nPM < 1 )
449 /* Search the database. */
450 /* -------------------------------------------------------------------- */
451
452 {
453 char szCode[12];
454 PJ* geod_crs;
455
456 sprintf(szCode, "%d", nGCSCode);
457 geod_crs = proj_create_from_database(
458 ctx, "EPSG", szCode, PJ_CATEGORY_CRS, 0, NULL);
459 if( !geod_crs )
460 {
467461 return FALSE;
468
469 *pnPM = (short) nPM;
470 }
471
472 /* -------------------------------------------------------------------- */
473 /* Get the angular units. */
474 /* -------------------------------------------------------------------- */
475 nUOMAngle = atoi(CSVGetField( pszFilename,
476 "COORD_REF_SYS_CODE",szSearchKey, CC_Integer,
477 "UOM_CODE" ) );
478
479 if( nUOMAngle < 1 )
480 return FALSE;
481
482 if( pnUOMAngle != NULL )
483 *pnUOMAngle = (short) nUOMAngle;
484
485 /* -------------------------------------------------------------------- */
486 /* Get the name, if requested. */
487 /* -------------------------------------------------------------------- */
488 if( ppszName != NULL )
489 *ppszName =
490 CPLStrdup(CSVGetField( pszFilename,
491 "COORD_REF_SYS_CODE",szSearchKey,CC_Integer,
492 "COORD_REF_SYS_NAME" ));
493
494 return TRUE;
462 }
463
464 {
465 int objType = proj_get_type(geod_crs);
466 if( objType != PJ_TYPE_GEODETIC_CRS &&
467 objType != PJ_TYPE_GEOCENTRIC_CRS &&
468 objType != PJ_TYPE_GEOGRAPHIC_2D_CRS &&
469 objType != PJ_TYPE_GEOGRAPHIC_3D_CRS )
470 {
471 proj_destroy(geod_crs);
472 return FALSE;
473 }
474 }
475
476 if( ppszName )
477 {
478 pszName = proj_get_name(geod_crs);
479 if( !pszName )
480 {
481 // shouldn't happen
482 proj_destroy(geod_crs);
483 return FALSE;
484 }
485 *ppszName = CPLStrdup(pszName);
486 }
487
488 if( pnDatum )
489 {
490 PJ* datum = proj_crs_get_datum(ctx, geod_crs);
491 if( !datum )
492 {
493 proj_destroy(geod_crs);
494 return FALSE;
495 }
496
497 {
498 const char* pszDatumCode = proj_get_id_code(datum, 0);
499 assert( pszDatumCode );
500 *pnDatum = (short) atoi(pszDatumCode);
501 }
502
503 proj_destroy(datum);
504 }
505
506 if( pnPM )
507 {
508 PJ* pm = proj_get_prime_meridian(ctx, geod_crs);
509 if( !pm )
510 {
511 proj_destroy(geod_crs);
512 return FALSE;
513 }
514
515 {
516 const char* pszPMCode = proj_get_id_code(pm, 0);
517 assert( pszPMCode );
518 *pnPM = (short) atoi(pszPMCode);
519 }
520
521 proj_destroy(pm);
522 }
523
524 if( pnUOMAngle )
525 {
526 PJ* coordSys = proj_crs_get_coordinate_system(
527 ctx, geod_crs);
528 if( !coordSys )
529 {
530 // shouldn't happen except out of memory
531 proj_destroy(geod_crs);
532 return FALSE;
533 }
534
535 {
536 const char* pszUnitCode = NULL;
537 if( !proj_cs_get_axis_info(
538 ctx, coordSys, 0,
539 NULL, /* name */
540 NULL, /* abbreviation*/
541 NULL, /* direction */
542 NULL, /* conversion factor */
543 NULL, /* unit name */
544 NULL, /* unit auth name (should be EPSG) */
545 &pszUnitCode) || pszUnitCode == NULL )
546 {
547 proj_destroy(coordSys);
548 return FALSE;
549 }
550 *pnUOMAngle = (short) atoi(pszUnitCode);
551 proj_destroy(coordSys);
552 }
553 }
554
555 proj_destroy(geod_crs);
556 return TRUE;
557 }
558 }
559
560 int GTIFGetGCSInfo( int nGCSCode, char ** ppszName,
561 short * pnDatum, short * pnPM, short *pnUOMAngle )
562
563 {
564 PJ_CONTEXT* ctx = proj_context_create();
565 int ret = GTIFGetGCSInfoEx(ctx, nGCSCode, ppszName, pnDatum,
566 pnPM, pnUOMAngle);
567 proj_context_destroy(ctx);
568 return ret;
495569 }
496570
497571 /************************************************************************/
502576 /* where that is provided. */
503577 /************************************************************************/
504578
505 int GTIFGetEllipsoidInfo( int nEllipseCode, char ** ppszName,
506 double * pdfSemiMajor, double * pdfSemiMinor )
507
508 {
509 char szSearchKey[24];
510 double dfSemiMajor=0.0, dfToMeters = 1.0;
511 int nUOMLength;
512
579 static
580 int GTIFGetEllipsoidInfoEx( PJ_CONTEXT* ctx,
581 int nEllipseCode, char ** ppszName,
582 double * pdfSemiMajor, double * pdfSemiMinor )
583
584 {
513585 /* -------------------------------------------------------------------- */
514586 /* Try some well known ellipsoids. */
515587 /* -------------------------------------------------------------------- */
588 double dfSemiMajor=0.0;
516589 double dfInvFlattening=0.0, dfSemiMinor=0.0;
517590 const char *pszName = NULL;
518591
561634 }
562635
563636 /* -------------------------------------------------------------------- */
564 /* Get the semi major axis. */
565 /* -------------------------------------------------------------------- */
566 sprintf( szSearchKey, "%d", nEllipseCode );
567 dfSemiMajor =
568 GTIFAtof(CSVGetField( CSVFilename("ellipsoid.csv"),
569 "ELLIPSOID_CODE", szSearchKey, CC_Integer,
570 "SEMI_MAJOR_AXIS" ) );
571
572 if( dfSemiMajor == 0.0 )
573 {
574 static int bWarnedOrTried = FALSE;
575 if( !bWarnedOrTried )
576 {
577 FILE* f = VSIFOpen(CSVFilename( "ellipsoid.csv" ), "rb");
578 if( f == NULL )
579 CPLError(CE_Warning, CPLE_AppDefined, "Cannot find ellipsoid.csv");
580 else
581 VSIFClose(f);
582 bWarnedOrTried = TRUE;
583 }
584 return FALSE;
585 }
586
587 /* -------------------------------------------------------------------- */
588 /* Get the translation factor into meters. */
589 /* -------------------------------------------------------------------- */
590 nUOMLength = atoi(CSVGetField( CSVFilename("ellipsoid.csv"),
591 "ELLIPSOID_CODE", szSearchKey, CC_Integer,
592 "UOM_CODE" ));
593 GTIFGetUOMLengthInfo( nUOMLength, NULL, &dfToMeters );
594
595 dfSemiMajor *= dfToMeters;
596
597 if( pdfSemiMajor != NULL )
598 *pdfSemiMajor = dfSemiMajor;
599
600 /* -------------------------------------------------------------------- */
601 /* Get the semi-minor if requested. If the Semi-minor axis */
602 /* isn't available, compute it based on the inverse flattening. */
603 /* -------------------------------------------------------------------- */
604 if( pdfSemiMinor != NULL )
605 {
606 *pdfSemiMinor =
607 GTIFAtof(CSVGetField( CSVFilename("ellipsoid.csv"),
608 "ELLIPSOID_CODE", szSearchKey, CC_Integer,
609 "SEMI_MINOR_AXIS" )) * dfToMeters;
610
611 if( *pdfSemiMinor == 0.0 )
612 {
613 dfInvFlattening =
614 GTIFAtof(CSVGetField( CSVFilename("ellipsoid.csv"),
615 "ELLIPSOID_CODE", szSearchKey, CC_Integer,
616 "INV_FLATTENING" ));
617 *pdfSemiMinor = dfSemiMajor * (1 - 1.0/dfInvFlattening);
618 }
619 }
620
621 /* -------------------------------------------------------------------- */
622 /* Get the name, if requested. */
623 /* -------------------------------------------------------------------- */
624 if( ppszName != NULL )
625 *ppszName =
626 CPLStrdup(CSVGetField( CSVFilename("ellipsoid.csv"),
627 "ELLIPSOID_CODE", szSearchKey, CC_Integer,
628 "ELLIPSOID_NAME" ));
629
630 return TRUE;
637 /* Search the database. */
638 /* -------------------------------------------------------------------- */
639 {
640 char szCode[12];
641 PJ* ellipsoid;
642
643 sprintf(szCode, "%d", nEllipseCode);
644 ellipsoid = proj_create_from_database(
645 ctx, "EPSG", szCode, PJ_CATEGORY_ELLIPSOID, 0, NULL);
646 if( !ellipsoid )
647 {
648 return FALSE;
649 }
650
651 if( ppszName )
652 {
653 pszName = proj_get_name(ellipsoid);
654 if( !pszName )
655 {
656 // shouldn't happen
657 proj_destroy(ellipsoid);
658 return FALSE;
659 }
660 *ppszName = CPLStrdup(pszName);
661 }
662
663 proj_ellipsoid_get_parameters(
664 ctx, ellipsoid, pdfSemiMajor, pdfSemiMinor, NULL, NULL);
665
666 proj_destroy(ellipsoid);
667
668 return TRUE;
669 }
670 }
671
672 int GTIFGetEllipsoidInfo( int nEllipseCode, char ** ppszName,
673 double * pdfSemiMajor, double * pdfSemiMinor )
674
675 {
676 PJ_CONTEXT* ctx = proj_context_create();
677 int ret = GTIFGetEllipsoidInfoEx(ctx, nEllipseCode, ppszName, pdfSemiMajor,
678 pdfSemiMinor);
679 proj_context_destroy(ctx);
680 return ret;
631681 }
632682
633683 /************************************************************************/
637687 /* in degrees. */
638688 /************************************************************************/
639689
640 int GTIFGetPMInfo( int nPMCode, char ** ppszName, double *pdfOffset )
641
642 {
643 char szSearchKey[24];
644 int nUOMAngle;
645 const char *pszFilename;
646
690 static
691 int GTIFGetPMInfoEx( PJ_CONTEXT* ctx,
692 int nPMCode, char ** ppszName, double *pdfOffset )
693
694 {
647695 /* -------------------------------------------------------------------- */
648696 /* Use a special short cut for Greenwich, since it is so common. */
649697 /* -------------------------------------------------------------------- */
657705 }
658706
659707 /* -------------------------------------------------------------------- */
660 /* Search the database for the corresponding datum code. */
661 /* -------------------------------------------------------------------- */
662 pszFilename = CSVFilename("prime_meridian.csv");
663 sprintf( szSearchKey, "%d", nPMCode );
664
665 nUOMAngle =
666 atoi(CSVGetField( pszFilename,
667 "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
668 "UOM_CODE" ) );
669 if( nUOMAngle < 1 )
670 {
671 static int bWarnedOrTried = FALSE;
672 if( !bWarnedOrTried )
673 {
674 FILE* f = VSIFOpen(CSVFilename( "prime_meridian.csv" ), "rb");
675 if( f == NULL )
676 CPLError(CE_Warning, CPLE_AppDefined, "Cannot find prime_meridian.csv");
677 else
678 VSIFClose(f);
679 bWarnedOrTried = TRUE;
680 }
681 return FALSE;
682 }
683
684 /* -------------------------------------------------------------------- */
685 /* Get the PM offset. */
686 /* -------------------------------------------------------------------- */
687 if( pdfOffset != NULL )
688 {
689 *pdfOffset =
690 GTIFAngleStringToDD(
691 CSVGetField( pszFilename,
692 "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
693 "GREENWICH_LONGITUDE" ),
694 nUOMAngle );
695 }
696
697 /* -------------------------------------------------------------------- */
698 /* Get the name, if requested. */
699 /* -------------------------------------------------------------------- */
700 if( ppszName != NULL )
701 *ppszName =
702 CPLStrdup(
703 CSVGetField( pszFilename,
704 "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
705 "PRIME_MERIDIAN_NAME" ));
706
707 return TRUE;
708 /* Search the database. */
709 /* -------------------------------------------------------------------- */
710 {
711 char szCode[12];
712 PJ* pm;
713
714 sprintf(szCode, "%d", nPMCode);
715 pm = proj_create_from_database(
716 ctx, "EPSG", szCode, PJ_CATEGORY_PRIME_MERIDIAN, 0, NULL);
717 if( !pm )
718 {
719 return FALSE;
720 }
721
722 if( ppszName )
723 {
724 const char* pszName = proj_get_name(pm);
725 if( !pszName )
726 {
727 // shouldn't happen
728 proj_destroy(pm);
729 return FALSE;
730 }
731 *ppszName = CPLStrdup(pszName);
732 }
733
734 if( pdfOffset )
735 {
736 double conv_factor = 0;
737 proj_prime_meridian_get_parameters(
738 ctx, pm, pdfOffset, &conv_factor, NULL);
739 *pdfOffset *= conv_factor * 180.0 / M_PI;
740 }
741
742 proj_destroy(pm);
743
744 return TRUE;
745 }
746 }
747
748 int GTIFGetPMInfo( int nPMCode, char ** ppszName, double *pdfOffset )
749
750 {
751 PJ_CONTEXT* ctx = proj_context_create();
752 int ret = GTIFGetPMInfoEx(ctx, nPMCode, ppszName, pdfOffset);
753 proj_context_destroy(ctx);
754 return ret;
708755 }
709756
710757 /************************************************************************/
713760 /* Fetch the ellipsoid, and name for a datum. */
714761 /************************************************************************/
715762
716 int GTIFGetDatumInfo( int nDatumCode, char ** ppszName, short * pnEllipsoid )
717
718 {
719 char szSearchKey[24];
763 static
764 int GTIFGetDatumInfoEx( PJ_CONTEXT* ctx,
765 int nDatumCode, char ** ppszName, short * pnEllipsoid )
766
767 {
768 const char* pszName = NULL;
720769 int nEllipsoid = 0;
721 const char *pszFilename;
722 FILE *fp;
723 const char *pszName = NULL;
724770
725771 /* -------------------------------------------------------------------- */
726772 /* Handle a few built-in datums. */
758804 }
759805
760806 /* -------------------------------------------------------------------- */
761 /* If we can't find datum.csv then gdal_datum.csv is an */
762 /* acceptable fallback. Mostly this is for GDAL. */
763 /* -------------------------------------------------------------------- */
764 pszFilename = CSVFilename( "datum.csv" );
765 if( (fp = VSIFOpen(pszFilename,"r")) == NULL )
766 {
767 if( (fp = VSIFOpen(CSVFilename("gdal_datum.csv"), "r")) != NULL )
768 {
769 pszFilename = CSVFilename( "gdal_datum.csv" );
770 VSIFClose( fp );
771 }
772 }
773 else
774 VSIFClose( fp );
775
776 /* -------------------------------------------------------------------- */
777 /* Search the database for the corresponding datum code. */
778 /* -------------------------------------------------------------------- */
779 sprintf( szSearchKey, "%d", nDatumCode );
780
781 nEllipsoid = atoi(CSVGetField( pszFilename,
782 "DATUM_CODE", szSearchKey, CC_Integer,
783 "ELLIPSOID_CODE" ) );
784
785 if( pnEllipsoid != NULL )
786 *pnEllipsoid = (short) nEllipsoid;
787
788 if( nEllipsoid < 1 )
789 {
790 static int bWarnedOrTried = FALSE;
791 if( !bWarnedOrTried )
792 {
793 FILE* f = VSIFOpen(CSVFilename( "datum.csv" ), "rb");
794 if( f == NULL )
795 f = VSIFOpen(CSVFilename( "gdal_datum.csv" ), "rb");
796 if( f == NULL )
797 CPLError(CE_Warning, CPLE_AppDefined, "Cannot find datum.csv or gdal_datum.csv");
798 else
799 VSIFClose(f);
800 bWarnedOrTried = TRUE;
801 }
802 return FALSE;
803 }
804
805 /* -------------------------------------------------------------------- */
806 /* Get the name, if requested. */
807 /* -------------------------------------------------------------------- */
808 if( ppszName != NULL )
809 *ppszName =
810 CPLStrdup(CSVGetField( pszFilename,
811 "DATUM_CODE", szSearchKey, CC_Integer,
812 "DATUM_NAME" ));
813
814 return TRUE;
815 }
816
807 /* Search the database. */
808 /* -------------------------------------------------------------------- */
809 {
810 char szCode[12];
811 PJ* datum;
812
813 sprintf(szCode, "%d", nDatumCode);
814 datum = proj_create_from_database(
815 ctx, "EPSG", szCode, PJ_CATEGORY_DATUM, 0, NULL);
816 if( !datum )
817 {
818 return FALSE;
819 }
820
821 if( proj_get_type(datum) != PJ_TYPE_GEODETIC_REFERENCE_FRAME )
822 {
823 proj_destroy(datum);
824 return FALSE;
825 }
826
827 if( ppszName )
828 {
829 pszName = proj_get_name(datum);
830 if( !pszName )
831 {
832 // shouldn't happen
833 proj_destroy(datum);
834 return FALSE;
835 }
836 *ppszName = CPLStrdup(pszName);
837 }
838
839 if( pnEllipsoid )
840 {
841 PJ* ellipsoid = proj_get_ellipsoid(ctx, datum);
842 if( !ellipsoid )
843 {
844 proj_destroy(datum);
845 return FALSE;
846 }
847
848 {
849 const char* pszEllipsoidCode = proj_get_id_code(
850 ellipsoid, 0);
851 assert( pszEllipsoidCode );
852 *pnEllipsoid = (short) atoi(pszEllipsoidCode);
853 }
854
855 proj_destroy(ellipsoid);
856 }
857
858 proj_destroy(datum);
859
860 return TRUE;
861 }
862 }
863
864 int GTIFGetDatumInfo( int nDatumCode, char ** ppszName, short * pnEllipsoid )
865
866 {
867 PJ_CONTEXT* ctx = proj_context_create();
868 int ret = GTIFGetDatumInfoEx(ctx, nDatumCode, ppszName, pnEllipsoid);
869 proj_context_destroy(ctx);
870 return ret;
871 }
817872
818873 /************************************************************************/
819874 /* GTIFGetUOMLengthInfo() */
822877 /* lookup length aliases in the UOM_LE_ALIAS table. */
823878 /************************************************************************/
824879
825 int GTIFGetUOMLengthInfo( int nUOMLengthCode,
826 char **ppszUOMName,
827 double * pdfInMeters )
828
829 {
830 char **papszUnitsRecord;
831 char szSearchKey[24];
832 int iNameField;
833 const char *pszFilename;
834
880 static
881 int GTIFGetUOMLengthInfoEx( PJ_CONTEXT* ctx,
882 int nUOMLengthCode,
883 char **ppszUOMName,
884 double * pdfInMeters )
885
886 {
835887 /* -------------------------------------------------------------------- */
836888 /* We short cut meter to save work and avoid failure for missing */
837889 /* in the most common cases. */
870922 /* Search the units database for this unit. If we don't find */
871923 /* it return failure. */
872924 /* -------------------------------------------------------------------- */
873 pszFilename = CSVFilename( "unit_of_measure.csv" );
874
875 sprintf( szSearchKey, "%d", nUOMLengthCode );
876 papszUnitsRecord =
877 CSVScanFileByName( pszFilename,
878 "UOM_CODE", szSearchKey, CC_Integer );
879
880 if( papszUnitsRecord == NULL )
881 return FALSE;
882
883 /* -------------------------------------------------------------------- */
884 /* Get the name, if requested. */
885 /* -------------------------------------------------------------------- */
886 if( ppszUOMName != NULL )
887 {
888 iNameField = CSVGetFileFieldId( pszFilename,
889 "UNIT_OF_MEAS_NAME" );
890 *ppszUOMName = CPLStrdup( CSLGetField(papszUnitsRecord, iNameField) );
891 }
892
893 /* -------------------------------------------------------------------- */
894 /* Get the A and B factor fields, and create the multiplicative */
895 /* factor. */
896 /* -------------------------------------------------------------------- */
897 if( pdfInMeters != NULL )
898 {
899 int iBFactorField, iCFactorField;
900
901 iBFactorField = CSVGetFileFieldId( pszFilename, "FACTOR_B" );
902 iCFactorField = CSVGetFileFieldId( pszFilename, "FACTOR_C" );
903
904 if( GTIFAtof(CSLGetField(papszUnitsRecord, iCFactorField)) > 0.0 )
905 *pdfInMeters = GTIFAtof(CSLGetField(papszUnitsRecord, iBFactorField))
906 / GTIFAtof(CSLGetField(papszUnitsRecord, iCFactorField));
907 else
908 *pdfInMeters = 0.0;
909 }
910
911 return TRUE;
925 {
926 char szCode[12];
927 const char* pszName = NULL;
928
929 sprintf(szCode, "%d", nUOMLengthCode);
930 if( !proj_uom_get_info_from_database(
931 ctx, "EPSG", szCode, &pszName, pdfInMeters, NULL) )
932 {
933 return FALSE;
934 }
935 if( ppszUOMName )
936 {
937 *ppszUOMName = CPLStrdup(pszName);
938 }
939 return TRUE;
940 }
941 }
942
943 int GTIFGetUOMLengthInfo( int nUOMLengthCode,
944 char **ppszUOMName,
945 double * pdfInMeters )
946
947 {
948 PJ_CONTEXT* ctx = proj_context_create();
949 int ret = GTIFGetUOMLengthInfoEx(
950 ctx, nUOMLengthCode, ppszUOMName, pdfInMeters);
951 proj_context_destroy(ctx);
952 return ret;
912953 }
913954
914955 /************************************************************************/
915956 /* GTIFGetUOMAngleInfo() */
916957 /************************************************************************/
917958
918 int GTIFGetUOMAngleInfo( int nUOMAngleCode,
919 char **ppszUOMName,
920 double * pdfInDegrees )
959 static
960 int GTIFGetUOMAngleInfoEx( PJ_CONTEXT* ctx,
961 int nUOMAngleCode,
962 char **ppszUOMName,
963 double * pdfInDegrees )
921964
922965 {
923966 const char *pszUOMName = NULL;
924967 double dfInDegrees = 1.0;
925 const char *pszFilename;
926 char szSearchKey[24];
927968
928969 switch( nUOMAngleCode )
929970 {
9831024 return TRUE;
9841025 }
9851026
986 pszFilename = CSVFilename( "unit_of_measure.csv" );
987 sprintf( szSearchKey, "%d", nUOMAngleCode );
988 pszUOMName = CSVGetField( pszFilename,
989 "UOM_CODE", szSearchKey, CC_Integer,
990 "UNIT_OF_MEAS_NAME" );
991
992 /* -------------------------------------------------------------------- */
993 /* If the file is found, read from there. Note that FactorC is */
994 /* an empty field for any of the DMS style formats, and in this */
995 /* case we really want to return the default InDegrees value */
996 /* (1.0) from above. */
997 /* -------------------------------------------------------------------- */
998 if( pszUOMName != NULL )
999 {
1000 double dfFactorB, dfFactorC, dfInRadians;
1001
1002 dfFactorB =
1003 GTIFAtof(CSVGetField( pszFilename,
1004 "UOM_CODE", szSearchKey, CC_Integer,
1005 "FACTOR_B" ));
1006
1007 dfFactorC =
1008 GTIFAtof(CSVGetField( pszFilename,
1009 "UOM_CODE", szSearchKey, CC_Integer,
1010 "FACTOR_C" ));
1011
1012 if( dfFactorC != 0.0 )
1013 {
1014 dfInRadians = (dfFactorB / dfFactorC);
1015 dfInDegrees = dfInRadians * 180.0 / M_PI;
1016 }
1017
1018 if( ppszUOMName != NULL )
1019 *ppszUOMName = CPLStrdup( pszUOMName );
1020 }
1021 else
1022 {
1023 return FALSE;
1024 }
1025
1026 /* -------------------------------------------------------------------- */
1027 /* Return to caller. */
1028 /* -------------------------------------------------------------------- */
1029
1030 if( pdfInDegrees != NULL )
1031 *pdfInDegrees = dfInDegrees;
1032
1033 return TRUE;
1027 /* -------------------------------------------------------------------- */
1028 /* Search the units database for this unit. If we don't find */
1029 /* it return failure. */
1030 /* -------------------------------------------------------------------- */
1031 {
1032 char szCode[12];
1033 const char* pszName = NULL;
1034 double dfConvFactorToRadians = 0;
1035
1036 sprintf(szCode, "%d", nUOMAngleCode);
1037 if( !proj_uom_get_info_from_database(
1038 ctx, "EPSG", szCode, &pszName, &dfConvFactorToRadians, NULL) )
1039 {
1040 return FALSE;
1041 }
1042 if( ppszUOMName )
1043 {
1044 *ppszUOMName = CPLStrdup(pszName);
1045 }
1046 if( pdfInDegrees )
1047 {
1048 *pdfInDegrees = dfConvFactorToRadians * 180.0 / M_PI;
1049 }
1050 return TRUE;
1051 }
1052 }
1053
1054 int GTIFGetUOMAngleInfo( int nUOMAngleCode,
1055 char **ppszUOMName,
1056 double * pdfInDegrees )
1057
1058 {
1059 PJ_CONTEXT* ctx = proj_context_create();
1060 int ret = GTIFGetUOMAngleInfoEx(
1061 ctx, nUOMAngleCode, ppszUOMName, pdfInDegrees);
1062 proj_context_destroy(ctx);
1063 return ret;
10341064 }
10351065
10361066 /************************************************************************/
10431073 static int EPSGProjMethodToCTProjMethod( int nEPSG, int bReturnExtendedCTCode )
10441074
10451075 {
1046 /* see trf_method.csv for list of EPSG codes */
1047
10481076 switch( nEPSG )
10491077 {
10501078 case 9801:
11351163 /* SetGTParmIds() */
11361164 /* */
11371165 /* This is hardcoded logic to set the GeoTIFF parameter */
1138 /* identifiers for all the EPSG supported projections. As the */
1139 /* trf_method.csv table grows with new projections, this code */
1140 /* will need to be updated. */
1166 /* identifiers for all the EPSG supported projections. As new */
1167 /* projection methods are added, this code will need to be updated */
11411168 /************************************************************************/
11421169
11431170 static int SetGTParmIds( int nCTProjection,
1171 int nEPSGProjMethod,
11441172 int *panProjParmId,
11451173 int *panEPSGCodes )
11461174
12031231 panEPSGCodes[1] = EPSGProjCenterLong;
12041232 panEPSGCodes[2] = EPSGAzimuth;
12051233 panEPSGCodes[4] = EPSGInitialLineScaleFactor;
1206 panEPSGCodes[5] = EPSGProjCenterEasting;
1207 panEPSGCodes[6] = EPSGProjCenterNorthing;
1234 panEPSGCodes[5] = EPSGFalseEasting;
1235 panEPSGCodes[6] = EPSGFalseNorthing;
12081236 return TRUE;
12091237
12101238 case CT_LambertConfConic_1SP:
12141242 case CT_TransverseMercator:
12151243 case CT_TransvMercator_SouthOriented:
12161244 panProjParmId[0] = ProjNatOriginLatGeoKey;
1217 panProjParmId[1] = ProjNatOriginLongGeoKey;
1245 if( nCTProjection == CT_PolarStereographic )
1246 {
1247 panProjParmId[1] = ProjStraightVertPoleLongGeoKey;
1248 }
1249 else
1250 {
1251 panProjParmId[1] = ProjNatOriginLongGeoKey;
1252 }
1253 if( nEPSGProjMethod == 9805 ) /* Mercator_2SP */
1254 {
1255 panProjParmId[2] = ProjStdParallel1GeoKey;
1256 }
12181257 panProjParmId[4] = ProjScaleAtNatOriginGeoKey;
12191258 panProjParmId[5] = ProjFalseEastingGeoKey;
12201259 panProjParmId[6] = ProjFalseNorthingGeoKey;
12211260
12221261 panEPSGCodes[0] = EPSGNatOriginLat;
12231262 panEPSGCodes[1] = EPSGNatOriginLong;
1263 if( nEPSGProjMethod == 9805 ) /* Mercator_2SP */
1264 {
1265 panEPSGCodes[2] = EPSGStdParallel1Lat;
1266 }
12241267 panEPSGCodes[4] = EPSGNatOriginScaleFactor;
12251268 panEPSGCodes[5] = EPSGFalseEasting;
12261269 panEPSGCodes[6] = EPSGFalseNorthing;
13331376 /* normalized into degrees and meters. */
13341377 /************************************************************************/
13351378
1336 int GTIFGetProjTRFInfo( /* COORD_OP_CODE from coordinate_operation.csv */
1337 int nProjTRFCode,
1338 char **ppszProjTRFName,
1339 short * pnProjMethod,
1340 double * padfProjParms )
1341
1342 {
1343 int nProjMethod, i, anEPSGCodes[7];
1344 double adfProjParms[7];
1345 char szTRFCode[16];
1346 int nCTProjMethod;
1347 char *pszFilename;
1348
1379 static
1380 int GTIFGetProjTRFInfoEx( PJ_CONTEXT* ctx,
1381 int nProjTRFCode,
1382 char **ppszProjTRFName,
1383 short * pnProjMethod,
1384 double * padfProjParms )
1385
1386 {
13491387 if ((nProjTRFCode >= Proj_UTM_zone_1N && nProjTRFCode <= Proj_UTM_zone_60N) ||
13501388 (nProjTRFCode >= Proj_UTM_zone_1S && nProjTRFCode <= Proj_UTM_zone_60S))
13511389 {
13871425 return TRUE;
13881426 }
13891427
1390 /* -------------------------------------------------------------------- */
1391 /* Get the proj method. If this fails to return a meaningful */
1392 /* number, then the whole function fails. */
1393 /* -------------------------------------------------------------------- */
1394 pszFilename = CPLStrdup(CSVFilename("projop_wparm.csv"));
1395 sprintf( szTRFCode, "%d", nProjTRFCode );
1396 nProjMethod =
1397 atoi( CSVGetField( pszFilename,
1398 "COORD_OP_CODE", szTRFCode, CC_Integer,
1399 "COORD_OP_METHOD_CODE" ) );
1400 if( nProjMethod == 0 )
1401 {
1402 CPLFree( pszFilename );
1403 return FALSE;
1404 }
1428 {
1429 int nProjMethod, i, anEPSGCodes[7];
1430 double adfProjParms[7];
1431 char szCode[12];
1432 const char* pszMethodCode = NULL;
1433 int nCTProjMethod;
1434 PJ *transf;
1435
1436 sprintf(szCode, "%d", nProjTRFCode);
1437 transf = proj_create_from_database(
1438 ctx, "EPSG", szCode, PJ_CATEGORY_COORDINATE_OPERATION, 0, NULL);
1439 if( !transf )
1440 {
1441 return FALSE;
1442 }
1443
1444 if( proj_get_type(transf) != PJ_TYPE_CONVERSION )
1445 {
1446 proj_destroy(transf);
1447 return FALSE;
1448 }
1449
1450 /* Get the projection method code */
1451 proj_coordoperation_get_method_info(ctx, transf,
1452 NULL, /* method name */
1453 NULL, /* method auth name (should be EPSG) */
1454 &pszMethodCode);
1455 assert( pszMethodCode );
1456 nProjMethod = atoi(pszMethodCode);
14051457
14061458 /* -------------------------------------------------------------------- */
14071459 /* Initialize a definition of what EPSG codes need to be loaded */
14081460 /* into what fields in adfProjParms. */
14091461 /* -------------------------------------------------------------------- */
1410 nCTProjMethod = EPSGProjMethodToCTProjMethod( nProjMethod, TRUE );
1411 SetGTParmIds( nCTProjMethod, NULL, anEPSGCodes );
1412
1413 /* -------------------------------------------------------------------- */
1414 /* Get the parameters for this projection. For the time being */
1415 /* I am assuming the first four parameters are angles, the */
1416 /* fifth is unitless (normally scale), and the remainder are */
1417 /* linear measures. This works fine for the existing */
1418 /* projections, but is a pretty fragile approach. */
1419 /* -------------------------------------------------------------------- */
1420
1421 for( i = 0; i < 7; i++ )
1422 {
1423 char szParamUOMID[32], szParamValueID[32], szParamCodeID[32];
1424 const char *pszValue;
1425 int nUOM;
1426 int nEPSGCode = anEPSGCodes[i];
1427 int iEPSG;
1428
1429 /* Establish default */
1430 if( nEPSGCode == EPSGAngleRectifiedToSkewedGrid )
1431 adfProjParms[i] = 90.0;
1432 else if( nEPSGCode == EPSGNatOriginScaleFactor
1433 || nEPSGCode == EPSGInitialLineScaleFactor
1434 || nEPSGCode == EPSGPseudoStdParallelScaleFactor )
1435 adfProjParms[i] = 1.0;
1436 else
1437 adfProjParms[i] = 0.0;
1438
1439 /* If there is no parameter, skip */
1440 if( nEPSGCode == 0 )
1441 continue;
1442
1443 /* Find the matching parameter */
1444 for( iEPSG = 0; iEPSG < 7; iEPSG++ )
1445 {
1446 sprintf( szParamCodeID, "PARAMETER_CODE_%d", iEPSG+1 );
1447
1448 if( atoi(CSVGetField( pszFilename,
1449 "COORD_OP_CODE", szTRFCode, CC_Integer,
1450 szParamCodeID )) == nEPSGCode )
1451 break;
1452 }
1453
1454 /* not found, accept the default */
1455 if( iEPSG == 7 )
1456 {
1457 /* for CT_ObliqueMercator try alternate parameter codes first */
1458 /* because EPSG proj method 9812 uses EPSGFalseXXXXX, but 9815 uses EPSGProjCenterXXXXX */
1459 if ( nCTProjMethod == CT_ObliqueMercator && nEPSGCode == EPSGProjCenterEasting )
1460 nEPSGCode = EPSGFalseEasting;
1461 else if ( nCTProjMethod == CT_ObliqueMercator && nEPSGCode == EPSGProjCenterNorthing )
1462 nEPSGCode = EPSGFalseNorthing;
1463 /* for CT_PolarStereographic try alternate parameter codes first */
1464 /* because EPSG proj method 9829 uses EPSGLatOfStdParallel instead of EPSGNatOriginLat */
1465 /* and EPSGOriginLong instead of EPSGNatOriginLong */
1466 else if( nCTProjMethod == CT_PolarStereographic && nEPSGCode == EPSGNatOriginLat )
1467 nEPSGCode = EPSGLatOfStdParallel;
1468 else if( nCTProjMethod == CT_PolarStereographic && nEPSGCode == EPSGNatOriginLong )
1469 nEPSGCode = EPSGOriginLong;
1462 nCTProjMethod = EPSGProjMethodToCTProjMethod( nProjMethod, TRUE );
1463 SetGTParmIds( nCTProjMethod, nProjMethod, NULL, anEPSGCodes );
1464
1465 /* -------------------------------------------------------------------- */
1466 /* Get the parameters for this projection. */
1467 /* -------------------------------------------------------------------- */
1468
1469 for( i = 0; i < 7; i++ )
1470 {
1471 double dfValue = 0.0;
1472 double dfUnitConvFactor = 0.0;
1473 const char *pszUOMCategory = NULL;
1474 int nEPSGCode = anEPSGCodes[i];
1475 int iEPSG;
1476 int nParamCount;
1477
1478 /* Establish default */
1479 if( nEPSGCode == EPSGAngleRectifiedToSkewedGrid )
1480 adfProjParms[i] = 90.0;
1481 else if( nEPSGCode == EPSGNatOriginScaleFactor
1482 || nEPSGCode == EPSGInitialLineScaleFactor
1483 || nEPSGCode == EPSGPseudoStdParallelScaleFactor )
1484 adfProjParms[i] = 1.0;
14701485 else
1486 adfProjParms[i] = 0.0;
1487
1488 /* If there is no parameter, skip */
1489 if( nEPSGCode == 0 )
14711490 continue;
14721491
1473 for( iEPSG = 0; iEPSG < 7; iEPSG++ )
1492 nParamCount = proj_coordoperation_get_param_count(ctx, transf);
1493
1494 /* Find the matching parameter */
1495 for( iEPSG = 0; iEPSG < nParamCount; iEPSG++ )
14741496 {
1475 sprintf( szParamCodeID, "PARAMETER_CODE_%d", iEPSG+1 );
1476
1477 if( atoi(CSVGetField( pszFilename,
1478 "COORD_OP_CODE", szTRFCode, CC_Integer,
1479 szParamCodeID )) == nEPSGCode )
1497 const char* pszParamCode = NULL;
1498 proj_coordoperation_get_param(
1499 ctx, transf, iEPSG,
1500 NULL, /* name */
1501 NULL, /* auth name */
1502 &pszParamCode,
1503 &dfValue,
1504 NULL, /* value (string) */
1505 &dfUnitConvFactor, /* unit conv factor */
1506 NULL, /* unit name */
1507 NULL, /* unit auth name */
1508 NULL, /* unit code */
1509 &pszUOMCategory /* unit category */);
1510 assert(pszParamCode);
1511 if( atoi(pszParamCode) == nEPSGCode )
1512 {
14801513 break;
1514 }
14811515 }
14821516
1483 if( iEPSG == 7 )
1484 continue;
1485 }
1486
1487 /* Get the value, and UOM */
1488 sprintf( szParamUOMID, "PARAMETER_UOM_%d", iEPSG+1 );
1489 sprintf( szParamValueID, "PARAMETER_VALUE_%d", iEPSG+1 );
1490
1491 nUOM = atoi(CSVGetField( pszFilename,
1492 "COORD_OP_CODE", szTRFCode, CC_Integer,
1493 szParamUOMID ));
1494 pszValue = CSVGetField( pszFilename,
1495 "COORD_OP_CODE", szTRFCode, CC_Integer,
1496 szParamValueID );
1497
1498 /* Transform according to the UOM */
1499 if( nUOM >= 9100 && nUOM < 9200 )
1500 adfProjParms[i] = GTIFAngleStringToDD( pszValue, nUOM );
1501 else if( nUOM > 9000 && nUOM < 9100 )
1502 {
1503 double dfInMeters;
1504
1505 if( !GTIFGetUOMLengthInfo( nUOM, NULL, &dfInMeters ) )
1506 dfInMeters = 1.0;
1507 adfProjParms[i] = GTIFAtof(pszValue) * dfInMeters;
1508 }
1509 else
1510 adfProjParms[i] = GTIFAtof(pszValue);
1511 }
1517 /* not found, accept the default */
1518 if( iEPSG == nParamCount )
1519 {
1520 /* for CT_ObliqueMercator try alternate parameter codes first */
1521 /* because EPSG proj method 9812 uses EPSGFalseXXXXX, but 9815 uses EPSGProjCenterXXXXX */
1522 if ( nCTProjMethod == CT_ObliqueMercator && nEPSGCode == EPSGProjCenterEasting )
1523 nEPSGCode = EPSGFalseEasting;
1524 else if ( nCTProjMethod == CT_ObliqueMercator && nEPSGCode == EPSGProjCenterNorthing )
1525 nEPSGCode = EPSGFalseNorthing;
1526 /* for CT_PolarStereographic try alternate parameter codes first */
1527 /* because EPSG proj method 9829 uses EPSGLatOfStdParallel instead of EPSGNatOriginLat */
1528 /* and EPSGOriginLong instead of EPSGNatOriginLong */
1529 else if( nCTProjMethod == CT_PolarStereographic && nEPSGCode == EPSGNatOriginLat )
1530 nEPSGCode = EPSGLatOfStdParallel;
1531 else if( nCTProjMethod == CT_PolarStereographic && nEPSGCode == EPSGNatOriginLong )
1532 nEPSGCode = EPSGOriginLong;
1533 else
1534 continue;
1535
1536 for( iEPSG = 0; iEPSG < nParamCount; iEPSG++ )
1537 {
1538 const char* pszParamCode = NULL;
1539 proj_coordoperation_get_param(
1540 ctx, transf, iEPSG,
1541 NULL, /* name */
1542 NULL, /* auth name */
1543 &pszParamCode,
1544 &dfValue,
1545 NULL, /* value (string) */
1546 &dfUnitConvFactor, /* unit conv factor */
1547 NULL, /* unit name */
1548 NULL, /* unit auth name */
1549 NULL, /* unit code */
1550 &pszUOMCategory /* unit category */);
1551 assert(pszParamCode);
1552 if( atoi(pszParamCode) == nEPSGCode )
1553 {
1554 break;
1555 }
1556 }
1557
1558 if( iEPSG == nParamCount )
1559 continue;
1560 }
1561
1562 assert(pszUOMCategory);
1563
1564 adfProjParms[i] = dfValue * dfUnitConvFactor;
1565 if( strcmp(pszUOMCategory, "angular") == 0.0 )
1566 {
1567 /* Convert from radians to degrees */
1568 adfProjParms[i] *= 180 / M_PI;
1569 }
1570 }
15121571
15131572 /* -------------------------------------------------------------------- */
15141573 /* Get the name, if requested. */
15151574 /* -------------------------------------------------------------------- */
1516 if( ppszProjTRFName != NULL )
1517 {
1518 *ppszProjTRFName =
1519 CPLStrdup(CSVGetField( pszFilename,
1520 "COORD_OP_CODE", szTRFCode, CC_Integer,
1521 "COORD_OP_NAME" ));
1522 }
1575 if( ppszProjTRFName != NULL )
1576 {
1577 const char* pszName = proj_get_name(transf);
1578 if( !pszName )
1579 {
1580 // shouldn't happen
1581 proj_destroy(transf);
1582 return FALSE;
1583 }
1584 *ppszProjTRFName = CPLStrdup(pszName);
1585 }
15231586
15241587 /* -------------------------------------------------------------------- */
15251588 /* Transfer requested data into passed variables. */
15261589 /* -------------------------------------------------------------------- */
1527 if( pnProjMethod != NULL )
1528 *pnProjMethod = (short) nProjMethod;
1529
1530 if( padfProjParms != NULL )
1531 {
1532 for( i = 0; i < 7; i++ )
1533 padfProjParms[i] = adfProjParms[i];
1534 }
1535
1536 CPLFree( pszFilename );
1537
1538 return TRUE;
1590 if( pnProjMethod != NULL )
1591 *pnProjMethod = (short) nProjMethod;
1592
1593 if( padfProjParms != NULL )
1594 {
1595 for( i = 0; i < 7; i++ )
1596 padfProjParms[i] = adfProjParms[i];
1597 }
1598
1599 proj_destroy(transf);
1600
1601 return TRUE;
1602 }
1603 }
1604
1605 int GTIFGetProjTRFInfo( /* Conversion code */
1606 int nProjTRFCode,
1607 char **ppszProjTRFName,
1608 short * pnProjMethod,
1609 double * padfProjParms )
1610 {
1611 PJ_CONTEXT* ctx = proj_context_create();
1612 int ret = GTIFGetProjTRFInfoEx(
1613 ctx, nProjTRFCode, ppszProjTRFName, pnProjMethod, padfProjParms);
1614 proj_context_destroy(ctx);
1615 return ret;
15391616 }
15401617
15411618 /************************************************************************/
18231900 break;
18241901
18251902 /* -------------------------------------------------------------------- */
1903 case CT_ObliqueMercator_Laborde:
1904 /* -------------------------------------------------------------------- */
1905 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLongGeoKey,
1906 &dfNatOriginLong, 0, 1 ) == 0
1907 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLongGeoKey,
1908 &dfNatOriginLong, 0, 1 ) == 0
1909 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLongGeoKey,
1910 &dfNatOriginLong, 0, 1 ) == 0 )
1911 dfNatOriginLong = 0.0;
1912
1913 if( GTIFKeyGetDOUBLE(psGTIF, ProjNatOriginLatGeoKey,
1914 &dfNatOriginLat, 0, 1 ) == 0
1915 && GTIFKeyGetDOUBLE(psGTIF, ProjFalseOriginLatGeoKey,
1916 &dfNatOriginLat, 0, 1 ) == 0
1917 && GTIFKeyGetDOUBLE(psGTIF, ProjCenterLatGeoKey,
1918 &dfNatOriginLat, 0, 1 ) == 0 )
1919 dfNatOriginLat = 0.0;
1920
1921 if( GTIFKeyGetDOUBLE(psGTIF, ProjAzimuthAngleGeoKey,
1922 &dfAzimuth, 0, 1 ) == 0 )
1923 dfAzimuth = 0.0;
1924
1925 if( GTIFKeyGetDOUBLE(psGTIF, ProjScaleAtNatOriginGeoKey,
1926 &dfNatOriginScale, 0, 1 ) == 0
1927 && GTIFKeyGetDOUBLE(psGTIF, ProjScaleAtCenterGeoKey,
1928 &dfNatOriginScale, 0, 1 ) == 0 )
1929 dfNatOriginScale = 1.0;
1930
1931 /* notdef: should transform to decimal degrees at this point */
1932
1933 psDefn->ProjParm[0] = dfNatOriginLat;
1934 psDefn->ProjParmId[0] = ProjCenterLatGeoKey;
1935 psDefn->ProjParm[1] = dfNatOriginLong;
1936 psDefn->ProjParmId[1] = ProjCenterLongGeoKey;
1937 psDefn->ProjParm[2] = dfAzimuth;
1938 psDefn->ProjParmId[2] = ProjAzimuthAngleGeoKey;
1939 psDefn->ProjParm[4] = dfNatOriginScale;
1940 psDefn->ProjParmId[4] = ProjScaleAtCenterGeoKey;
1941 psDefn->ProjParm[5] = dfFalseEasting;
1942 psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
1943 psDefn->ProjParm[6] = dfFalseNorthing;
1944 psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
1945
1946 psDefn->nParms = 7;
1947 break;
1948
1949 /* -------------------------------------------------------------------- */
18261950 case CT_CassiniSoldner:
18271951 case CT_Polyconic:
18281952 /* -------------------------------------------------------------------- */
21702294
21712295 This function reads the coordinate system definition from a GeoTIFF file,
21722296 and <i>normalizes</i> it into a set of component information using
2173 definitions from CSV (Comma Separated Value ASCII) files derived from
2174 EPSG tables. This function is intended to simplify correct support for
2297 definitions from the EPSG database as provided by the PROJ library.
2298 This function is intended to simplify correct support for
21752299 reading files with defined PCS (Projected Coordinate System) codes that
21762300 wouldn't otherwise be directly known by application software by reducing
21772301 it to the underlying projection method, parameters, datum, ellipsoid,
21802304 The application should pass a pointer to an existing uninitialized
21812305 GTIFDefn structure, and GTIFGetDefn() will fill it in. The function
21822306 currently always returns TRUE but in the future will return FALSE if
2183 CSV files are not found. In any event, all geokeys actually found in the
2184 file will be copied into the GTIFDefn. However, if the CSV files aren't
2185 found codes implied by other codes will not be set properly.<p>
2186
2187 GTIFGetDefn() will not generally work if the EPSG derived CSV files cannot
2188 be found. By default a modest attempt will be made to find them, but
2189 in general it is necessary for the calling application to override the
2190 logic to find them. This can be done by calling the
2191 SetCSVFilenameHook() function to
2192 override the search method based on application knowledge of where they are
2193 found.<p>
2307 the database is not found. In any event, all geokeys actually found in the
2308 file will be copied into the GTIFDefn. However, if the database isn't
2309 found, codes implied by other codes will not be set properly.<p>
2310
2311 GTIFGetDefn() will not generally work if the EPSG derived database cannot
2312 be found.<p>
21942313
21952314 The normalization methodology operates by fetching tags from the GeoTIFF
21962315 file, and then setting all other tags implied by them in the structure. The
21972316 implied relationships are worked out by reading definitions from the
2198 various EPSG derived CSV tables.<p>
2317 various EPSG derived database tables.<p>
21992318
22002319 For instance, if a PCS (ProjectedCSTypeGeoKey) is found in the GeoTIFF file
2201 this code is used to lookup a record in the <tt>horiz_cs.csv</tt> CSV
2202 file. For example given the PCS 26746 we can find the name
2320 this code is used to lookup a record in the database.
2321 For example given the PCS 26746 we can find the name
22032322 (NAD27 / California zone VI), the GCS 4257 (NAD27), and the ProjectionCode
22042323 10406 (California CS27 zone VI). The GCS, and ProjectionCode can in turn
22052324 be looked up in other tables until all the details of units, ellipsoid,
22732392 be used as an example of code that converts a GTIFDefn into another projection
22742393 system.<p>
22752394
2276 @see GTIFKeySet(), SetCSVFilenameHook()
2395 @see GTIFKeySet()
22772396
22782397 */
22792398
22832402 int i;
22842403 short nGeogUOMLinear;
22852404 double dfInvFlattening;
2405
2406 if( !GTIFGetPROJContext(psGTIF, TRUE, NULL) )
2407 {
2408 return FALSE;
2409 }
22862410
22872411 /* -------------------------------------------------------------------- */
22882412 /* Initially we default all the information we can. */
23552479 /*
23562480 * Translate this into useful information.
23572481 */
2358 GTIFGetPCSInfo( psDefn->PCS, NULL, &(psDefn->ProjCode),
2359 &(psDefn->UOMLength), &(psDefn->GCS) );
2360 }
2361
2362 /* -------------------------------------------------------------------- */
2363 /* If we have the PCS code, but didn't find it in the CSV files */
2482 GTIFGetPCSInfoEx( psGTIF->pj_context,
2483 psDefn->PCS, NULL, &(psDefn->ProjCode),
2484 &(psDefn->UOMLength), &(psDefn->GCS) );
2485 }
2486
2487 /* -------------------------------------------------------------------- */
2488 /* If we have the PCS code, but didn't find it in the database */
23642489 /* (likely because we can't find them) we will try some ``jiffy */
23652490 /* rules'' for UTM and state plane. */
23662491 /* -------------------------------------------------------------------- */
23922517 * The nProjTRFCode itself would correspond to the name
23932518 * ``UTM zone 11N'', and doesn't include datum info.
23942519 */
2395 GTIFGetProjTRFInfo( psDefn->ProjCode, NULL, &(psDefn->Projection),
2396 psDefn->ProjParm );
2520 GTIFGetProjTRFInfoEx( psGTIF->pj_context,
2521 psDefn->ProjCode, NULL, &(psDefn->Projection),
2522 psDefn->ProjParm );
23972523
23982524 /*
23992525 * Set the GeoTIFF identity of the parameters.
24022528 EPSGProjMethodToCTProjMethod( psDefn->Projection, FALSE );
24032529
24042530 SetGTParmIds( EPSGProjMethodToCTProjMethod(psDefn->Projection, TRUE),
2531 psDefn->Projection,
24052532 psDefn->ProjParmId, NULL);
24062533 psDefn->nParms = 7;
24072534 }
24192546 /* -------------------------------------------------------------------- */
24202547 if( psDefn->GCS != KvUserDefined )
24212548 {
2422 GTIFGetGCSInfo( psDefn->GCS, NULL, &(psDefn->Datum), &(psDefn->PM),
2423 &(psDefn->UOMAngle) );
2549 GTIFGetGCSInfoEx( psGTIF->pj_context,
2550 psDefn->GCS, NULL, &(psDefn->Datum), &(psDefn->PM),
2551 &(psDefn->UOMAngle) );
24242552 }
24252553
24262554 /* -------------------------------------------------------------------- */
24302558 GTIFKeyGetSHORT(psGTIF, GeogAngularUnitsGeoKey, &(psDefn->UOMAngle), 0, 1 );
24312559 if( psDefn->UOMAngle != KvUserDefined )
24322560 {
2433 GTIFGetUOMAngleInfo( psDefn->UOMAngle, NULL,
2434 &(psDefn->UOMAngleInDegrees) );
2561 GTIFGetUOMAngleInfoEx( psGTIF->pj_context,
2562 psDefn->UOMAngle, NULL,
2563 &(psDefn->UOMAngleInDegrees) );
24352564 }
24362565
24372566 /* -------------------------------------------------------------------- */
24422571
24432572 if( psDefn->Datum != KvUserDefined )
24442573 {
2445 GTIFGetDatumInfo( psDefn->Datum, NULL, &(psDefn->Ellipsoid) );
2574 GTIFGetDatumInfoEx( psGTIF->pj_context,
2575 psDefn->Datum, NULL, &(psDefn->Ellipsoid) );
24462576 }
24472577
24482578 /* -------------------------------------------------------------------- */
24532583
24542584 if( psDefn->Ellipsoid != KvUserDefined )
24552585 {
2456 GTIFGetEllipsoidInfo( psDefn->Ellipsoid, NULL,
2457 &(psDefn->SemiMajor), &(psDefn->SemiMinor) );
2586 GTIFGetEllipsoidInfoEx( psGTIF->pj_context,
2587 psDefn->Ellipsoid, NULL,
2588 &(psDefn->SemiMajor), &(psDefn->SemiMinor) );
24582589 }
24592590
24602591 /* -------------------------------------------------------------------- */
24822613
24832614 if( psDefn->PM != KvUserDefined )
24842615 {
2485 GTIFGetPMInfo( psDefn->PM, NULL, &(psDefn->PMLongToGreenwich) );
2616 GTIFGetPMInfoEx( psGTIF->pj_context,
2617 psDefn->PM, NULL, &(psDefn->PMLongToGreenwich) );
24862618 }
24872619 else
24882620 {
25122644
25132645 if( psDefn->UOMLength != KvUserDefined )
25142646 {
2515 GTIFGetUOMLengthInfo( psDefn->UOMLength, NULL,
2516 &(psDefn->UOMLengthInMeters) );
2647 GTIFGetUOMLengthInfoEx( psGTIF->pj_context,
2648 psDefn->UOMLength, NULL,
2649 &(psDefn->UOMLengthInMeters) );
25172650 }
25182651 else
25192652 {
25362669
25372670 /* -------------------------------------------------------------------- */
25382671 /* If this is UTM, and we were unable to extract the projection */
2539 /* parameters from the CSV file, just set them directly now, */
2672 /* parameters from the database just set them directly now, */
25402673 /* since it's pretty easy, and a common case. */
25412674 /* -------------------------------------------------------------------- */
25422675 if( (psDefn->MapSys == MapSys_UTM_North
26182751 /* debugging. */
26192752 /************************************************************************/
26202753
2621 void GTIFPrintDefn( GTIFDefn * psDefn, FILE * fp )
2622
2623 {
2754 void GTIFPrintDefnEx( GTIF *psGTIF, GTIFDefn * psDefn, FILE * fp )
2755
2756 {
2757 GTIFGetPROJContext(psGTIF, TRUE, NULL);
2758
26242759 /* -------------------------------------------------------------------- */
26252760 /* Do we have anything to report? */
26262761 /* -------------------------------------------------------------------- */
26372772 {
26382773 char *pszPCSName = NULL;
26392774
2640 GTIFGetPCSInfo( psDefn->PCS, &pszPCSName, NULL, NULL, NULL );
2775 if( psGTIF->pj_context )
2776 {
2777 GTIFGetPCSInfoEx( psGTIF->pj_context,
2778 psDefn->PCS, &pszPCSName, NULL, NULL, NULL );
2779 }
26412780 if( pszPCSName == NULL )
26422781 pszPCSName = CPLStrdup("name unknown");
26432782
26522791 {
26532792 char *pszTRFName = NULL;
26542793
2655 GTIFGetProjTRFInfo( psDefn->ProjCode, &pszTRFName, NULL, NULL );
2794 if( psGTIF->pj_context )
2795 {
2796 GTIFGetProjTRFInfoEx( psGTIF->pj_context,
2797 psDefn->ProjCode, &pszTRFName, NULL, NULL );
2798 }
26562799 if( pszTRFName == NULL )
26572800 pszTRFName = CPLStrdup("");
26582801
26672810 /* -------------------------------------------------------------------- */
26682811 if( psDefn->CTProjection != KvUserDefined )
26692812 {
2670 char *pszName = GTIFValueName(ProjCoordTransGeoKey,
2671 psDefn->CTProjection);
2813 const char *pszProjectionMethodName =
2814 GTIFValueNameEx(psGTIF,
2815 ProjCoordTransGeoKey,
2816 psDefn->CTProjection);
26722817 int i;
26732818
2674 if( pszName == NULL )
2675 pszName = "(unknown)";
2676
2677 fprintf( fp, "Projection Method: %s\n", pszName );
2819 if( pszProjectionMethodName == NULL )
2820 pszProjectionMethodName = "(unknown)";
2821
2822 fprintf( fp, "Projection Method: %s\n", pszProjectionMethodName );
26782823
26792824 for( i = 0; i < psDefn->nParms; i++ )
26802825 {
2826 char* pszName;
26812827 if( psDefn->ProjParmId[i] == 0 )
26822828 continue;
26832829
27142860 {
27152861 char *pszName = NULL;
27162862
2717 GTIFGetGCSInfo( psDefn->GCS, &pszName, NULL, NULL, NULL );
2863 if( psGTIF->pj_context )
2864 {
2865 GTIFGetGCSInfoEx( psGTIF->pj_context,
2866 psDefn->GCS, &pszName, NULL, NULL, NULL );
2867 }
27182868 if( pszName == NULL )
27192869 pszName = CPLStrdup("(unknown)");
27202870
27292879 {
27302880 char *pszName = NULL;
27312881
2732 GTIFGetDatumInfo( psDefn->Datum, &pszName, NULL );
2882 if( psGTIF->pj_context )
2883 {
2884 GTIFGetDatumInfoEx( psGTIF->pj_context,
2885 psDefn->Datum, &pszName, NULL );
2886 }
27332887 if( pszName == NULL )
27342888 pszName = CPLStrdup("(unknown)");
27352889
27442898 {
27452899 char *pszName = NULL;
27462900
2747 GTIFGetEllipsoidInfo( psDefn->Ellipsoid, &pszName, NULL, NULL );
2901 if( psGTIF->pj_context )
2902 {
2903 GTIFGetEllipsoidInfoEx( psGTIF->pj_context,
2904 psDefn->Ellipsoid, &pszName, NULL, NULL );
2905 }
27482906 if( pszName == NULL )
27492907 pszName = CPLStrdup("(unknown)");
27502908
27612919 {
27622920 char *pszName = NULL;
27632921
2764 GTIFGetPMInfo( psDefn->PM, &pszName, NULL );
2922 if( psGTIF->pj_context )
2923 {
2924 GTIFGetPMInfoEx( psGTIF->pj_context,
2925 psDefn->PM, &pszName, NULL );
2926 }
27652927
27662928 if( pszName == NULL )
27672929 pszName = CPLStrdup("(unknown)");
28022964 {
28032965 char *pszName = NULL;
28042966
2805 GTIFGetUOMLengthInfo( psDefn->UOMLength, &pszName, NULL );
2967 if( psGTIF->pj_context )
2968 {
2969 GTIFGetUOMLengthInfoEx(
2970 psGTIF->pj_context, psDefn->UOMLength, &pszName, NULL );
2971 }
28062972 if( pszName == NULL )
28072973 pszName = CPLStrdup( "(unknown)" );
28082974
28152981 fprintf( fp, "Projection Linear Units: User-Defined (%fm)\n",
28162982 psDefn->UOMLengthInMeters );
28172983 }
2984 }
2985
2986 void GTIFPrintDefn( GTIFDefn * psDefn, FILE * fp )
2987 {
2988 GTIF *psGTIF = GTIFNew(NULL);
2989 GTIFPrintDefnEx(psGTIF, psDefn, fp);
2990 GTIFFree(psGTIF);
28182991 }
28192992
28202993 /************************************************************************/
28293002 {
28303003 if( pMemory != NULL )
28313004 VSIFree( pMemory );
2832 }
2833
2834 /************************************************************************/
2835 /* GTIFDeaccessCSV() */
2836 /* */
2837 /* Free all cached CSV info. */
2838 /************************************************************************/
2839
2840 void GTIFDeaccessCSV()
2841
2842 {
2843 CSVDeaccess( NULL );
28443005 }
28453006
28463007 /************************************************************************/
28663027 {
28673028 VSIFree( defn );
28683029 }
3030
3031 /************************************************************************/
3032 /* GTIFAttachPROJContext() */
3033 /* */
3034 /* Attach an existing PROJ context to the GTIF handle, but */
3035 /* ownership of the context remains to the caller. */
3036 /************************************************************************/
3037
3038 void GTIFAttachPROJContext( GTIF *psGTIF, void* pjContext )
3039 {
3040 if( psGTIF->own_pj_context )
3041 {
3042 proj_context_destroy(psGTIF->pj_context);
3043 }
3044 psGTIF->own_pj_context = FALSE;
3045 psGTIF->pj_context = (PJ_CONTEXT*) pjContext;
3046 }
3047
3048 /************************************************************************/
3049 /* GTIFGetPROJContext() */
3050 /* */
3051 /* 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,
3057 int* out_gtif_own_pj_context )
3058 {
3059 if( psGTIF->pj_context || !instanciateIfNeeded )
3060 {
3061 if( out_gtif_own_pj_context )
3062 {
3063 *out_gtif_own_pj_context = psGTIF->own_pj_context;
3064 }
3065 return psGTIF->pj_context;
3066 }
3067 psGTIF->pj_context = proj_context_create();
3068 psGTIF->own_pj_context = psGTIF->pj_context != NULL;
3069 if( out_gtif_own_pj_context )
3070 {
3071 *out_gtif_own_pj_context = psGTIF->own_pj_context;
3072 }
3073 return psGTIF->pj_context;
3074 }
3075
3076
3077 void GTIFDeaccessCSV( void )
3078 {
3079 /* No operation */
3080 }
3081
3082 #ifndef GDAL_COMPILATION
3083 void SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) )
3084 {
3085 (void)CSVFileOverride;
3086 /* No operation */
3087 }
3088 #endif
00 /******************************************************************************
1 * $Id: geo_normalize.h 2762 2017-04-14 11:48:02Z rouault $
1 * $Id$
22 *
33 * Project: libgeotiff
44 * Purpose: Include file related to geo_normalize.c containing Code to
171171
172172 /* this should be used to free strings returned by GTIFGet... funcs */
173173 void GTIF_DLL GTIFFreeMemory( char * );
174 void GTIF_DLL GTIFDeaccessCSV( void );
174
175 /* The void* should be a PJ_CONTEXT* */
176 void GTIF_DLL GTIFAttachPROJContext( GTIF *psGTIF, void* pjContext );
177 void GTIF_DLL *GTIFGetPROJContext( GTIF *psGTIF, int instanciateIfNeeded,
178 int* out_gtif_own_pj_context );
175179
176180 int GTIF_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
177181 void GTIF_DLL GTIFPrintDefn( GTIFDefn *, FILE * );
182 void GTIF_DLL GTIFPrintDefnEx( GTIF *psGTIF, GTIFDefn *, FILE * );
178183 GTIFDefn GTIF_DLL *GTIFAllocDefn( void );
179184 void GTIF_DLL GTIFFreeDefn( GTIFDefn * );
180185
181 void GTIF_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
182
183186 const char GTIF_DLL *GTIFDecToDMS( double, const char *, int );
184187
185188 /*
186 * These are useful for recognising UTM and State Plane, with or without
187 * CSV files being found.
189 * These are useful for recognising UTM and State Plane.
188190 */
189191
190192 #define MapSys_UTM_North -9001
207209
208210 int GTIF_DLL GTIFSetFromProj4( GTIF *gtif, const char *proj4 );
209211
210 #if defined(HAVE_LIBPROJ) && defined(HAVE_PROJECTS_H)
211 # define HAVE_GTIFPROJ4
212 #endif
212
213 /*
214 * The following functions were used up to libgeotiff 1.4.X series, but
215 * are now no-operation, since there is no longer any CSV use in libgeotiff.
216 */
217 void GTIF_DLL GTIFDeaccessCSV( void );
218
213219
214220 #ifdef __cplusplus
215221 }
3737 #define FMT_SHORT "%-11hu"
3838
3939 static int DefaultPrint(char *string, void *aux);
40 static void PrintKey(GeoKey *key, GTIFPrintMethod print,void *aux);
40 static void PrintKey(GTIF *gtif,GeoKey *key, GTIFPrintMethod print,void *aux);
4141 static void PrintGeoTags(GTIF *gtif,GTIFReadMethod scan,void *aux);
4242 static void PrintTag(int tag, int nrows, double *data, int ncols,
4343 GTIFPrintMethod print,void *aux);
7878
7979 sprintf(message," %s\n",FMT_KEYS); print(message,aux);
8080 for (i=0; i<numkeys; i++)
81 PrintKey(++key,print,aux);
81 {
82 ++key;
83 PrintKey(gtif, key,print,aux);
84 }
8285 sprintf(message," %s\n",FMT_KEYEND); print(message,aux);
8386
8487 sprintf(message," %s\n",FMT_GEOEND); print(message,aux);
129132 }
130133
131134
132 static void PrintKey(GeoKey *key, GTIFPrintMethod print, void *aux)
135 static void PrintKey(GTIF *gtif, GeoKey *key, GTIFPrintMethod print, void *aux)
133136 {
134137 char *data;
135138 geokey_t keyid = (geokey_t) key->gk_key;
210213 sptr = (pinfo_t *)data;
211214 if (count==1)
212215 {
213 print( GTIFValueName(keyid,*sptr), aux );
216 print( (char*)GTIFValueNameEx(gtif,keyid,*sptr), aux );
214217 print( "\n", aux );
215218 }
216219 else if( sptr == NULL && count > 0 )
00 /******************************************************************************
1 * $Id: geo_trans.c 2741 2016-09-04 18:50:49Z rouault $
1 * $Id$
22 *
33 * Project: libgeotiff
44 * Purpose: Code to abstract translation between pixel/line and PCS
2929 */
3030 #define GvCurrentVersion 1
3131
32 #define LIBGEOTIFF_VERSION 1430
32 #define LIBGEOTIFF_VERSION 1500
3333
3434 #include "geo_config.h"
3535 #include "geokeys.h"
127127 int GTIF_DLL GTIFImport(GTIF *gtif, GTIFReadMethod scan, void *aux);
128128 char GTIF_DLL *GTIFKeyName(geokey_t key);
129129 char GTIF_DLL *GTIFValueName(geokey_t key,int value);
130 const char GTIF_DLL *GTIFValueNameEx(GTIF* gtif, geokey_t key,int value);
130131 char GTIF_DLL *GTIFTypeName(tagtype_t type);
131132 char GTIF_DLL *GTIFTagName(int tag);
132133 int GTIF_DLL GTIFKeyCode(char * key);
00 /******************************************************************************
1 * $Id: geotiff_proj4.c 2741 2016-09-04 18:50:49Z rouault $
1 * $Id$
22 *
33 * Project: libgeotiff
44 * Purpose: Code to convert a normalized GeoTIFF definition into a PROJ.4
3333 #include "geo_normalize.h"
3434 #include "geovalues.h"
3535 #include "geo_tiffp.h"
36 #include "proj.h"
37
38 /************************************************************************/
39 /* GTIFProj4AppendEllipsoid() */
40 /************************************************************************/
41
42 static void GTIFProj4AppendEllipsoid(GTIFDefn* psDefn, char* pszProjection)
43 {
44 /* ==================================================================== */
45 /* Handle ellipsoid information. */
46 /* ==================================================================== */
47 if( psDefn->Ellipsoid == Ellipse_WGS_84 )
48 strcat( pszProjection, "+ellps=WGS84 " );
49 else if( psDefn->Ellipsoid == Ellipse_Clarke_1866 )
50 strcat( pszProjection, "+ellps=clrk66 " );
51 else if( psDefn->Ellipsoid == Ellipse_Clarke_1880 )
52 strcat( pszProjection, "+ellps=clrk80 " );
53 else if( psDefn->Ellipsoid == Ellipse_GRS_1980 )
54 strcat( pszProjection, "+ellps=GRS80 " );
55 else
56 {
57 if( psDefn->SemiMajor != 0.0 && psDefn->SemiMinor != 0.0 )
58 {
59 sprintf( pszProjection+strlen(pszProjection),
60 "+a=%.3f +b=%.3f ",
61 psDefn->SemiMajor,
62 psDefn->SemiMinor );
63 }
64 }
65 }
3666
3767 /************************************************************************/
3868 /* OSRProj4Tokenize() */
934964 "+proj=tmerc +lat_0=%.9f +lon_0=%.9f +k=%f +x_0=%.3f +y_0=%.3f ",
935965 psDefn->ProjParm[0],
936966 psDefn->ProjParm[1],
967 psDefn->ProjParm[4],
968 dfFalseEasting,
969 dfFalseNorthing );
970 }
971
972 /* -------------------------------------------------------------------- */
973 /* Oblique Mercator */
974 /* -------------------------------------------------------------------- */
975 else if( psDefn->CTProjection == CT_ObliqueMercator_Laborde )
976 {
977 sprintf( szProjection+strlen(szProjection),
978 "+proj=labrd +lat_0=%.9f +lon_0=%.9f +azi=%.9f +k=%f +x_0=%.3f +y_0=%.3f ",
979 psDefn->ProjParm[0],
980 psDefn->ProjParm[1],
981 psDefn->ProjParm[2],
937982 psDefn->ProjParm[4],
938983 dfFalseEasting,
939984 dfFalseNorthing );
13121357 }*/
13131358 }
13141359 }
1315 /* ==================================================================== */
1316 /* Handle ellipsoid information. */
1317 /* ==================================================================== */
1318 if( psDefn->Ellipsoid == Ellipse_WGS_84 )
1319 strcat( szProjection, "+ellps=WGS84 " );
1320 else if( psDefn->Ellipsoid == Ellipse_Clarke_1866 )
1321 strcat( szProjection, "+ellps=clrk66 " );
1322 else if( psDefn->Ellipsoid == Ellipse_Clarke_1880 )
1323 strcat( szProjection, "+ellps=clrk80 " );
1324 else if( psDefn->Ellipsoid == Ellipse_GRS_1980 )
1325 strcat( szProjection, "+ellps=GRS80 " );
1326 else
1327 {
1328 if( psDefn->SemiMajor != 0.0 && psDefn->SemiMinor != 0.0 )
1329 {
1330 sprintf( szProjection+strlen(szProjection),
1331 "+a=%.3f +b=%.3f ",
1332 psDefn->SemiMajor,
1333 psDefn->SemiMinor );
1334 }
1335 }
1360
1361 GTIFProj4AppendEllipsoid(psDefn, szProjection);
13361362
13371363 strcat( szProjection, szUnits );
13381364
13411367
13421368 return CPLStrdup( szProjection );
13431369 }
1344
1345 #if !defined(HAVE_LIBPROJ)
1346
1347 int GTIFProj4ToLatLong( GTIFDefn * psDefn, int nPoints,
1348 double *padfX, double *padfY )
1349 {
1350 (void) psDefn;
1351 (void) nPoints;
1352 (void) padfX;
1353 (void) padfY;
1354 #ifdef DEBUG
1355 fprintf( stderr,
1356 "GTIFProj4ToLatLong() - PROJ.4 support not compiled in.\n" );
1357 #endif
1358 return FALSE;
1359 }
1360
1361 int GTIFProj4FromLatLong( GTIFDefn * psDefn, int nPoints,
1362 double *padfX, double *padfY )
1363 {
1364 (void) psDefn;
1365 (void) nPoints;
1366 (void) padfX;
1367 (void) padfY;
1368 #ifdef DEBUG
1369 fprintf( stderr,
1370 "GTIFProj4FromLatLong() - PROJ.4 support not compiled in.\n" );
1371 #endif
1372 return FALSE;
1373 }
1374 #else
1375
1376 #include "proj_api.h"
13771370
13781371 /************************************************************************/
13791372 /* GTIFProj4FromLatLong() */
13861379 double *padfX, double *padfY )
13871380
13881381 {
1389 char *pszProjection, **papszArgs;
1390 projPJ *psPJ;
1382 char szLongLat[256];
1383 char *pszProjection;
1384 PJ *psPJ;
13911385 int i;
1386 PJ_CONTEXT* ctx;
13921387
13931388 /* -------------------------------------------------------------------- */
13941389 /* Get a projection definition. */
13981393 if( pszProjection == NULL )
13991394 return FALSE;
14001395
1401 /* -------------------------------------------------------------------- */
1402 /* Parse into tokens for pj_init(), and initialize the projection. */
1403 /* -------------------------------------------------------------------- */
1404
1405 papszArgs = CSLTokenizeStringComplex( pszProjection, " +", TRUE, FALSE );
1406 free( pszProjection );
1407
1408 psPJ = pj_init( CSLCount(papszArgs), papszArgs );
1409
1410 CSLDestroy( papszArgs );
1396 ctx = proj_context_create();
1397
1398 strcpy(szLongLat, "+proj=longlat ");
1399 GTIFProj4AppendEllipsoid(psDefn, szLongLat);
1400
1401 psPJ = proj_create_crs_to_crs( ctx, szLongLat, pszProjection, NULL );
1402 CPLFree( pszProjection );
14111403
14121404 if( psPJ == NULL )
14131405 {
1406 proj_context_destroy(ctx);
14141407 return FALSE;
14151408 }
14161409
14191412 /* -------------------------------------------------------------------- */
14201413 for( i = 0; i < nPoints; i++ )
14211414 {
1422 projUV sUV;
1423
1424 sUV.u = padfX[i] * DEG_TO_RAD;
1425 sUV.v = padfY[i] * DEG_TO_RAD;
1426
1427 sUV = pj_fwd( sUV, psPJ );
1428
1429 padfX[i] = sUV.u;
1430 padfY[i] = sUV.v;
1431 }
1432
1433 pj_free( psPJ );
1415 PJ_COORD coord;
1416 coord.xyzt.x = padfX[i];
1417 coord.xyzt.y = padfY[i];
1418 coord.xyzt.z = 0;
1419 coord.xyzt.t = 0;
1420
1421 coord = proj_trans(psPJ, PJ_FWD, coord);
1422
1423 padfX[i] = coord.xyzt.x;
1424 padfY[i] = coord.xyzt.y;
1425 }
1426
1427 proj_destroy( psPJ );
1428 proj_context_destroy(ctx);
14341429
14351430 return TRUE;
14361431 }
14461441 double *padfX, double *padfY )
14471442
14481443 {
1449 char *pszProjection, **papszArgs;
1450 projPJ *psPJ;
1444 char szLongLat[256];
1445 char *pszProjection;
1446 PJ *psPJ;
14511447 int i;
1448 PJ_CONTEXT* ctx;
14521449
14531450 /* -------------------------------------------------------------------- */
14541451 /* Get a projection definition. */
14581455 if( pszProjection == NULL )
14591456 return FALSE;
14601457
1461 /* -------------------------------------------------------------------- */
1462 /* Parse into tokens for pj_init(), and initialize the projection. */
1463 /* -------------------------------------------------------------------- */
1464
1465 papszArgs = CSLTokenizeStringComplex( pszProjection, " +", TRUE, FALSE );
1466 free( pszProjection );
1467
1468 psPJ = pj_init( CSLCount(papszArgs), papszArgs );
1469
1470 CSLDestroy( papszArgs );
1458 ctx = proj_context_create();
1459
1460 strcpy(szLongLat, "+proj=longlat ");
1461 GTIFProj4AppendEllipsoid(psDefn, szLongLat);
1462
1463 psPJ = proj_create_crs_to_crs( ctx, pszProjection, szLongLat, NULL );
1464 CPLFree( pszProjection );
14711465
14721466 if( psPJ == NULL )
14731467 {
1468 proj_context_destroy(ctx);
14741469 return FALSE;
14751470 }
14761471
14791474 /* -------------------------------------------------------------------- */
14801475 for( i = 0; i < nPoints; i++ )
14811476 {
1482 projUV sUV;
1483
1484 sUV.u = padfX[i];
1485 sUV.v = padfY[i];
1486
1487 sUV = pj_inv( sUV, psPJ );
1488
1489 padfX[i] = sUV.u * RAD_TO_DEG;
1490 padfY[i] = sUV.v * RAD_TO_DEG;
1491 }
1492
1493 pj_free( psPJ );
1477 PJ_COORD coord;
1478 coord.xyzt.x = padfX[i];
1479 coord.xyzt.y = padfY[i];
1480 coord.xyzt.z = 0;
1481 coord.xyzt.t = 0;
1482
1483 coord = proj_trans(psPJ, PJ_FWD, coord);
1484
1485 padfX[i] = coord.xyzt.x;
1486 padfY[i] = coord.xyzt.y;
1487 }
1488
1489 proj_destroy( psPJ );
1490 proj_context_destroy(ctx);
14941491
14951492 return TRUE;
14961493 }
1497
1498 #endif /* has proj_api.h and -lproj */
214214 CFLAGS = @CFLAGS@
215215 CPP = @CPP@
216216 CPPFLAGS = @CPPFLAGS@
217 CXX = @CXX@
218 CXXCPP = @CXXCPP@
219 CXXDEPMODE = @CXXDEPMODE@
220 CXXFLAGS = @CXXFLAGS@
221217 CYGPATH_W = @CYGPATH_W@
222218 DEFS = @DEFS@
223219 DEPDIR = @DEPDIR@
256252 EXEEXT = @EXEEXT@
257253 FGREP = @FGREP@
258254 GREP = @GREP@
259 HAVE_LIBPROJ = @HAVE_LIBPROJ@
260255 INSTALL = @INSTALL@
261256 INSTALL_DATA = @INSTALL_DATA@
262257 INSTALL_PROGRAM = @INSTALL_PROGRAM@
291286 PACKAGE_URL = @PACKAGE_URL@
292287 PACKAGE_VERSION = @PACKAGE_VERSION@
293288 PATH_SEPARATOR = @PATH_SEPARATOR@
294 PROJ_INC = @PROJ_INC@
289 PROJ_INCLUDE = @PROJ_INCLUDE@
295290 RANLIB = @RANLIB@
296291 RELEASE_VERSION = @RELEASE_VERSION@
297292 SED = @SED@
309304 abs_top_srcdir = @abs_top_srcdir@
310305 ac_ct_AR = @ac_ct_AR@
311306 ac_ct_CC = @ac_ct_CC@
312 ac_ct_CXX = @ac_ct_CXX@
313307 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
314308 am__include = @am__include@
315309 am__leading_dot = @am__leading_dot@
1616 BINDIR = $(PREFIX)\bin
1717 LIBDIR = $(PREFIX)\lib
1818 INCDIR = $(PREFIX)\include
19 DATADIR = $(PREFIX)\share\epsg_csv
2019
2120 #
2221 CC = cl
5150 geo_normalize.obj \
5251 geotiff_proj4.obj \
5352 geo_simpletags.obj \
54 cpl_csv.obj \
5553 cpl_serv.obj
5654
5755 all: geo_config.h geotiff.lib $(DLLNAME) listgeo.exe geotifcp.exe
115113 geotiff_proj4.obj: geotiff_proj4.c
116114 $(CC) -c $(CFLAGS) geotiff_proj4.c
117115
118 cpl_csv.obj: cpl_csv.c
119 $(CC) -c $(CFLAGS) cpl_csv.c
120
121116 cpl_serv.obj: cpl_serv.c
122117 $(CC) -c $(CFLAGS) cpl_serv.c
123118
131126 install: all
132127 -mkdir $(PREFIX)
133128 -mkdir $(BINDIR)
134 -mkdir $(DATADIR)
135129 copy *.dll $(BINDIR)
136130 copy *.exe $(BINDIR)
137 -copy csv\*.csv $(DATADIR)
138131
139132 devinstall: install
140133 -mkdir $(INCDIR)
194194 CFLAGS = @CFLAGS@
195195 CPP = @CPP@
196196 CPPFLAGS = @CPPFLAGS@
197 CXX = @CXX@
198 CXXCPP = @CXXCPP@
199 CXXDEPMODE = @CXXDEPMODE@
200 CXXFLAGS = @CXXFLAGS@
201197 CYGPATH_W = @CYGPATH_W@
202198 DEFS = @DEFS@
203199 DEPDIR = @DEPDIR@
236232 EXEEXT = @EXEEXT@
237233 FGREP = @FGREP@
238234 GREP = @GREP@
239 HAVE_LIBPROJ = @HAVE_LIBPROJ@
240235 INSTALL = @INSTALL@
241236 INSTALL_DATA = @INSTALL_DATA@
242237 INSTALL_PROGRAM = @INSTALL_PROGRAM@
271266 PACKAGE_URL = @PACKAGE_URL@
272267 PACKAGE_VERSION = @PACKAGE_VERSION@
273268 PATH_SEPARATOR = @PATH_SEPARATOR@
274 PROJ_INC = @PROJ_INC@
269 PROJ_INCLUDE = @PROJ_INCLUDE@
275270 RANLIB = @RANLIB@
276271 RELEASE_VERSION = @RELEASE_VERSION@
277272 SED = @SED@
289284 abs_top_srcdir = @abs_top_srcdir@
290285 ac_ct_AR = @ac_ct_AR@
291286 ac_ct_CC = @ac_ct_CC@
292 ac_ct_CXX = @ac_ct_CXX@
293287 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
294288 am__include = @am__include@
295289 am__leading_dot = @am__leading_dot@
165165 CFLAGS = @CFLAGS@
166166 CPP = @CPP@
167167 CPPFLAGS = @CPPFLAGS@
168 CXX = @CXX@
169 CXXCPP = @CXXCPP@
170 CXXDEPMODE = @CXXDEPMODE@
171 CXXFLAGS = @CXXFLAGS@
172168 CYGPATH_W = @CYGPATH_W@
173169 DEFS = @DEFS@
174170 DEPDIR = @DEPDIR@
207203 EXEEXT = @EXEEXT@
208204 FGREP = @FGREP@
209205 GREP = @GREP@
210 HAVE_LIBPROJ = @HAVE_LIBPROJ@
211206 INSTALL = @INSTALL@
212207 INSTALL_DATA = @INSTALL_DATA@
213208 INSTALL_PROGRAM = @INSTALL_PROGRAM@
242237 PACKAGE_URL = @PACKAGE_URL@
243238 PACKAGE_VERSION = @PACKAGE_VERSION@
244239 PATH_SEPARATOR = @PATH_SEPARATOR@
245 PROJ_INC = @PROJ_INC@
240 PROJ_INCLUDE = @PROJ_INCLUDE@
246241 RANLIB = @RANLIB@
247242 RELEASE_VERSION = @RELEASE_VERSION@
248243 SED = @SED@
260255 abs_top_srcdir = @abs_top_srcdir@
261256 ac_ct_AR = @ac_ct_AR@
262257 ac_ct_CC = @ac_ct_CC@
263 ac_ct_CXX = @ac_ct_CXX@
264258 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
265259 am__include = @am__include@
266260 am__leading_dot = @am__leading_dot@
0 # Executables paths passed to test scripts
1 THIS_DIR = $(top_srcdir)/test
2 EXEPATH = ../bin
3 LISTGEOEXE = $(EXEPATH)/listgeo
4 GEOTIFCPEXE = $(EXEPATH)/geotifcp
5
6 # Test scripts
7 TESTLISTGEO = $(THIS_DIR)/testlistgeo
8 TESTGEOTIFCP = $(THIS_DIR)/testgeotifcp
9
10 EXTRA_DIST = testlistgeo testlistgeo_out.dist \
11 testgeotifcp testgeotifcp_out.dist \
12 data/byte.tif data/pcs_32064.tif \
13 data/GeogPrimeMeridianGeoKey.tif \
14 data/GeogGeodeticDatumGeoKey.tif \
15 data/GeogAngularUnitsGeoKey_9114.tif \
16 data/ProjLinearUnitsGeoKey_9036.tif \
17 data/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif \
18 data/cassini_soldner.tif \
19 data/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif \
20 data/new_zealand_mapping_grid.tif \
21 data/ProjectedCSTypeGeoKey_29101_polyconic.tif \
22 data/polyconic.tif \
23 data/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif \
24 data/hotine_oblique_mercator_variant_a.tif \
25 data/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif \
26 data/hotine_oblique_mercator_variant_b.tif \
27 data/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif \
28 data/oblique_mercator_laborde.tif \
29 data/ProjectedCSTypeGeoKey_5456_lcc1sp.tif \
30 data/lcc1sp.tif \
31 data/ProjectedCSTypeGeoKey_5329_mercator1sp.tif \
32 data/mercator1sp.tif \
33 data/ProjectedCSTypeGeoKey_5641_mercator2sp.tif \
34 data/mercator2sp.tif \
35 data/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif \
36 data/oblique_stereographic.tif \
37 data/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif \
38 data/polar_stereographic_variant_a.tif \
39 data/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif \
40 data/polar_stereographic_variant_b.tif \
41 data/ProjectedCSTypeGeoKey_3814_transverse_mercator.tif \
42 data/transverse_mercator.tif \
43 data/ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif \
44 data/transverse_mercator_south_oriented.tif \
45 data/ProjectedCSTypeGeoKey_3812_lcc2sp.tif \
46 data/lcc2sp.tif \
47 data/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif \
48 data/albers_equal_area.tif \
49 data/ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif \
50 data/lambert_azimuthal_equal_area.tif \
51 data/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif \
52 data/lambert_cylindrical_equal_area.tif \
53 data/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif \
54 data/equidistant_cylindrical.tif
55
56 check-local:
57 $(TESTLISTGEO) $(LISTGEOEXE)
58 $(TESTGEOTIFCP) $(GEOTIFCPEXE) $(LISTGEOEXE)
59
0 # Makefile.in generated by automake 1.15 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
27 am__make_running_with_option = \
28 case $${target_option-} in \
29 ?) ;; \
30 *) echo "am__make_running_with_option: internal error: invalid" \
31 "target option '$${target_option-}' specified" >&2; \
32 exit 1;; \
33 esac; \
34 has_opt=no; \
35 sane_makeflags=$$MAKEFLAGS; \
36 if $(am__is_gnu_make); then \
37 sane_makeflags=$$MFLAGS; \
38 else \
39 case $$MAKEFLAGS in \
40 *\\[\ \ ]*) \
41 bs=\\; \
42 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
43 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
44 esac; \
45 fi; \
46 skip_next=no; \
47 strip_trailopt () \
48 { \
49 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
50 }; \
51 for flg in $$sane_makeflags; do \
52 test $$skip_next = yes && { skip_next=no; continue; }; \
53 case $$flg in \
54 *=*|--*) continue;; \
55 -*I) strip_trailopt 'I'; skip_next=yes;; \
56 -*I?*) strip_trailopt 'I';; \
57 -*O) strip_trailopt 'O'; skip_next=yes;; \
58 -*O?*) strip_trailopt 'O';; \
59 -*l) strip_trailopt 'l'; skip_next=yes;; \
60 -*l?*) strip_trailopt 'l';; \
61 -[dEDm]) skip_next=yes;; \
62 -[JT]) skip_next=yes;; \
63 esac; \
64 case $$flg in \
65 *$$target_option*) has_opt=yes; break;; \
66 esac; \
67 done; \
68 test $$has_opt = yes
69 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
70 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
71 pkgdatadir = $(datadir)/@PACKAGE@
72 pkgincludedir = $(includedir)/@PACKAGE@
73 pkglibdir = $(libdir)/@PACKAGE@
74 pkglibexecdir = $(libexecdir)/@PACKAGE@
75 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
76 install_sh_DATA = $(install_sh) -c -m 644
77 install_sh_PROGRAM = $(install_sh) -c
78 install_sh_SCRIPT = $(install_sh) -c
79 INSTALL_HEADER = $(INSTALL_DATA)
80 transform = $(program_transform_name)
81 NORMAL_INSTALL = :
82 PRE_INSTALL = :
83 POST_INSTALL = :
84 NORMAL_UNINSTALL = :
85 PRE_UNINSTALL = :
86 POST_UNINSTALL = :
87 build_triplet = @build@
88 host_triplet = @host@
89 subdir = test
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
92 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
93 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
94 $(top_srcdir)/m4/ax_prog_doxygen.m4 $(top_srcdir)/configure.ac
95 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
96 $(ACLOCAL_M4)
97 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
98 mkinstalldirs = $(install_sh) -d
99 CONFIG_HEADER = $(top_builddir)/geo_config.h
100 CONFIG_CLEAN_FILES =
101 CONFIG_CLEAN_VPATH_FILES =
102 AM_V_P = $(am__v_P_@AM_V@)
103 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
104 am__v_P_0 = false
105 am__v_P_1 = :
106 AM_V_GEN = $(am__v_GEN_@AM_V@)
107 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
108 am__v_GEN_0 = @echo " GEN " $@;
109 am__v_GEN_1 =
110 AM_V_at = $(am__v_at_@AM_V@)
111 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
112 am__v_at_0 = @
113 am__v_at_1 =
114 SOURCES =
115 DIST_SOURCES =
116 am__can_run_installinfo = \
117 case $$AM_UPDATE_INFO_DIR in \
118 n|no|NO) false;; \
119 *) (install-info --version) >/dev/null 2>&1;; \
120 esac
121 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
122 am__DIST_COMMON = $(srcdir)/Makefile.in
123 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
124 ACLOCAL = @ACLOCAL@
125 AMTAR = @AMTAR@
126 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
127 AR = @AR@
128 AUTOCONF = @AUTOCONF@
129 AUTOHEADER = @AUTOHEADER@
130 AUTOMAKE = @AUTOMAKE@
131 AWK = @AWK@
132 CC = @CC@
133 CCDEPMODE = @CCDEPMODE@
134 CFLAGS = @CFLAGS@
135 CPP = @CPP@
136 CPPFLAGS = @CPPFLAGS@
137 CYGPATH_W = @CYGPATH_W@
138 DEFS = @DEFS@
139 DEPDIR = @DEPDIR@
140 DLLTOOL = @DLLTOOL@
141 DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@
142 DSYMUTIL = @DSYMUTIL@
143 DUMPBIN = @DUMPBIN@
144 DX_CONFIG = @DX_CONFIG@
145 DX_DOCDIR = @DX_DOCDIR@
146 DX_DOT = @DX_DOT@
147 DX_DOXYGEN = @DX_DOXYGEN@
148 DX_DVIPS = @DX_DVIPS@
149 DX_EGREP = @DX_EGREP@
150 DX_ENV = @DX_ENV@
151 DX_FLAG_DX_CURRENT_FEATURE = @DX_FLAG_DX_CURRENT_FEATURE@
152 DX_FLAG_chi = @DX_FLAG_chi@
153 DX_FLAG_chm = @DX_FLAG_chm@
154 DX_FLAG_doc = @DX_FLAG_doc@
155 DX_FLAG_dot = @DX_FLAG_dot@
156 DX_FLAG_html = @DX_FLAG_html@
157 DX_FLAG_man = @DX_FLAG_man@
158 DX_FLAG_pdf = @DX_FLAG_pdf@
159 DX_FLAG_ps = @DX_FLAG_ps@
160 DX_FLAG_rtf = @DX_FLAG_rtf@
161 DX_FLAG_xml = @DX_FLAG_xml@
162 DX_HHC = @DX_HHC@
163 DX_LATEX = @DX_LATEX@
164 DX_MAKEINDEX = @DX_MAKEINDEX@
165 DX_PDFLATEX = @DX_PDFLATEX@
166 DX_PERL = @DX_PERL@
167 DX_PROJECT = @DX_PROJECT@
168 ECHO_C = @ECHO_C@
169 ECHO_N = @ECHO_N@
170 ECHO_T = @ECHO_T@
171 EGREP = @EGREP@
172 EXEEXT = @EXEEXT@
173 FGREP = @FGREP@
174 GREP = @GREP@
175 INSTALL = @INSTALL@
176 INSTALL_DATA = @INSTALL_DATA@
177 INSTALL_PROGRAM = @INSTALL_PROGRAM@
178 INSTALL_SCRIPT = @INSTALL_SCRIPT@
179 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
180 JPEG_INC = @JPEG_INC@
181 JPEG_PREFIX = @JPEG_PREFIX@
182 LD = @LD@
183 LDFLAGS = @LDFLAGS@
184 LIBOBJS = @LIBOBJS@
185 LIBS = @LIBS@
186 LIBTOOL = @LIBTOOL@
187 LIPO = @LIPO@
188 LN_S = @LN_S@
189 LTLIBOBJS = @LTLIBOBJS@
190 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
191 MAINT = @MAINT@
192 MAKEINFO = @MAKEINFO@
193 MANIFEST_TOOL = @MANIFEST_TOOL@
194 MKDIR_P = @MKDIR_P@
195 NM = @NM@
196 NMEDIT = @NMEDIT@
197 OBJDUMP = @OBJDUMP@
198 OBJEXT = @OBJEXT@
199 OTOOL = @OTOOL@
200 OTOOL64 = @OTOOL64@
201 PACKAGE = @PACKAGE@
202 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203 PACKAGE_NAME = @PACKAGE_NAME@
204 PACKAGE_STRING = @PACKAGE_STRING@
205 PACKAGE_TARNAME = @PACKAGE_TARNAME@
206 PACKAGE_URL = @PACKAGE_URL@
207 PACKAGE_VERSION = @PACKAGE_VERSION@
208 PATH_SEPARATOR = @PATH_SEPARATOR@
209 PROJ_INCLUDE = @PROJ_INCLUDE@
210 RANLIB = @RANLIB@
211 RELEASE_VERSION = @RELEASE_VERSION@
212 SED = @SED@
213 SET_MAKE = @SET_MAKE@
214 SHELL = @SHELL@
215 STRIP = @STRIP@
216 TIFF_INC = @TIFF_INC@
217 TIFF_PREFIX = @TIFF_PREFIX@
218 VERSION = @VERSION@
219 ZIP_INC = @ZIP_INC@
220 ZIP_PREFIX = @ZIP_PREFIX@
221 abs_builddir = @abs_builddir@
222 abs_srcdir = @abs_srcdir@
223 abs_top_builddir = @abs_top_builddir@
224 abs_top_srcdir = @abs_top_srcdir@
225 ac_ct_AR = @ac_ct_AR@
226 ac_ct_CC = @ac_ct_CC@
227 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
228 am__include = @am__include@
229 am__leading_dot = @am__leading_dot@
230 am__quote = @am__quote@
231 am__tar = @am__tar@
232 am__untar = @am__untar@
233 bindir = @bindir@
234 build = @build@
235 build_alias = @build_alias@
236 build_cpu = @build_cpu@
237 build_os = @build_os@
238 build_vendor = @build_vendor@
239 builddir = @builddir@
240 datadir = @datadir@
241 datarootdir = @datarootdir@
242 docdir = @docdir@
243 dvidir = @dvidir@
244 exec_prefix = @exec_prefix@
245 host = @host@
246 host_alias = @host_alias@
247 host_cpu = @host_cpu@
248 host_os = @host_os@
249 host_vendor = @host_vendor@
250 htmldir = @htmldir@
251 includedir = @includedir@
252 infodir = @infodir@
253 install_sh = @install_sh@
254 libdir = @libdir@
255 libexecdir = @libexecdir@
256 localedir = @localedir@
257 localstatedir = @localstatedir@
258 mandir = @mandir@
259 mkdir_p = @mkdir_p@
260 oldincludedir = @oldincludedir@
261 pdfdir = @pdfdir@
262 prefix = @prefix@
263 program_transform_name = @program_transform_name@
264 psdir = @psdir@
265 runstatedir = @runstatedir@
266 sbindir = @sbindir@
267 sharedstatedir = @sharedstatedir@
268 srcdir = @srcdir@
269 sysconfdir = @sysconfdir@
270 target_alias = @target_alias@
271 top_build_prefix = @top_build_prefix@
272 top_builddir = @top_builddir@
273 top_srcdir = @top_srcdir@
274
275 # Executables paths passed to test scripts
276 THIS_DIR = $(top_srcdir)/test
277 EXEPATH = ../bin
278 LISTGEOEXE = $(EXEPATH)/listgeo
279 GEOTIFCPEXE = $(EXEPATH)/geotifcp
280
281 # Test scripts
282 TESTLISTGEO = $(THIS_DIR)/testlistgeo
283 TESTGEOTIFCP = $(THIS_DIR)/testgeotifcp
284 EXTRA_DIST = testlistgeo testlistgeo_out.dist \
285 testgeotifcp testgeotifcp_out.dist \
286 data/byte.tif data/pcs_32064.tif \
287 data/GeogPrimeMeridianGeoKey.tif \
288 data/GeogGeodeticDatumGeoKey.tif \
289 data/GeogAngularUnitsGeoKey_9114.tif \
290 data/ProjLinearUnitsGeoKey_9036.tif \
291 data/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif \
292 data/cassini_soldner.tif \
293 data/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif \
294 data/new_zealand_mapping_grid.tif \
295 data/ProjectedCSTypeGeoKey_29101_polyconic.tif \
296 data/polyconic.tif \
297 data/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif \
298 data/hotine_oblique_mercator_variant_a.tif \
299 data/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif \
300 data/hotine_oblique_mercator_variant_b.tif \
301 data/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif \
302 data/oblique_mercator_laborde.tif \
303 data/ProjectedCSTypeGeoKey_5456_lcc1sp.tif \
304 data/lcc1sp.tif \
305 data/ProjectedCSTypeGeoKey_5329_mercator1sp.tif \
306 data/mercator1sp.tif \
307 data/ProjectedCSTypeGeoKey_5641_mercator2sp.tif \
308 data/mercator2sp.tif \
309 data/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif \
310 data/oblique_stereographic.tif \
311 data/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif \
312 data/polar_stereographic_variant_a.tif \
313 data/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif \
314 data/polar_stereographic_variant_b.tif \
315 data/ProjectedCSTypeGeoKey_3814_transverse_mercator.tif \
316 data/transverse_mercator.tif \
317 data/ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif \
318 data/transverse_mercator_south_oriented.tif \
319 data/ProjectedCSTypeGeoKey_3812_lcc2sp.tif \
320 data/lcc2sp.tif \
321 data/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif \
322 data/albers_equal_area.tif \
323 data/ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif \
324 data/lambert_azimuthal_equal_area.tif \
325 data/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif \
326 data/lambert_cylindrical_equal_area.tif \
327 data/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif \
328 data/equidistant_cylindrical.tif
329
330 all: all-am
331
332 .SUFFIXES:
333 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
334 @for dep in $?; do \
335 case '$(am__configure_deps)' in \
336 *$$dep*) \
337 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
338 && { if test -f $@; then exit 0; else break; fi; }; \
339 exit 1;; \
340 esac; \
341 done; \
342 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \
343 $(am__cd) $(top_srcdir) && \
344 $(AUTOMAKE) --gnu test/Makefile
345 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
346 @case '$?' in \
347 *config.status*) \
348 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
349 *) \
350 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
351 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
352 esac;
353
354 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
355 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
356
357 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
358 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
359 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
360 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
361 $(am__aclocal_m4_deps):
362
363 mostlyclean-libtool:
364 -rm -f *.lo
365
366 clean-libtool:
367 -rm -rf .libs _libs
368 tags TAGS:
369
370 ctags CTAGS:
371
372 cscope cscopelist:
373
374
375 distdir: $(DISTFILES)
376 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
377 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
378 list='$(DISTFILES)'; \
379 dist_files=`for file in $$list; do echo $$file; done | \
380 sed -e "s|^$$srcdirstrip/||;t" \
381 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
382 case $$dist_files in \
383 */*) $(MKDIR_P) `echo "$$dist_files" | \
384 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
385 sort -u` ;; \
386 esac; \
387 for file in $$dist_files; do \
388 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
389 if test -d $$d/$$file; then \
390 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
391 if test -d "$(distdir)/$$file"; then \
392 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
393 fi; \
394 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
395 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
396 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
397 fi; \
398 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
399 else \
400 test -f "$(distdir)/$$file" \
401 || cp -p $$d/$$file "$(distdir)/$$file" \
402 || exit 1; \
403 fi; \
404 done
405 check-am: all-am
406 $(MAKE) $(AM_MAKEFLAGS) check-local
407 check: check-am
408 all-am: Makefile
409 installdirs:
410 install: install-am
411 install-exec: install-exec-am
412 install-data: install-data-am
413 uninstall: uninstall-am
414
415 install-am: all-am
416 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
417
418 installcheck: installcheck-am
419 install-strip:
420 if test -z '$(STRIP)'; then \
421 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
422 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
423 install; \
424 else \
425 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
426 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
427 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
428 fi
429 mostlyclean-generic:
430
431 clean-generic:
432
433 distclean-generic:
434 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
435 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
436
437 maintainer-clean-generic:
438 @echo "This command is intended for maintainers to use"
439 @echo "it deletes files that may require special tools to rebuild."
440 clean: clean-am
441
442 clean-am: clean-generic clean-libtool mostlyclean-am
443
444 distclean: distclean-am
445 -rm -f Makefile
446 distclean-am: clean-am distclean-generic
447
448 dvi: dvi-am
449
450 dvi-am:
451
452 html: html-am
453
454 html-am:
455
456 info: info-am
457
458 info-am:
459
460 install-data-am:
461
462 install-dvi: install-dvi-am
463
464 install-dvi-am:
465
466 install-exec-am:
467
468 install-html: install-html-am
469
470 install-html-am:
471
472 install-info: install-info-am
473
474 install-info-am:
475
476 install-man:
477
478 install-pdf: install-pdf-am
479
480 install-pdf-am:
481
482 install-ps: install-ps-am
483
484 install-ps-am:
485
486 installcheck-am:
487
488 maintainer-clean: maintainer-clean-am
489 -rm -f Makefile
490 maintainer-clean-am: distclean-am maintainer-clean-generic
491
492 mostlyclean: mostlyclean-am
493
494 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
495
496 pdf: pdf-am
497
498 pdf-am:
499
500 ps: ps-am
501
502 ps-am:
503
504 uninstall-am:
505
506 .MAKE: check-am install-am install-strip
507
508 .PHONY: all all-am check check-am check-local clean clean-generic \
509 clean-libtool cscopelist-am ctags-am distclean \
510 distclean-generic distclean-libtool distdir dvi dvi-am html \
511 html-am info info-am install install-am install-data \
512 install-data-am install-dvi install-dvi-am install-exec \
513 install-exec-am install-html install-html-am install-info \
514 install-info-am install-man install-pdf install-pdf-am \
515 install-ps install-ps-am install-strip installcheck \
516 installcheck-am installdirs maintainer-clean \
517 maintainer-clean-generic mostlyclean mostlyclean-generic \
518 mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
519 uninstall-am
520
521 .PRECIOUS: Makefile
522
523
524 check-local:
525 $(TESTLISTGEO) $(LISTGEOEXE)
526 $(TESTGEOTIFCP) $(GEOTIFCPEXE) $(LISTGEOEXE)
527
528 # Tell versions [3.59,3.63) of GNU make to not export all variables.
529 # Otherwise a system limit (for SysV at least) may be exceeded.
530 .NOEXPORT:
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
Binary diff not shown
0 :
1 # Test geotifcp
2
3 TEST_CLI_DIR=`dirname $0`
4 DATA_DIR=`dirname $0`/data
5
6 EXE=$1
7 LISTGEO_EXE=$2
8
9 usage()
10 {
11 echo "Usage: ${0} <path to 'geotifcp' program> <path to 'listgeo' program>"
12 echo
13 exit 1
14 }
15
16 if test -z "${EXE}"; then
17 EXE=../bin/geotifcp
18 LISTGEO_EXE=../bin/listgeo
19 fi
20
21 if test ! -x ${EXE}; then
22 echo "*** ERROR: Can not find '${EXE}' program!"
23 exit 1
24 fi
25
26 if test ! -x ${LISTGEO_EXE}; then
27 echo "*** ERROR: Can not find '${LISTGEO_EXE}' program!"
28 exit 1
29 fi
30
31 echo "============================================"
32 echo "Running ${0} using ${EXE}:"
33 echo "============================================"
34
35
36 OUT=testgeotifcp_out
37
38 rm -f ${OUT}
39
40 $LISTGEO_EXE ${DATA_DIR}/albers_equal_area.tif > tmp_albers_equal_area.txt
41 $EXE -g tmp_albers_equal_area.txt ${DATA_DIR}/byte.tif tmp_albers_equal_area.tif
42 $LISTGEO_EXE tmp_albers_equal_area.tif >> ${OUT}
43 rm -f tmp_albers_equal_area.txt
44 rm -f tmp_albers_equal_area.tif
45
46 $LISTGEO_EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif > tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.txt
47 $EXE -g tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.txt ${DATA_DIR}/byte.tif tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.tif
48 $LISTGEO_EXE tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.tif >> ${OUT}
49 rm -f tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.txt
50 rm -f tmp_ProjectedCSTypeGeoKey_3083_albers_equal_area.tif
51
52 # do 'diff' with distribution results
53 echo "diff ${OUT} with testgeotifcp_out.dist"
54 diff -u ${OUT} ${TEST_CLI_DIR}/testgeotifcp_out.dist
55 if [ $? -ne 0 ] ; then
56 echo ""
57 echo "PROBLEMS HAVE OCCURRED"
58 echo "test file ${OUT} saved"
59 echo
60 exit 100
61 else
62 echo "TEST OK"
63 echo "test file ${OUT} removed"
64 echo
65 /bin/rm -f ${OUT}
66 exit 0
67 fi
0 Geotiff_Information:
1 Version: 1
2 Key_Revision: 1.0
3 Tagged_Information:
4 ModelTiepointTag (2,3):
5 0 0 0
6 440720 3751320 0
7 ModelPixelScaleTag (1,3):
8 60 60 0
9 End_Of_Tags.
10 Keyed_Information:
11 GTModelTypeGeoKey (Short,1): ModelTypeProjected
12 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
13 GTCitationGeoKey (Ascii,40): "NAD83 / Texas Centric Albers Equal Area"
14 GeographicTypeGeoKey (Short,1): GCS_NAD83
15 GeogCitationGeoKey (Ascii,6): "NAD83"
16 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
17 GeogSemiMajorAxisGeoKey (Double,1): 6378137
18 GeogInvFlatteningGeoKey (Double,1): 298.257222101
19 ProjectedCSTypeGeoKey (Short,1): User-Defined
20 ProjectionGeoKey (Short,1): User-Defined
21 ProjCoordTransGeoKey (Short,1): CT_AlbersEqualArea
22 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
23 ProjStdParallel1GeoKey (Double,1): 27.5
24 ProjStdParallel2GeoKey (Double,1): 35
25 ProjNatOriginLongGeoKey (Double,1): -100
26 ProjNatOriginLatGeoKey (Double,1): 18
27 ProjFalseEastingGeoKey (Double,1): 1500000
28 ProjFalseNorthingGeoKey (Double,1): 6000000
29 End_Of_Keys.
30 End_Of_Geotiff.
31
32 Projection Method: CT_AlbersEqualArea
33 ProjStdParallel1GeoKey: 27.500000 ( 27d30' 0.00"N)
34 ProjStdParallel2GeoKey: 35.000000 ( 35d 0' 0.00"N)
35 ProjNatOriginLatGeoKey: 18.000000 ( 18d 0' 0.00"N)
36 ProjNatOriginLongGeoKey: -100.000000 (100d 0' 0.00"W)
37 ProjFalseEastingGeoKey: 1500000.000000 m
38 ProjFalseNorthingGeoKey: 6000000.000000 m
39 GCS: 4269/NAD83
40 Datum: 6269/North American Datum 1983
41 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
42 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
43 Projection Linear Units: 9001/metre (1.000000m)
44
45 Corner Coordinates:
46 Upper Left ( 440720.000, 3751320.000) (108d13'30.29"W, 4d19'52.00"S)
47 Lower Left ( 440720.000, 3750120.000) (108d13'27.80"W, 4d20'37.24"S)
48 Upper Right ( 441920.000, 3751320.000) (108d12'56.86"W, 4d19'48.63"S)
49 Lower Right ( 441920.000, 3750120.000) (108d12'54.38"W, 4d20'33.88"S)
50 Center ( 441320.000, 3750720.000) (108d13'12.33"W, 4d20'12.94"S)
51 Geotiff_Information:
52 Version: 1
53 Key_Revision: 1.0
54 Tagged_Information:
55 ModelTiepointTag (2,3):
56 0 0 0
57 440720 3751320 0
58 ModelPixelScaleTag (1,3):
59 60 60 0
60 End_Of_Tags.
61 Keyed_Information:
62 GTModelTypeGeoKey (Short,1): ModelTypeProjected
63 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
64 ProjectedCSTypeGeoKey (Short,1): Code-3083 (NAD83 / Texas Centric Albers Equal Area)
65 End_Of_Keys.
66 End_Of_Geotiff.
67
68 PCS = 3083 (NAD83 / Texas Centric Albers Equal Area)
69 Projection = 14254 (Texas Centric Albers Equal Area)
70 Projection Method: CT_AlbersEqualArea
71 ProjStdParallel1GeoKey: 27.500000 ( 27d30' 0.00"N)
72 ProjStdParallel2GeoKey: 35.000000 ( 35d 0' 0.00"N)
73 ProjNatOriginLatGeoKey: 18.000000 ( 18d 0' 0.00"N)
74 ProjNatOriginLongGeoKey: -100.000000 (100d 0' 0.00"W)
75 ProjFalseEastingGeoKey: 1500000.000000 m
76 ProjFalseNorthingGeoKey: 6000000.000000 m
77 GCS: 4269/NAD83
78 Datum: 6269/North American Datum 1983
79 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
80 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
81 Projection Linear Units: 9001/metre (1.000000m)
82
83 Corner Coordinates:
84 Upper Left ( 440720.000, 3751320.000) (108d13'30.29"W, 4d19'52.00"S)
85 Lower Left ( 440720.000, 3750120.000) (108d13'27.80"W, 4d20'37.24"S)
86 Upper Right ( 441920.000, 3751320.000) (108d12'56.86"W, 4d19'48.63"S)
87 Lower Right ( 441920.000, 3750120.000) (108d12'54.38"W, 4d20'33.88"S)
88 Center ( 441320.000, 3750720.000) (108d13'12.33"W, 4d20'12.94"S)
0 :
1 # Test listgeo
2
3 TEST_CLI_DIR=`dirname $0`
4 DATA_DIR=`dirname $0`/data
5
6 EXE=$1
7
8 usage()
9 {
10 echo "Usage: ${0} <path to 'listgeo' program>"
11 echo
12 exit 1
13 }
14
15 if test -z "${EXE}"; then
16 EXE=../bin/listgeo
17 fi
18
19 if test ! -x ${EXE}; then
20 echo "*** ERROR: Can not find '${EXE}' program!"
21 exit 1
22 fi
23
24 echo "============================================"
25 echo "Running ${0} using ${EXE}:"
26 echo "============================================"
27
28 OUT=testlistgeo_out
29
30 rm -f ${OUT}
31
32 echo "Testing listgeo ${DATA_DIR}/byte.tif" >> ${OUT}
33 $EXE ${DATA_DIR}/byte.tif >>${OUT}
34 echo "" >>${OUT}
35
36 echo "Testing listgeo ${DATA_DIR}/pcs_32064.tif" >> ${OUT}
37 $EXE ${DATA_DIR}/pcs_32064.tif >>${OUT}
38 echo "" >>${OUT}
39
40 echo "Testing listgeo ${DATA_DIR}/GeogPrimeMeridianGeoKey.tif" >> ${OUT}
41 $EXE ${DATA_DIR}/GeogPrimeMeridianGeoKey.tif >>${OUT}
42 echo "" >>${OUT}
43
44 echo "Testing listgeo ${DATA_DIR}/GeogGeodeticDatumGeoKey.tif" >> ${OUT}
45 $EXE ${DATA_DIR}/GeogGeodeticDatumGeoKey.tif >>${OUT}
46 echo "" >>${OUT}
47
48 echo "Testing listgeo ${DATA_DIR}/GeogAngularUnitsGeoKey_9114.tif" >> ${OUT}
49 $EXE ${DATA_DIR}/GeogAngularUnitsGeoKey_9114.tif >>${OUT}
50 echo "" >>${OUT}
51
52 echo "Testing listgeo ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif" >> ${OUT}
53 $EXE ${DATA_DIR}/ProjLinearUnitsGeoKey_9036.tif >>${OUT}
54 echo "" >>${OUT}
55
56 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif" >> ${OUT}
57 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif >>${OUT}
58 echo "" >>${OUT}
59
60 echo "Testing listgeo ${DATA_DIR}/cassini_soldner.tif" >> ${OUT}
61 $EXE ${DATA_DIR}/cassini_soldner.tif >>${OUT}
62 echo "" >>${OUT}
63
64 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif" >> ${OUT}
65 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif >>${OUT}
66 echo "" >>${OUT}
67
68 echo "Testing listgeo ${DATA_DIR}/new_zealand_mapping_grid.tif" >> ${OUT}
69 $EXE ${DATA_DIR}/new_zealand_mapping_grid.tif >>${OUT}
70 echo "" >>${OUT}
71
72 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_29101_polyconic.tif" >> ${OUT}
73 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_29101_polyconic.tif >>${OUT}
74 echo "" >>${OUT}
75
76 echo "Testing listgeo ${DATA_DIR}/polyconic.tif" >> ${OUT}
77 $EXE ${DATA_DIR}/polyconic.tif >>${OUT}
78 echo "" >>${OUT}
79
80 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif" >> ${OUT}
81 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif >>${OUT}
82 echo "" >>${OUT}
83
84 echo "Testing listgeo ${DATA_DIR}/hotine_oblique_mercator_variant_a.tif" >> ${OUT}
85 $EXE ${DATA_DIR}/hotine_oblique_mercator_variant_a.tif >>${OUT}
86 echo "" >>${OUT}
87
88 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif" >> ${OUT}
89 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif >>${OUT}
90 echo "" >>${OUT}
91
92 echo "Testing listgeo ${DATA_DIR}/hotine_oblique_mercator_variant_b.tif" >> ${OUT}
93 $EXE ${DATA_DIR}/hotine_oblique_mercator_variant_b.tif >>${OUT}
94 echo "" >>${OUT}
95
96 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif" >> ${OUT}
97 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif >>${OUT}
98 echo "" >>${OUT}
99
100 echo "Testing listgeo ${DATA_DIR}/oblique_mercator_laborde.tif" >> ${OUT}
101 $EXE ${DATA_DIR}/oblique_mercator_laborde.tif >>${OUT}
102 echo "" >>${OUT}
103
104 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5456_lcc1sp.tif" >> ${OUT}
105 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5456_lcc1sp.tif >>${OUT}
106 echo "" >>${OUT}
107
108 echo "Testing listgeo ${DATA_DIR}/lcc1sp.tif" >> ${OUT}
109 $EXE ${DATA_DIR}/lcc1sp.tif >>${OUT}
110 echo "" >>${OUT}
111
112 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5329_mercator1sp.tif" >> ${OUT}
113 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5329_mercator1sp.tif >>${OUT}
114 echo "" >>${OUT}
115
116 echo "Testing listgeo ${DATA_DIR}/mercator1sp.tif" >> ${OUT}
117 $EXE ${DATA_DIR}/mercator1sp.tif >>${OUT}
118 echo "" >>${OUT}
119
120 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5641_mercator2sp.tif" >> ${OUT}
121 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5641_mercator2sp.tif >>${OUT}
122 echo "" >>${OUT}
123
124 echo "Testing listgeo ${DATA_DIR}/mercator2sp.tif" >> ${OUT}
125 $EXE ${DATA_DIR}/mercator2sp.tif >>${OUT}
126 echo "" >>${OUT}
127
128 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif" >> ${OUT}
129 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif >>${OUT}
130 echo "" >>${OUT}
131
132 echo "Testing listgeo ${DATA_DIR}/oblique_stereographic.tif" >> ${OUT}
133 $EXE ${DATA_DIR}/oblique_stereographic.tif >>${OUT}
134 echo "" >>${OUT}
135
136 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif" >> ${OUT}
137 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif >>${OUT}
138 echo "" >>${OUT}
139
140 echo "Testing listgeo ${DATA_DIR}/polar_stereographic_variant_a.tif" >> ${OUT}
141 $EXE ${DATA_DIR}/polar_stereographic_variant_a.tif >>${OUT}
142 echo "" >>${OUT}
143
144 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif" >> ${OUT}
145 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif >>${OUT}
146 echo "" >>${OUT}
147
148 echo "Testing listgeo ${DATA_DIR}/polar_stereographic_variant_b.tif" >> ${OUT}
149 $EXE ${DATA_DIR}/polar_stereographic_variant_b.tif >>${OUT}
150 echo "" >>${OUT}
151
152 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3814_transverse_mercator.tif" >> ${OUT}
153 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3814_transverse_mercator.tif >>${OUT}
154 echo "" >>${OUT}
155
156 echo "Testing listgeo ${DATA_DIR}/transverse_mercator.tif" >> ${OUT}
157 $EXE ${DATA_DIR}/transverse_mercator.tif >>${OUT}
158 echo "" >>${OUT}
159
160 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif" >> ${OUT}
161 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif >>${OUT}
162 echo "" >>${OUT}
163
164 echo "Testing listgeo ${DATA_DIR}/transverse_mercator_south_oriented.tif" >> ${OUT}
165 $EXE ${DATA_DIR}/transverse_mercator_south_oriented.tif >>${OUT}
166 echo "" >>${OUT}
167
168 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3812_lcc2sp.tif" >> ${OUT}
169 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3812_lcc2sp.tif >>${OUT}
170 echo "" >>${OUT}
171
172 echo "Testing listgeo ${DATA_DIR}/lcc2sp.tif" >> ${OUT}
173 $EXE ${DATA_DIR}/lcc2sp.tif >>${OUT}
174 echo "" >>${OUT}
175
176 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif" >> ${OUT}
177 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif >>${OUT}
178 echo "" >>${OUT}
179
180 echo "Testing listgeo ${DATA_DIR}/albers_equal_area.tif" >> ${OUT}
181 $EXE ${DATA_DIR}/albers_equal_area.tif >>${OUT}
182 echo "" >>${OUT}
183
184 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif" >> ${OUT}
185 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif >>${OUT}
186 echo "" >>${OUT}
187
188 echo "Testing listgeo ${DATA_DIR}/lambert_azimuthal_equal_area.tif" >> ${OUT}
189 $EXE ${DATA_DIR}/lambert_azimuthal_equal_area.tif >>${OUT}
190 echo "" >>${OUT}
191
192 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif" >> ${OUT}
193 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif >>${OUT}
194 echo "" >>${OUT}
195
196 echo "Testing listgeo ${DATA_DIR}/lambert_cylindrical_equal_area.tif" >> ${OUT}
197 $EXE ${DATA_DIR}/lambert_cylindrical_equal_area.tif >>${OUT}
198 echo "" >>${OUT}
199
200 echo "Testing listgeo ${DATA_DIR}/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif" >> ${OUT}
201 $EXE ${DATA_DIR}/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif >>${OUT}
202 echo "" >>${OUT}
203
204 echo "Testing listgeo ${DATA_DIR}/equidistant_cylindrical.tif" >> ${OUT}
205 $EXE ${DATA_DIR}/equidistant_cylindrical.tif >>${OUT}
206 echo "" >>${OUT}
207
208
209 # do 'diff' with distribution results
210 echo "diff ${OUT} with testlistgeo_out.dist"
211 diff -u ${OUT} ${TEST_CLI_DIR}/testlistgeo_out.dist
212 if [ $? -ne 0 ] ; then
213 echo ""
214 echo "PROBLEMS HAVE OCCURRED"
215 echo "test file ${OUT} saved"
216 echo
217 exit 100
218 else
219 echo "TEST OK"
220 echo "test file ${OUT} removed"
221 echo
222 /bin/rm -f ${OUT}
223 exit 0
224 fi
0 Testing listgeo ../test/data/byte.tif
1 Geotiff_Information:
2 Version: 1
3 Key_Revision: 1.0
4 Tagged_Information:
5 ModelTiepointTag (2,3):
6 0 0 0
7 440720 3751320 0
8 ModelPixelScaleTag (1,3):
9 60 60 0
10 End_Of_Tags.
11 Keyed_Information:
12 GTModelTypeGeoKey (Short,1): ModelTypeProjected
13 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
14 GTCitationGeoKey (Ascii,21): "NAD27 / UTM zone 11N"
15 ProjectedCSTypeGeoKey (Short,1): PCS_NAD27_UTM_zone_11N
16 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
17 End_Of_Keys.
18 End_Of_Geotiff.
19
20 PCS = 26711 (NAD27 / UTM zone 11N)
21 Projection = 16011 (UTM zone 11N)
22 Projection Method: CT_TransverseMercator
23 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
24 ProjNatOriginLongGeoKey: -117.000000 (117d 0' 0.00"W)
25 ProjScaleAtNatOriginGeoKey: 0.999600
26 ProjFalseEastingGeoKey: 500000.000000 m
27 ProjFalseNorthingGeoKey: 0.000000 m
28 GCS: 4267/NAD27
29 Datum: 6267/North American Datum 1927
30 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
31 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
32 Projection Linear Units: 9001/metre (1.000000m)
33
34 Corner Coordinates:
35 Upper Left ( 440720.000, 3751320.000) (117d38'28.21"W, 33d54' 8.47"N)
36 Lower Left ( 440720.000, 3750120.000) (117d38'27.92"W, 33d53'29.51"N)
37 Upper Right ( 441920.000, 3751320.000) (117d37'41.48"W, 33d54' 8.71"N)
38 Lower Right ( 441920.000, 3750120.000) (117d37'41.20"W, 33d53'29.75"N)
39 Center ( 441320.000, 3750720.000) (117d38' 4.70"W, 33d53'49.11"N)
40
41 Testing listgeo ../test/data/pcs_32064.tif
42 Geotiff_Information:
43 Version: 1
44 Key_Revision: 1.0
45 Tagged_Information:
46 ModelTiepointTag (2,3):
47 0 0 0
48 440720 3751320 0
49 ModelPixelScaleTag (1,3):
50 60 60 0
51 End_Of_Tags.
52 Keyed_Information:
53 GTModelTypeGeoKey (Short,1): ModelTypeProjected
54 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
55 GTCitationGeoKey (Ascii,23): "NAD27 / BLM 14N (ftUS)"
56 GeogCitationGeoKey (Ascii,6): "NAD27"
57 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
58 ProjectedCSTypeGeoKey (Short,1): Code-32064 (NAD27 / BLM 14N (ftUS))
59 ProjLinearUnitsGeoKey (Short,1): Linear_Foot_US_Survey
60 End_Of_Keys.
61 End_Of_Geotiff.
62
63 PCS = 32064 (NAD27 / BLM 14N (ftUS))
64 Projection = 15914 (BLM zone 14N (US survey feet))
65 Projection Method: CT_TransverseMercator
66 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
67 ProjNatOriginLongGeoKey: -99.000000 ( 99d 0' 0.00"W)
68 ProjScaleAtNatOriginGeoKey: 0.999600
69 ProjFalseEastingGeoKey: 500000.001016 m
70 ProjFalseNorthingGeoKey: 0.000000 m
71 GCS: 4267/NAD27
72 Datum: 6267/North American Datum 1927
73 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
74 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
75 Projection Linear Units: 9003/US survey foot (0.304801m)
76
77 Corner Coordinates:
78 Upper Left ( 440720.000, 3751320.000) (102d20'17.15"W, 10d19'37.13"N)
79 Lower Left ( 440720.000, 3751260.000) (102d20'17.15"W, 10d19'36.54"N)
80 Upper Right ( 440780.000, 3751320.000) (102d20'16.55"W, 10d19'37.14"N)
81 Lower Right ( 440780.000, 3751260.000) (102d20'16.55"W, 10d19'36.54"N)
82 Center ( 440750.000, 3751290.000) (102d20'16.85"W, 10d19'36.84"N)
83
84 Testing listgeo ../test/data/GeogPrimeMeridianGeoKey.tif
85 Geotiff_Information:
86 Version: 1
87 Key_Revision: 1.0
88 Tagged_Information:
89 ModelTiepointTag (2,3):
90 0 0 0
91 130 32 0
92 ModelPixelScaleTag (1,3):
93 1 1 0
94 End_Of_Tags.
95 Keyed_Information:
96 GTModelTypeGeoKey (Short,1): ModelTypeGeographic
97 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
98 GTCitationGeoKey (Ascii,16): "Just An Example"
99 GeographicTypeGeoKey (Short,1): User-Defined
100 GeogCitationGeoKey (Ascii,24): "Everest Ellipsoid Used."
101 GeogGeodeticDatumGeoKey (Short,1): User-Defined
102 GeogPrimeMeridianGeoKey (Short,1): PM_Paris
103 GeogLinearUnitsGeoKey (Short,1): Linear_Meter
104 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
105 GeogEllipsoidGeoKey (Short,1): Ellipse_Everest_1830_1967_Definition
106 GeogSemiMajorAxisGeoKey (Double,1): 6377298.556
107 GeogInvFlatteningGeoKey (Double,1): 300.8017
108 End_Of_Keys.
109 End_Of_Geotiff.
110
111 Ellipsoid: 7016/Everest 1830 (1967 Definition) (6377298.56,6356097.55)
112 Prime Meridian: 8903/Paris (2.337229/ 2d20'14.03"E)
113 Projection Linear Units: User-Defined (1.000000m)
114
115 Corner Coordinates:
116 Upper Left (130d 0' 0.00"E, 32d 0' 0.00"N)
117 Lower Left (130d 0' 0.00"E, 31d 0' 0.00"N)
118 Upper Right (131d 0' 0.00"E, 32d 0' 0.00"N)
119 Lower Right (131d 0' 0.00"E, 31d 0' 0.00"N)
120 Center (130d30' 0.00"E, 31d30' 0.00"N)
121
122 Testing listgeo ../test/data/GeogGeodeticDatumGeoKey.tif
123 Geotiff_Information:
124 Version: 1
125 Key_Revision: 1.0
126 Tagged_Information:
127 ModelTiepointTag (2,3):
128 0 0 0
129 130 32 0
130 ModelPixelScaleTag (1,3):
131 1 1 0
132 End_Of_Tags.
133 Keyed_Information:
134 GTModelTypeGeoKey (Short,1): ModelTypeGeographic
135 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
136 GeographicTypeGeoKey (Short,1): User-Defined
137 GeogGeodeticDatumGeoKey (Short,1): Code-6742 (Geodetic Datum of Malaysia 2000)
138 GeogLinearUnitsGeoKey (Short,1): Linear_Meter
139 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
140 End_Of_Keys.
141 End_Of_Geotiff.
142
143 Datum: 6742/Geodetic Datum of Malaysia 2000
144 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
145 Projection Linear Units: User-Defined (1.000000m)
146
147 Corner Coordinates:
148 Upper Left (130d 0' 0.00"E, 32d 0' 0.00"N)
149 Lower Left (130d 0' 0.00"E, 31d 0' 0.00"N)
150 Upper Right (131d 0' 0.00"E, 32d 0' 0.00"N)
151 Lower Right (131d 0' 0.00"E, 31d 0' 0.00"N)
152 Center (130d30' 0.00"E, 31d30' 0.00"N)
153
154 Testing listgeo ../test/data/GeogAngularUnitsGeoKey_9114.tif
155 Geotiff_Information:
156 Version: 1
157 Key_Revision: 1.0
158 Tagged_Information:
159 ModelTiepointTag (2,3):
160 0 0 0
161 130 32 0
162 ModelPixelScaleTag (1,3):
163 1 1 0
164 End_Of_Tags.
165 Keyed_Information:
166 GTModelTypeGeoKey (Short,1): ModelTypeGeographic
167 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
168 GeographicTypeGeoKey (Short,1): User-Defined
169 GeogGeodeticDatumGeoKey (Short,1): Code-6742 (Geodetic Datum of Malaysia 2000)
170 GeogLinearUnitsGeoKey (Short,1): Linear_Meter
171 GeogAngularUnitsGeoKey (Short,1): Code-9114 (mil_6400)
172 End_Of_Keys.
173 End_Of_Geotiff.
174
175 Datum: 6742/Geodetic Datum of Malaysia 2000
176 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
177 Projection Linear Units: User-Defined (1.000000m)
178
179 Corner Coordinates:
180 Upper Left (130d 0' 0.00"E, 32d 0' 0.00"N)
181 Lower Left (130d 0' 0.00"E, 31d 0' 0.00"N)
182 Upper Right (131d 0' 0.00"E, 32d 0' 0.00"N)
183 Lower Right (131d 0' 0.00"E, 31d 0' 0.00"N)
184 Center (130d30' 0.00"E, 31d30' 0.00"N)
185
186 Testing listgeo ../test/data/ProjLinearUnitsGeoKey_9036.tif
187 Geotiff_Information:
188 Version: 1
189 Key_Revision: 1.0
190 Tagged_Information:
191 ModelTiepointTag (2,3):
192 0 0 0
193 440720 3751320 0
194 ModelPixelScaleTag (1,3):
195 60 60 0
196 End_Of_Tags.
197 Keyed_Information:
198 GTModelTypeGeoKey (Short,1): ModelTypeProjected
199 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
200 GTCitationGeoKey (Ascii,23): "NAD27 / BLM 14N (ftUS)"
201 GeogCitationGeoKey (Ascii,6): "NAD27"
202 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
203 ProjectedCSTypeGeoKey (Short,1): Code-32064 (NAD27 / BLM 14N (ftUS))
204 ProjLinearUnitsGeoKey (Short,1): Code-9036 (kilometre)
205 End_Of_Keys.
206 End_Of_Geotiff.
207
208 PCS = 32064 (NAD27 / BLM 14N (ftUS))
209 Projection = 15914 (BLM zone 14N (US survey feet))
210 Projection Method: CT_TransverseMercator
211 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
212 ProjNatOriginLongGeoKey: -99.000000 ( 99d 0' 0.00"W)
213 ProjScaleAtNatOriginGeoKey: 0.999600
214 ProjFalseEastingGeoKey: 500000.001016 m
215 ProjFalseNorthingGeoKey: 0.000000 m
216 GCS: 4267/NAD27
217 Datum: 6267/North American Datum 1927
218 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
219 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
220 Projection Linear Units: 9036/kilometre (1000.000000m)
221
222 Corner Coordinates:
223 Upper Left ( 440720.000, 3751320.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
224 Lower Left ( 440720.000, 3751260.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
225 Upper Right ( 440780.000, 3751320.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
226 Lower Right ( 440780.000, 3751260.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
227 Center ( 440750.000, 3751290.000) (-2147483648d-2147483648' inf"E,-2147483648d-2147483648' inf"N)
228
229 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_28191_cassini_soldner.tif
230 Geotiff_Information:
231 Version: 1
232 Key_Revision: 1.0
233 Tagged_Information:
234 ModelTiepointTag (2,3):
235 0 0 0
236 440720 3751320 0
237 ModelPixelScaleTag (1,3):
238 60 60 0
239 End_Of_Tags.
240 Keyed_Information:
241 GTModelTypeGeoKey (Short,1): ModelTypeProjected
242 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
243 ProjectedCSTypeGeoKey (Short,1): Code-28191 (Palestine 1923 / Palestine Grid)
244 End_Of_Keys.
245 End_Of_Geotiff.
246
247 PCS = 28191 (Palestine 1923 / Palestine Grid)
248 Projection = 18201 (Palestine Grid)
249 Projection Method: CT_CassiniSoldner
250 ProjNatOriginLatGeoKey: 31.734097 ( 31d44' 2.75"N)
251 ProjNatOriginLongGeoKey: 35.212081 ( 35d12'43.49"E)
252 ProjFalseEastingGeoKey: 170251.555000 m
253 ProjFalseNorthingGeoKey: 126867.909000 m
254 GCS: 4281/Palestine 1923
255 Datum: 6281/Palestine 1923
256 Ellipsoid: 7010/Clarke 1880 (Benoit) (6378300.79,6356566.43)
257 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
258 Projection Linear Units: 9001/metre (1.000000m)
259
260 Corner Coordinates:
261 Upper Left ( 440720.000, 3751320.000) ( 40d47'28.08"E, 64d13'29.57"N)
262 Lower Left ( 440720.000, 3751260.000) ( 40d47'27.69"E, 64d13'27.64"N)
263 Upper Right ( 440780.000, 3751320.000) ( 40d47'32.51"E, 64d13'29.40"N)
264 Lower Right ( 440780.000, 3751260.000) ( 40d47'32.12"E, 64d13'27.47"N)
265 Center ( 440750.000, 3751290.000) ( 40d47'30.10"E, 64d13'28.52"N)
266
267 Testing listgeo ../test/data/cassini_soldner.tif
268 Geotiff_Information:
269 Version: 1
270 Key_Revision: 1.0
271 Tagged_Information:
272 ModelTiepointTag (2,3):
273 0 0 0
274 440720 3751320 0
275 ModelPixelScaleTag (1,3):
276 60 60 0
277 End_Of_Tags.
278 Keyed_Information:
279 GTModelTypeGeoKey (Short,1): ModelTypeProjected
280 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
281 GTCitationGeoKey (Ascii,8): "unnamed"
282 GeographicTypeGeoKey (Short,1): User-Defined
283 GeogCitationGeoKey (Ascii,83): "GCS Name = unnamed ellipse|Datum = unknown|Ellipsoid = unnamed|Primem = Greenwich|"
284 GeogGeodeticDatumGeoKey (Short,1): User-Defined
285 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
286 GeogEllipsoidGeoKey (Short,1): User-Defined
287 GeogSemiMajorAxisGeoKey (Double,1): 6378300.789
288 GeogInvFlatteningGeoKey (Double,1): 293.46631553898
289 GeogPrimeMeridianLongGeoKey (Double,1): 0
290 ProjectedCSTypeGeoKey (Short,1): User-Defined
291 ProjectionGeoKey (Short,1): User-Defined
292 ProjCoordTransGeoKey (Short,1): CT_CassiniSoldner
293 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
294 ProjNatOriginLongGeoKey (Double,1): 35.2120805555556
295 ProjNatOriginLatGeoKey (Double,1): 31.7340969444444
296 ProjFalseEastingGeoKey (Double,1): 170251.555
297 ProjFalseNorthingGeoKey (Double,1): 126867.909
298 End_Of_Keys.
299 End_Of_Geotiff.
300
301 Projection Method: CT_CassiniSoldner
302 ProjNatOriginLatGeoKey: 31.734097 ( 31d44' 2.75"N)
303 ProjNatOriginLongGeoKey: 35.212081 ( 35d12'43.49"E)
304 ProjScaleAtNatOriginGeoKey: 1.000000
305 ProjFalseEastingGeoKey: 170251.555000 m
306 ProjFalseNorthingGeoKey: 126867.909000 m
307 Projection Linear Units: 9001/metre (1.000000m)
308
309 Corner Coordinates:
310 Upper Left ( 440720.000, 3751320.000) ( 40d47'28.08"E, 64d13'29.57"N)
311 Lower Left ( 440720.000, 3751260.000) ( 40d47'27.69"E, 64d13'27.64"N)
312 Upper Right ( 440780.000, 3751320.000) ( 40d47'32.51"E, 64d13'29.40"N)
313 Lower Right ( 440780.000, 3751260.000) ( 40d47'32.12"E, 64d13'27.47"N)
314 Center ( 440750.000, 3751290.000) ( 40d47'30.10"E, 64d13'28.52"N)
315
316 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif
317 Geotiff_Information:
318 Version: 1
319 Key_Revision: 1.0
320 Tagged_Information:
321 ModelTiepointTag (2,3):
322 0 0 0
323 440720 3751320 0
324 ModelPixelScaleTag (1,3):
325 60 60 0
326 End_Of_Tags.
327 Keyed_Information:
328 GTModelTypeGeoKey (Short,1): ModelTypeProjected
329 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
330 ProjectedCSTypeGeoKey (Short,1): PCS_GD49_NZ_Map_Grid
331 End_Of_Keys.
332 End_Of_Geotiff.
333
334 PCS = 27200 (NZGD49 / New Zealand Map Grid)
335 Projection = 19917 (New Zealand Map Grid)
336 Projection Method: CT_NewZealandMapGrid
337 ProjNatOriginLatGeoKey: -41.000000 ( 41d 0' 0.00"S)
338 ProjNatOriginLongGeoKey: 173.000000 (173d 0' 0.00"E)
339 ProjFalseEastingGeoKey: 2510000.000000 m
340 ProjFalseNorthingGeoKey: 6023150.000000 m
341 GCS: 4272/NZGD49
342 Datum: 6272/New Zealand Geodetic Datum 1949
343 Ellipsoid: 7022/International 1924 (6378388.00,6356911.95)
344 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
345 Projection Linear Units: 9001/metre (1.000000m)
346
347 Corner Coordinates:
348 Upper Left ( 440720.000, 3751320.000) (143d59'58.89"E, 55d42'40.66"S)
349 Lower Left ( 440720.000, 3751260.000) (143d59'58.39"E, 55d42'41.52"S)
350 Upper Right ( 440780.000, 3751320.000) (144d 0' 0.42"E, 55d42'40.94"S)
351 Lower Right ( 440780.000, 3751260.000) (143d59'59.92"E, 55d42'41.81"S)
352 Center ( 440750.000, 3751290.000) (143d59'59.40"E, 55d42'41.23"S)
353
354 Testing listgeo ../test/data/new_zealand_mapping_grid.tif
355 Geotiff_Information:
356 Version: 1
357 Key_Revision: 1.0
358 Tagged_Information:
359 ModelTiepointTag (2,3):
360 0 0 0
361 440720 3751320 0
362 ModelPixelScaleTag (1,3):
363 60 60 0
364 End_Of_Tags.
365 Keyed_Information:
366 GTModelTypeGeoKey (Short,1): ModelTypeProjected
367 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
368 GTCitationGeoKey (Ascii,8): "unknown"
369 GeographicTypeGeoKey (Short,1): User-Defined
370 GeogCitationGeoKey (Ascii,39): "GCS Name = unknown|Primem = Greenwich|"
371 GeogGeodeticDatumGeoKey (Short,1): Datum_New_Zealand_Geodetic_Datum_1949
372 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
373 GeogSemiMajorAxisGeoKey (Double,1): 6378388
374 GeogInvFlatteningGeoKey (Double,1): 297
375 GeogPrimeMeridianLongGeoKey (Double,1): 0
376 ProjectedCSTypeGeoKey (Short,1): User-Defined
377 ProjectionGeoKey (Short,1): User-Defined
378 ProjCoordTransGeoKey (Short,1): CT_NewZealandMapGrid
379 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
380 ProjNatOriginLongGeoKey (Double,1): 173
381 ProjNatOriginLatGeoKey (Double,1): -41
382 ProjFalseEastingGeoKey (Double,1): 2510000
383 ProjFalseNorthingGeoKey (Double,1): 6023150
384 End_Of_Keys.
385 End_Of_Geotiff.
386
387 Projection Method: CT_NewZealandMapGrid
388 ProjCenterLatGeoKey: -41.000000 ( 41d 0' 0.00"S)
389 ProjCenterLongGeoKey: 173.000000 (173d 0' 0.00"E)
390 ProjFalseEastingGeoKey: 2510000.000000 m
391 ProjFalseNorthingGeoKey: 6023150.000000 m
392 Datum: 6272/New Zealand Geodetic Datum 1949
393 Ellipsoid: 7022/International 1924 (6378388.00,6356911.95)
394 Projection Linear Units: 9001/metre (1.000000m)
395
396 Corner Coordinates:
397 Upper Left ( 440720.000, 3751320.000) (143d59'58.89"E, 55d42'40.66"S)
398 Lower Left ( 440720.000, 3751260.000) (143d59'58.39"E, 55d42'41.52"S)
399 Upper Right ( 440780.000, 3751320.000) (144d 0' 0.42"E, 55d42'40.94"S)
400 Lower Right ( 440780.000, 3751260.000) (143d59'59.92"E, 55d42'41.81"S)
401 Center ( 440750.000, 3751290.000) (143d59'59.40"E, 55d42'41.23"S)
402
403 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_29101_polyconic.tif
404 Geotiff_Information:
405 Version: 1
406 Key_Revision: 1.0
407 Tagged_Information:
408 ModelTiepointTag (2,3):
409 0 0 0
410 440720 3751320 0
411 ModelPixelScaleTag (1,3):
412 60 60 0
413 End_Of_Tags.
414 Keyed_Information:
415 GTModelTypeGeoKey (Short,1): ModelTypeProjected
416 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
417 ProjectedCSTypeGeoKey (Short,1): Code-29101 (SAD69 / Brazil Polyconic)
418 End_Of_Keys.
419 End_Of_Geotiff.
420
421 PCS = 29101 (SAD69 / Brazil Polyconic)
422 Projection = 19941 (Brazil Polyconic)
423 Projection Method: CT_Polyconic
424 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
425 ProjNatOriginLongGeoKey: -54.000000 ( 54d 0' 0.00"W)
426 ProjFalseEastingGeoKey: 5000000.000000 m
427 ProjFalseNorthingGeoKey: 10000000.000000 m
428 GCS: 4618/SAD69
429 Datum: 6618/South American Datum 1969
430 Ellipsoid: 7050/GRS 1967 Modified (6378160.00,6356774.72)
431 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
432 Projection Linear Units: 9001/metre (1.000000m)
433
434 Corner Coordinates:
435 Upper Left ( 440720.000, 3751320.000) (113d19' 8.06"W, 41d40' 0.55"S)
436 Lower Left ( 440720.000, 3751260.000) (113d19' 9.60"W, 41d40' 1.72"S)
437 Upper Right ( 440780.000, 3751320.000) (113d19' 5.97"W, 41d40' 1.51"S)
438 Lower Right ( 440780.000, 3751260.000) (113d19' 7.51"W, 41d40' 2.67"S)
439 Center ( 440750.000, 3751290.000) (113d19' 7.78"W, 41d40' 1.61"S)
440
441 Testing listgeo ../test/data/polyconic.tif
442 Geotiff_Information:
443 Version: 1
444 Key_Revision: 1.0
445 Tagged_Information:
446 ModelTiepointTag (2,3):
447 0 0 0
448 440720 3751320 0
449 ModelPixelScaleTag (1,3):
450 60 60 0
451 End_Of_Tags.
452 Keyed_Information:
453 GTModelTypeGeoKey (Short,1): ModelTypeProjected
454 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
455 GTCitationGeoKey (Ascii,25): "SAD69 / Brazil Polyconic"
456 GeographicTypeGeoKey (Short,1): Code-4618 (SAD69)
457 GeogCitationGeoKey (Ascii,6): "SAD69"
458 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
459 GeogSemiMajorAxisGeoKey (Double,1): 6378160
460 GeogInvFlatteningGeoKey (Double,1): 298.25
461 ProjectedCSTypeGeoKey (Short,1): User-Defined
462 ProjectionGeoKey (Short,1): User-Defined
463 ProjCoordTransGeoKey (Short,1): CT_Polyconic
464 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
465 ProjNatOriginLongGeoKey (Double,1): -54
466 ProjNatOriginLatGeoKey (Double,1): 0
467 ProjFalseEastingGeoKey (Double,1): 5000000
468 ProjFalseNorthingGeoKey (Double,1): 10000000
469 ProjScaleAtNatOriginGeoKey (Double,1): 1
470 End_Of_Keys.
471 End_Of_Geotiff.
472
473 Projection Method: CT_Polyconic
474 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
475 ProjNatOriginLongGeoKey: -54.000000 ( 54d 0' 0.00"W)
476 ProjScaleAtNatOriginGeoKey: 1.000000
477 ProjFalseEastingGeoKey: 5000000.000000 m
478 ProjFalseNorthingGeoKey: 10000000.000000 m
479 GCS: 4618/SAD69
480 Datum: 6618/South American Datum 1969
481 Ellipsoid: 7050/GRS 1967 Modified (6378160.00,6356774.72)
482 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
483 Projection Linear Units: 9001/metre (1.000000m)
484
485 Corner Coordinates:
486 Upper Left ( 440720.000, 3751320.000) (113d19' 8.06"W, 41d40' 0.55"S)
487 Lower Left ( 440720.000, 3751260.000) (113d19' 9.60"W, 41d40' 1.72"S)
488 Upper Right ( 440780.000, 3751320.000) (113d19' 5.97"W, 41d40' 1.51"S)
489 Lower Right ( 440780.000, 3751260.000) (113d19' 7.51"W, 41d40' 2.67"S)
490 Center ( 440750.000, 3751290.000) (113d19' 7.78"W, 41d40' 1.61"S)
491
492 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_6808_hotine_oblique_mercator_variant_a.tif
493 Geotiff_Information:
494 Version: 1
495 Key_Revision: 1.0
496 Tagged_Information:
497 ModelTiepointTag (2,3):
498 0 0 0
499 440720 3751320 0
500 ModelPixelScaleTag (1,3):
501 60 60 0
502 End_Of_Tags.
503 Keyed_Information:
504 GTModelTypeGeoKey (Short,1): ModelTypeProjected
505 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
506 ProjectedCSTypeGeoKey (Short,1): Code-6808 (NAD83(CORS96) / Oregon Columbia River West zone (m))
507 End_Of_Keys.
508 End_Of_Geotiff.
509
510 PCS = 6808 (NAD83(CORS96) / Oregon Columbia River West zone (m))
511 Projection = 6753 (Oregon Columbia River West zone (meters))
512 Projection Method: CT_ObliqueMercator
513 ProjCenterLatGeoKey: 45.916667 ( 45d55' 0.00"N)
514 ProjCenterLongGeoKey: -123.000000 (123d 0' 0.00"W)
515 ProjAzimuthAngleGeoKey: 295.000000 (295d 0' 0.00"N)
516 ProjRectifiedGridAngleGeoKey: 295.000000 (295d 0' 0.00"N)
517 ProjScaleAtCenterGeoKey: 1.000000
518 ProjFalseEastingGeoKey: 7000000.000000 m
519 ProjFalseNorthingGeoKey: -3000000.000000 m
520 GCS: 6783/NAD83(CORS96)
521 Datum: 1133/NAD83 (Continuously Operating Reference Station 1996)
522 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
523 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
524 Projection Linear Units: 9001/metre (1.000000m)
525
526 Corner Coordinates:
527 Upper Left ( 440720.000, 3751320.000) (108d21'24.58"E, 42d37'41.03"N)
528 Lower Left ( 440720.000, 3751260.000) (108d21'26.88"E, 42d37'40.94"N)
529 Upper Right ( 440780.000, 3751320.000) (108d21'24.71"E, 42d37'42.73"N)
530 Lower Right ( 440780.000, 3751260.000) (108d21'27.01"E, 42d37'42.64"N)
531 Center ( 440750.000, 3751290.000) (108d21'25.79"E, 42d37'41.83"N)
532
533 Testing listgeo ../test/data/hotine_oblique_mercator_variant_a.tif
534 Geotiff_Information:
535 Version: 1
536 Key_Revision: 1.0
537 Tagged_Information:
538 ModelTiepointTag (2,3):
539 0 0 0
540 440720 3751320 0
541 ModelPixelScaleTag (1,3):
542 60 60 0
543 End_Of_Tags.
544 Keyed_Information:
545 GTModelTypeGeoKey (Short,1): ModelTypeProjected
546 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
547 GTCitationGeoKey (Ascii,52): "NAD83(CORS96) / Oregon Columbia River West zone (m)"
548 GeographicTypeGeoKey (Short,1): Code-6783 (NAD83(CORS96))
549 GeogCitationGeoKey (Ascii,14): "NAD83(CORS96)"
550 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
551 GeogSemiMajorAxisGeoKey (Double,1): 6378137
552 GeogInvFlatteningGeoKey (Double,1): 298.257222101
553 ProjectedCSTypeGeoKey (Short,1): User-Defined
554 ProjectionGeoKey (Short,1): User-Defined
555 ProjCoordTransGeoKey (Short,1): CT_ObliqueMercator
556 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
557 ProjFalseEastingGeoKey (Double,1): 7000000
558 ProjFalseNorthingGeoKey (Double,1): -3000000
559 ProjCenterLongGeoKey (Double,1): -123
560 ProjCenterLatGeoKey (Double,1): 45.9166666666667
561 ProjScaleAtCenterGeoKey (Double,1): 1
562 ProjAzimuthAngleGeoKey (Double,1): 295
563 ProjRectifiedGridAngleGeoKey (Double,1): 295
564 End_Of_Keys.
565 End_Of_Geotiff.
566
567 Projection Method: CT_ObliqueMercator
568 ProjCenterLatGeoKey: 45.916667 ( 45d55' 0.00"N)
569 ProjCenterLongGeoKey: -123.000000 (123d 0' 0.00"W)
570 ProjAzimuthAngleGeoKey: 295.000000 (295d 0' 0.00"N)
571 ProjRectifiedGridAngleGeoKey: 295.000000 (295d 0' 0.00"N)
572 ProjScaleAtCenterGeoKey: 1.000000
573 ProjFalseEastingGeoKey: 7000000.000000 m
574 ProjFalseNorthingGeoKey: -3000000.000000 m
575 GCS: 6783/NAD83(CORS96)
576 Datum: 1133/NAD83 (Continuously Operating Reference Station 1996)
577 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
578 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
579 Projection Linear Units: 9001/metre (1.000000m)
580
581 Corner Coordinates:
582 Upper Left ( 440720.000, 3751320.000) (108d21'24.58"E, 42d37'41.03"N)
583 Lower Left ( 440720.000, 3751260.000) (108d21'26.88"E, 42d37'40.94"N)
584 Upper Right ( 440780.000, 3751320.000) (108d21'24.71"E, 42d37'42.73"N)
585 Lower Right ( 440780.000, 3751260.000) (108d21'27.01"E, 42d37'42.64"N)
586 Center ( 440750.000, 3751290.000) (108d21'25.79"E, 42d37'41.83"N)
587
588 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_8065_hotine_oblique_mercator_variant_b.tif
589 Geotiff_Information:
590 Version: 1
591 Key_Revision: 1.0
592 Tagged_Information:
593 ModelTiepointTag (2,3):
594 0 0 0
595 440720 3751320 0
596 ModelPixelScaleTag (1,3):
597 60 60 0
598 End_Of_Tags.
599 Keyed_Information:
600 GTModelTypeGeoKey (Short,1): ModelTypeProjected
601 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
602 ProjectedCSTypeGeoKey (Short,1): Code-8065 (NAD83(2011) / PCCS zone 1 (ft))
603 End_Of_Keys.
604 End_Of_Geotiff.
605
606 PCS = 8065 (NAD83(2011) / PCCS zone 1 (ft))
607 Projection = 8061 (Pima County zone 1 East (ft))
608 Projection Method: CT_HotineObliqueMercatorAzimuthCenter
609 ProjCenterLatGeoKey: 32.250000 ( 32d15' 0.00"N)
610 ProjCenterLongGeoKey: -111.400000 (111d24' 0.00"W)
611 ProjAzimuthAngleGeoKey: 45.000000 ( 45d 0' 0.00"N)
612 ProjRectifiedGridAngleGeoKey: 45.000000 ( 45d 0' 0.00"N)
613 ProjScaleAtCenterGeoKey: 1.000110
614 ProjFalseEastingGeoKey: 48768.000000 m
615 ProjFalseNorthingGeoKey: 243840.000000 m
616 GCS: 6318/NAD83(2011)
617 Datum: 1116/NAD83 (National Spatial Reference System 2011)
618 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
619 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
620 Projection Linear Units: 9002/foot (0.304800m)
621
622 Corner Coordinates:
623 Upper Left ( 440720.000, 3751320.000) (110d24'54.42"W, 40d20'32.45"N)
624 Lower Left ( 440720.000, 3751260.000) (110d24'54.42"W, 40d20'31.86"N)
625 Upper Right ( 440780.000, 3751320.000) (110d24'53.64"W, 40d20'32.45"N)
626 Lower Right ( 440780.000, 3751260.000) (110d24'53.65"W, 40d20'31.86"N)
627 Center ( 440750.000, 3751290.000) (110d24'54.03"W, 40d20'32.15"N)
628
629 Testing listgeo ../test/data/hotine_oblique_mercator_variant_b.tif
630 Geotiff_Information:
631 Version: 1
632 Key_Revision: 1.0
633 Tagged_Information:
634 ModelTiepointTag (2,3):
635 0 0 0
636 440720 3751320 0
637 ModelPixelScaleTag (1,3):
638 60 60 0
639 End_Of_Tags.
640 Keyed_Information:
641 GTModelTypeGeoKey (Short,1): ModelTypeProjected
642 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
643 GTCitationGeoKey (Ascii,31): "NAD83(2011) / PCCS zone 1 (ft)"
644 GeographicTypeGeoKey (Short,1): Code-6318 (NAD83(2011))
645 GeogCitationGeoKey (Ascii,12): "NAD83(2011)"
646 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
647 GeogSemiMajorAxisGeoKey (Double,1): 6378137
648 GeogInvFlatteningGeoKey (Double,1): 298.257222101
649 Unknown-3059 (Short,1): Unknown-1
650 ProjectedCSTypeGeoKey (Short,1): User-Defined
651 ProjectionGeoKey (Short,1): User-Defined
652 ProjCoordTransGeoKey (Short,1): CT_HotineObliqueMercatorAzimuthCenter
653 ProjLinearUnitsGeoKey (Short,1): Linear_Foot
654 ProjFalseEastingGeoKey (Double,1): 160000
655 ProjFalseNorthingGeoKey (Double,1): 800000
656 ProjCenterLongGeoKey (Double,1): -111.4
657 ProjCenterLatGeoKey (Double,1): 32.25
658 ProjScaleAtCenterGeoKey (Double,1): 1.00011
659 ProjAzimuthAngleGeoKey (Double,1): 45
660 ProjRectifiedGridAngleGeoKey (Double,1): 45
661 End_Of_Keys.
662 End_Of_Geotiff.
663
664 Projection Method: CT_HotineObliqueMercatorAzimuthCenter
665 ProjCenterLatGeoKey: 32.250000 ( 32d15' 0.00"N)
666 ProjCenterLongGeoKey: -111.400000 (111d24' 0.00"W)
667 ProjAzimuthAngleGeoKey: 45.000000 ( 45d 0' 0.00"N)
668 ProjRectifiedGridAngleGeoKey: 45.000000 ( 45d 0' 0.00"N)
669 ProjScaleAtCenterGeoKey: 1.000110
670 ProjFalseEastingGeoKey: 48768.000000 m
671 ProjFalseNorthingGeoKey: 243840.000000 m
672 GCS: 6318/NAD83(2011)
673 Datum: 1116/NAD83 (National Spatial Reference System 2011)
674 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
675 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
676 Projection Linear Units: 9002/foot (0.304800m)
677
678 Corner Coordinates:
679 Upper Left ( 440720.000, 3751320.000) (110d24'54.42"W, 40d20'32.45"N)
680 Lower Left ( 440720.000, 3751260.000) (110d24'54.42"W, 40d20'31.86"N)
681 Upper Right ( 440780.000, 3751320.000) (110d24'53.64"W, 40d20'32.45"N)
682 Lower Right ( 440780.000, 3751260.000) (110d24'53.65"W, 40d20'31.86"N)
683 Center ( 440750.000, 3751290.000) (110d24'54.03"W, 40d20'32.15"N)
684
685 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_8441_oblique_mercator_laborde.tif
686 Geotiff_Information:
687 Version: 1
688 Key_Revision: 1.0
689 Tagged_Information:
690 ModelTiepointTag (2,3):
691 0 0 0
692 440720 3751320 0
693 ModelPixelScaleTag (1,3):
694 60 60 0
695 End_Of_Tags.
696 Keyed_Information:
697 GTModelTypeGeoKey (Short,1): ModelTypeProjected
698 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
699 ProjectedCSTypeGeoKey (Short,1): Code-8441 (Tananarive / Laborde Grid)
700 End_Of_Keys.
701 End_Of_Geotiff.
702
703 PCS = 8441 (Tananarive / Laborde Grid)
704 Projection = 8440 (Laborde Grid (Greenwich))
705 Projection Method: CT_ObliqueMercator_Laborde
706 ProjCenterLatGeoKey: -18.900000 ( 18d54' 0.00"S)
707 ProjCenterLongGeoKey: 46.437229 ( 46d26'14.02"E)
708 ProjAzimuthAngleGeoKey: 18.900000 ( 18d54' 0.00"N)
709 ProjScaleAtCenterGeoKey: 0.999500
710 ProjFalseEastingGeoKey: 400000.000000 m
711 ProjFalseNorthingGeoKey: 800000.000000 m
712 GCS: 4297/Tananarive
713 Datum: 6297/Tananarive 1925
714 Ellipsoid: 7022/International 1924 (6378388.00,6356911.95)
715 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
716 Projection Linear Units: 9001/metre (1.000000m)
717
718 Corner Coordinates:
719 Upper Left ( 440720.000, 3751320.000) ( 46d30'50.44"E, 7d41'54.99"N)
720 Lower Left ( 440720.000, 3751260.000) ( 46d30'50.50"E, 7d41'53.06"N)
721 Upper Right ( 440780.000, 3751320.000) ( 46d30'52.38"E, 7d41'55.05"N)
722 Lower Right ( 440780.000, 3751260.000) ( 46d30'52.44"E, 7d41'53.12"N)
723 Center ( 440750.000, 3751290.000) ( 46d30'51.44"E, 7d41'54.06"N)
724
725 Testing listgeo ../test/data/oblique_mercator_laborde.tif
726 Geotiff_Information:
727 Version: 1
728 Key_Revision: 1.0
729 Tagged_Information:
730 ModelTiepointTag (2,3):
731 0 0 0
732 440720 3751320 0
733 ModelPixelScaleTag (1,3):
734 60 60 0
735 End_Of_Tags.
736 Keyed_Information:
737 GTModelTypeGeoKey (Short,1): ModelTypeProjected
738 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
739 GTCitationGeoKey (Ascii,26): "Tananarive / Laborde Grid"
740 GeographicTypeGeoKey (Short,1): GCS_Tananarive
741 GeogCitationGeoKey (Ascii,11): "Tananarive"
742 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
743 GeogSemiMajorAxisGeoKey (Double,1): 6378388
744 GeogInvFlatteningGeoKey (Double,1): 297
745 ProjectedCSTypeGeoKey (Short,1): User-Defined
746 ProjectionGeoKey (Short,1): User-Defined
747 ProjCoordTransGeoKey (Short,1): CT_ObliqueMercator_Laborde
748 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
749 ProjFalseEastingGeoKey (Double,1): 400000
750 ProjFalseNorthingGeoKey (Double,1): 800000
751 ProjCenterLongGeoKey (Double,1): 46.4372291666667
752 ProjCenterLatGeoKey (Double,1): -18.9
753 ProjScaleAtCenterGeoKey (Double,1): 0.9995
754 ProjAzimuthAngleGeoKey (Double,1): 18.9
755 End_Of_Keys.
756 End_Of_Geotiff.
757
758 Projection Method: CT_ObliqueMercator_Laborde
759 ProjCenterLatGeoKey: -18.900000 ( 18d54' 0.00"S)
760 ProjCenterLongGeoKey: 46.437229 ( 46d26'14.03"E)
761 ProjAzimuthAngleGeoKey: 18.900000 ( 18d54' 0.00"N)
762 ProjScaleAtCenterGeoKey: 0.999500
763 ProjFalseEastingGeoKey: 400000.000000 m
764 ProjFalseNorthingGeoKey: 800000.000000 m
765 GCS: 4297/Tananarive
766 Datum: 6297/Tananarive 1925
767 Ellipsoid: 7022/International 1924 (6378388.00,6356911.95)
768 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
769 Projection Linear Units: 9001/metre (1.000000m)
770
771 Corner Coordinates:
772 Upper Left ( 440720.000, 3751320.000) ( 46d30'50.44"E, 7d41'54.99"N)
773 Lower Left ( 440720.000, 3751260.000) ( 46d30'50.50"E, 7d41'53.06"N)
774 Upper Right ( 440780.000, 3751320.000) ( 46d30'52.38"E, 7d41'55.05"N)
775 Lower Right ( 440780.000, 3751260.000) ( 46d30'52.44"E, 7d41'53.12"N)
776 Center ( 440750.000, 3751290.000) ( 46d30'51.44"E, 7d41'54.06"N)
777
778 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_5456_lcc1sp.tif
779 Geotiff_Information:
780 Version: 1
781 Key_Revision: 1.0
782 Tagged_Information:
783 ModelTiepointTag (2,3):
784 0 0 0
785 440720 3751320 0
786 ModelPixelScaleTag (1,3):
787 60 60 0
788 End_Of_Tags.
789 Keyed_Information:
790 GTModelTypeGeoKey (Short,1): ModelTypeProjected
791 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
792 ProjectedCSTypeGeoKey (Short,1): Code-5456 (Ocotepeque 1935 / Costa Rica Norte)
793 End_Of_Keys.
794 End_Of_Geotiff.
795
796 PCS = 5456 (Ocotepeque 1935 / Costa Rica Norte)
797 Projection = 5390 (Costa Rica Norte)
798 Projection Method: CT_LambertConfConic_1SP
799 ProjNatOriginLatGeoKey: 10.466667 ( 10d28' 0.00"N)
800 ProjNatOriginLongGeoKey: -84.333333 ( 84d20' 0.00"W)
801 ProjScaleAtNatOriginGeoKey: 0.999957
802 ProjFalseEastingGeoKey: 500000.000000 m
803 ProjFalseNorthingGeoKey: 271820.522000 m
804 GCS: 5451/Ocotepeque 1935
805 Datum: 1070/Ocotepeque 1935
806 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
807 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
808 Projection Linear Units: 9001/metre (1.000000m)
809
810 Corner Coordinates:
811 Upper Left ( 440720.000, 3751320.000) ( 84d56' 7.81"W, 40d22'42.48"N)
812 Lower Left ( 440720.000, 3751260.000) ( 84d56' 7.81"W, 40d22'40.80"N)
813 Upper Right ( 440780.000, 3751320.000) ( 84d56' 5.62"W, 40d22'42.48"N)
814 Lower Right ( 440780.000, 3751260.000) ( 84d56' 5.62"W, 40d22'40.80"N)
815 Center ( 440750.000, 3751290.000) ( 84d56' 6.72"W, 40d22'41.64"N)
816
817 Testing listgeo ../test/data/lcc1sp.tif
818 Geotiff_Information:
819 Version: 1
820 Key_Revision: 1.0
821 Tagged_Information:
822 ModelTiepointTag (2,3):
823 0 0 0
824 440720 3751320 0
825 ModelPixelScaleTag (1,3):
826 60 60 0
827 End_Of_Tags.
828 Keyed_Information:
829 GTModelTypeGeoKey (Short,1): ModelTypeProjected
830 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
831 GTCitationGeoKey (Ascii,35): "Ocotepeque 1935 / Costa Rica Norte"
832 GeographicTypeGeoKey (Short,1): Code-5451 (Ocotepeque 1935)
833 GeogCitationGeoKey (Ascii,16): "Ocotepeque 1935"
834 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
835 GeogSemiMajorAxisGeoKey (Double,1): 6378206.4
836 GeogInvFlatteningGeoKey (Double,1): 294.978698213898
837 ProjectedCSTypeGeoKey (Short,1): User-Defined
838 ProjectionGeoKey (Short,1): User-Defined
839 ProjCoordTransGeoKey (Short,1): CT_LambertConfConic_1SP
840 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
841 ProjNatOriginLongGeoKey (Double,1): -84.3333333333333
842 ProjNatOriginLatGeoKey (Double,1): 10.4666666666667
843 ProjFalseEastingGeoKey (Double,1): 500000
844 ProjFalseNorthingGeoKey (Double,1): 271820.522
845 ProjScaleAtNatOriginGeoKey (Double,1): 0.99995696
846 End_Of_Keys.
847 End_Of_Geotiff.
848
849 Projection Method: CT_LambertConfConic_1SP
850 ProjNatOriginLatGeoKey: 10.466667 ( 10d28' 0.00"N)
851 ProjNatOriginLongGeoKey: -84.333333 ( 84d20' 0.00"W)
852 ProjScaleAtNatOriginGeoKey: 0.999957
853 ProjFalseEastingGeoKey: 500000.000000 m
854 ProjFalseNorthingGeoKey: 271820.522000 m
855 GCS: 5451/Ocotepeque 1935
856 Datum: 1070/Ocotepeque 1935
857 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
858 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
859 Projection Linear Units: 9001/metre (1.000000m)
860
861 Corner Coordinates:
862 Upper Left ( 440720.000, 3751320.000) ( 84d56' 7.81"W, 40d22'42.48"N)
863 Lower Left ( 440720.000, 3751260.000) ( 84d56' 7.81"W, 40d22'40.80"N)
864 Upper Right ( 440780.000, 3751320.000) ( 84d56' 5.62"W, 40d22'42.48"N)
865 Lower Right ( 440780.000, 3751260.000) ( 84d56' 5.62"W, 40d22'40.80"N)
866 Center ( 440750.000, 3751290.000) ( 84d56' 6.72"W, 40d22'41.64"N)
867
868 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_5329_mercator1sp.tif
869 Geotiff_Information:
870 Version: 1
871 Key_Revision: 1.0
872 Tagged_Information:
873 ModelTiepointTag (2,3):
874 0 0 0
875 440720 3751320 0
876 ModelPixelScaleTag (1,3):
877 60 60 0
878 End_Of_Tags.
879 Keyed_Information:
880 GTModelTypeGeoKey (Short,1): ModelTypeProjected
881 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
882 ProjectedCSTypeGeoKey (Short,1): Code-5329 (Segara (Jakarta) / NEIEZ)
883 End_Of_Keys.
884 End_Of_Geotiff.
885
886 PCS = 5329 (Segara (Jakarta) / NEIEZ)
887 Projection = 5328 (Netherlands East Indies Equatorial Zone (Jkt))
888 Projection Method: CT_Mercator
889 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
890 ProjNatOriginLongGeoKey: 3.192281 ( 3d11'32.21"E)
891 ProjScaleAtNatOriginGeoKey: 0.997000
892 ProjFalseEastingGeoKey: 3900000.000000 m
893 ProjFalseNorthingGeoKey: 900000.000000 m
894 GCS: 4820/Segara (Jakarta)
895 Datum: 6820/Gunung Segara (Jakarta)
896 Ellipsoid: 7004/Bessel 1841 (6377397.16,6356078.96)
897 Prime Meridian: 8908/Jakarta (106.807719/106d48'27.79"E)
898 Projection Linear Units: 9001/metre (1.000000m)
899
900 Corner Coordinates:
901 Upper Left ( 440720.000, 3751320.000) ( 27d53'11.64"W, 24d57' 0.31"N)
902 Lower Left ( 440720.000, 3751260.000) ( 27d53'11.64"W, 24d56'58.54"N)
903 Upper Right ( 440780.000, 3751320.000) ( 27d53' 9.70"W, 24d57' 0.31"N)
904 Lower Right ( 440780.000, 3751260.000) ( 27d53' 9.70"W, 24d56'58.54"N)
905 Center ( 440750.000, 3751290.000) ( 27d53'10.67"W, 24d56'59.43"N)
906
907 Testing listgeo ../test/data/mercator1sp.tif
908 Geotiff_Information:
909 Version: 1
910 Key_Revision: 1.0
911 Tagged_Information:
912 ModelTiepointTag (2,3):
913 0 0 0
914 440720 3751320 0
915 ModelPixelScaleTag (1,3):
916 60 60 0
917 End_Of_Tags.
918 Keyed_Information:
919 GTModelTypeGeoKey (Short,1): ModelTypeProjected
920 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
921 GTCitationGeoKey (Ascii,25): "Segara (Jakarta) / NEIEZ"
922 GeographicTypeGeoKey (Short,1): Code-4820 (Segara (Jakarta))
923 GeogCitationGeoKey (Ascii,17): "Segara (Jakarta)"
924 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
925 GeogSemiMajorAxisGeoKey (Double,1): 6377397.155
926 GeogInvFlatteningGeoKey (Double,1): 299.1528128
927 ProjectedCSTypeGeoKey (Short,1): User-Defined
928 ProjectionGeoKey (Short,1): User-Defined
929 ProjCoordTransGeoKey (Short,1): CT_Mercator
930 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
931 ProjNatOriginLongGeoKey (Double,1): 3.19228055555556
932 ProjNatOriginLatGeoKey (Double,1): 0
933 ProjFalseEastingGeoKey (Double,1): 3900000
934 ProjFalseNorthingGeoKey (Double,1): 900000
935 ProjScaleAtNatOriginGeoKey (Double,1): 0.997
936 End_Of_Keys.
937 End_Of_Geotiff.
938
939 Projection Method: CT_Mercator
940 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
941 ProjNatOriginLongGeoKey: 3.192281 ( 3d11'32.21"E)
942 ProjScaleAtNatOriginGeoKey: 0.997000
943 ProjFalseEastingGeoKey: 3900000.000000 m
944 ProjFalseNorthingGeoKey: 900000.000000 m
945 GCS: 4820/Segara (Jakarta)
946 Datum: 6820/Gunung Segara (Jakarta)
947 Ellipsoid: 7004/Bessel 1841 (6377397.16,6356078.96)
948 Prime Meridian: 8908/Jakarta (106.807719/106d48'27.79"E)
949 Projection Linear Units: 9001/metre (1.000000m)
950
951 Corner Coordinates:
952 Upper Left ( 440720.000, 3751320.000) ( 27d53'11.64"W, 24d57' 0.31"N)
953 Lower Left ( 440720.000, 3751260.000) ( 27d53'11.64"W, 24d56'58.54"N)
954 Upper Right ( 440780.000, 3751320.000) ( 27d53' 9.70"W, 24d57' 0.31"N)
955 Lower Right ( 440780.000, 3751260.000) ( 27d53' 9.70"W, 24d56'58.54"N)
956 Center ( 440750.000, 3751290.000) ( 27d53'10.67"W, 24d56'59.43"N)
957
958 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_5641_mercator2sp.tif
959 Geotiff_Information:
960 Version: 1
961 Key_Revision: 1.0
962 Tagged_Information:
963 ModelTiepointTag (2,3):
964 0 0 0
965 440720 3751320 0
966 ModelPixelScaleTag (1,3):
967 60 60 0
968 End_Of_Tags.
969 Keyed_Information:
970 GTModelTypeGeoKey (Short,1): ModelTypeProjected
971 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
972 ProjectedCSTypeGeoKey (Short,1): Code-5641 (SIRGAS 2000 / Brazil Mercator)
973 End_Of_Keys.
974 End_Of_Geotiff.
975
976 PCS = 5641 (SIRGAS 2000 / Brazil Mercator)
977 Projection = 5640 (Petrobras Mercator)
978 Projection Method: CT_Mercator
979 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
980 ProjNatOriginLongGeoKey: -43.000000 ( 43d 0' 0.00"W)
981 ProjStdParallel1GeoKey: -2.000000 ( 2d 0' 0.00"S)
982 ProjFalseEastingGeoKey: 5000000.000000 m
983 ProjFalseNorthingGeoKey: 10000000.000000 m
984 GCS: 4674/SIRGAS 2000
985 Datum: 6674/Sistema de Referencia Geocentrico para las AmericaS 2000
986 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
987 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
988 Projection Linear Units: 9001/metre (1.000000m)
989
990 Corner Coordinates:
991 Upper Left ( 440720.000, 3751320.000) ( 83d58'53.42"W, 49d 3'29.83"S)
992 Lower Left ( 440720.000, 3751260.000) ( 83d58'53.42"W, 49d 3'31.11"S)
993 Upper Right ( 440780.000, 3751320.000) ( 83d58'51.48"W, 49d 3'29.83"S)
994 Lower Right ( 440780.000, 3751260.000) ( 83d58'51.48"W, 49d 3'31.11"S)
995 Center ( 440750.000, 3751290.000) ( 83d58'52.45"W, 49d 3'30.47"S)
996
997 Testing listgeo ../test/data/mercator2sp.tif
998 Geotiff_Information:
999 Version: 1
1000 Key_Revision: 1.0
1001 Tagged_Information:
1002 ModelTiepointTag (2,3):
1003 0 0 0
1004 440720 3751320 0
1005 ModelPixelScaleTag (1,3):
1006 60 60 0
1007 End_Of_Tags.
1008 Keyed_Information:
1009 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1010 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1011 GTCitationGeoKey (Ascii,30): "SIRGAS 2000 / Brazil Mercator"
1012 GeographicTypeGeoKey (Short,1): Code-4674 (SIRGAS 2000)
1013 GeogCitationGeoKey (Ascii,12): "SIRGAS 2000"
1014 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1015 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1016 GeogInvFlatteningGeoKey (Double,1): 298.257222101
1017 ProjectedCSTypeGeoKey (Short,1): User-Defined
1018 ProjectionGeoKey (Short,1): User-Defined
1019 ProjCoordTransGeoKey (Short,1): CT_Mercator
1020 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1021 ProjStdParallel1GeoKey (Double,1): -2
1022 ProjNatOriginLongGeoKey (Double,1): -43
1023 ProjNatOriginLatGeoKey (Double,1): 0
1024 ProjFalseEastingGeoKey (Double,1): 5000000
1025 ProjFalseNorthingGeoKey (Double,1): 10000000
1026 End_Of_Keys.
1027 End_Of_Geotiff.
1028
1029 Projection Method: CT_Mercator
1030 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
1031 ProjNatOriginLongGeoKey: -43.000000 ( 43d 0' 0.00"W)
1032 ProjStdParallel1GeoKey: -2.000000 ( 2d 0' 0.00"S)
1033 ProjFalseEastingGeoKey: 5000000.000000 m
1034 ProjFalseNorthingGeoKey: 10000000.000000 m
1035 GCS: 4674/SIRGAS 2000
1036 Datum: 6674/Sistema de Referencia Geocentrico para las AmericaS 2000
1037 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1038 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1039 Projection Linear Units: 9001/metre (1.000000m)
1040
1041 Corner Coordinates:
1042 Upper Left ( 440720.000, 3751320.000) ( 83d58'53.42"W, 49d 3'29.83"S)
1043 Lower Left ( 440720.000, 3751260.000) ( 83d58'53.42"W, 49d 3'31.11"S)
1044 Upper Right ( 440780.000, 3751320.000) ( 83d58'51.48"W, 49d 3'29.83"S)
1045 Lower Right ( 440780.000, 3751260.000) ( 83d58'51.48"W, 49d 3'31.11"S)
1046 Center ( 440750.000, 3751290.000) ( 83d58'52.45"W, 49d 3'30.47"S)
1047
1048 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif
1049 Geotiff_Information:
1050 Version: 1
1051 Key_Revision: 1.0
1052 Tagged_Information:
1053 ModelTiepointTag (2,3):
1054 0 0 0
1055 440720 3751320 0
1056 ModelPixelScaleTag (1,3):
1057 60 60 0
1058 End_Of_Tags.
1059 Keyed_Information:
1060 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1061 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1062 ProjectedCSTypeGeoKey (Short,1): Code-5588 (NAD27 / New Brunswick Stereographic (NAD27))
1063 End_Of_Keys.
1064 End_Of_Geotiff.
1065
1066 PCS = 5588 (NAD27 / New Brunswick Stereographic (NAD27))
1067 Projection = 5587 (New Brunswick Stereographic (NAD27))
1068 Projection Method: CT_ObliqueStereographic
1069 ProjNatOriginLatGeoKey: 46.500000 ( 46d30' 0.00"N)
1070 ProjNatOriginLongGeoKey: -66.500000 ( 66d30' 0.00"W)
1071 ProjScaleAtNatOriginGeoKey: 0.999912
1072 ProjFalseEastingGeoKey: 304800.000000 m
1073 ProjFalseNorthingGeoKey: 304800.000000 m
1074 GCS: 4267/NAD27
1075 Datum: 6267/North American Datum 1927
1076 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
1077 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1078 Projection Linear Units: 9002/foot (0.304800m)
1079
1080 Corner Coordinates:
1081 Upper Left ( 440720.000, 3751320.000) ( 69d 5'16.12"W, 54d 0' 2.70"N)
1082 Lower Left ( 440720.000, 3751260.000) ( 69d 5'16.09"W, 54d 0' 2.12"N)
1083 Upper Right ( 440780.000, 3751320.000) ( 69d 5'15.13"W, 54d 0' 2.72"N)
1084 Lower Right ( 440780.000, 3751260.000) ( 69d 5'15.09"W, 54d 0' 2.14"N)
1085 Center ( 440750.000, 3751290.000) ( 69d 5'15.61"W, 54d 0' 2.42"N)
1086
1087 Testing listgeo ../test/data/oblique_stereographic.tif
1088 Geotiff_Information:
1089 Version: 1
1090 Key_Revision: 1.0
1091 Tagged_Information:
1092 ModelTiepointTag (2,3):
1093 0 0 0
1094 440720 3751320 0
1095 ModelPixelScaleTag (1,3):
1096 60 60 0
1097 End_Of_Tags.
1098 Keyed_Information:
1099 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1100 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1101 GTCitationGeoKey (Ascii,44): "NAD27 / New Brunswick Stereographic (NAD27)"
1102 GeographicTypeGeoKey (Short,1): GCS_NAD27
1103 GeogCitationGeoKey (Ascii,6): "NAD27"
1104 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1105 GeogSemiMajorAxisGeoKey (Double,1): 6378206.4
1106 GeogInvFlatteningGeoKey (Double,1): 294.978698213898
1107 Unknown-3059 (Short,1): Unknown-1
1108 ProjectedCSTypeGeoKey (Short,1): User-Defined
1109 ProjectionGeoKey (Short,1): User-Defined
1110 ProjCoordTransGeoKey (Short,1): CT_ObliqueStereographic
1111 ProjLinearUnitsGeoKey (Short,1): Linear_Foot
1112 ProjNatOriginLongGeoKey (Double,1): -66.5
1113 ProjNatOriginLatGeoKey (Double,1): 46.5
1114 ProjFalseEastingGeoKey (Double,1): 1000000
1115 ProjFalseNorthingGeoKey (Double,1): 1000000
1116 ProjScaleAtNatOriginGeoKey (Double,1): 0.999912
1117 End_Of_Keys.
1118 End_Of_Geotiff.
1119
1120 Projection Method: CT_ObliqueStereographic
1121 ProjNatOriginLatGeoKey: 46.500000 ( 46d30' 0.00"N)
1122 ProjNatOriginLongGeoKey: -66.500000 ( 66d30' 0.00"W)
1123 ProjScaleAtNatOriginGeoKey: 0.999912
1124 ProjFalseEastingGeoKey: 304800.000000 m
1125 ProjFalseNorthingGeoKey: 304800.000000 m
1126 GCS: 4267/NAD27
1127 Datum: 6267/North American Datum 1927
1128 Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
1129 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1130 Projection Linear Units: 9002/foot (0.304800m)
1131
1132 Corner Coordinates:
1133 Upper Left ( 440720.000, 3751320.000) ( 69d 5'16.12"W, 54d 0' 2.70"N)
1134 Lower Left ( 440720.000, 3751260.000) ( 69d 5'16.09"W, 54d 0' 2.12"N)
1135 Upper Right ( 440780.000, 3751320.000) ( 69d 5'15.13"W, 54d 0' 2.72"N)
1136 Lower Right ( 440780.000, 3751260.000) ( 69d 5'15.09"W, 54d 0' 2.14"N)
1137 Center ( 440750.000, 3751290.000) ( 69d 5'15.61"W, 54d 0' 2.42"N)
1138
1139 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_5482_polar_stereographic_variant_a.tif
1140 Geotiff_Information:
1141 Version: 1
1142 Key_Revision: 1.0
1143 Tagged_Information:
1144 ModelTiepointTag (2,3):
1145 0 0 0
1146 440720 3751320 0
1147 ModelPixelScaleTag (1,3):
1148 60 60 0
1149 End_Of_Tags.
1150 Keyed_Information:
1151 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1152 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1153 ProjectedCSTypeGeoKey (Short,1): Code-5482 (RSRGD2000 / RSPS2000)
1154 End_Of_Keys.
1155 End_Of_Geotiff.
1156
1157 PCS = 5482 (RSRGD2000 / RSPS2000)
1158 Projection = 5478 (Ross Sea Polar Stereographic 2000)
1159 Projection Method: CT_PolarStereographic
1160 ProjNatOriginLatGeoKey: -90.000000 ( 90d 0' 0.00"S)
1161 ProjStraightVertPoleLongGeoKey: 180.000000 (180d 0' 0.00"E)
1162 ProjScaleAtNatOriginGeoKey: 0.994000
1163 ProjFalseEastingGeoKey: 5000000.000000 m
1164 ProjFalseNorthingGeoKey: 1000000.000000 m
1165 GCS: 4764/RSRGD2000
1166 Datum: 6764/Ross Sea Region Geodetic Datum 2000
1167 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1168 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1169 Projection Linear Units: 9001/metre (1.000000m)
1170
1171 Corner Coordinates:
1172 Upper Left ( 440720.000, 3751320.000) (121d 6'32.72"E, 44d29'35.28"S)
1173 Lower Left ( 440720.000, 3751260.000) (121d 6'30.73"E, 44d29'36.14"S)
1174 Upper Right ( 440780.000, 3751320.000) (121d 6'33.92"E, 44d29'36.70"S)
1175 Lower Right ( 440780.000, 3751260.000) (121d 6'31.93"E, 44d29'37.56"S)
1176 Center ( 440750.000, 3751290.000) (121d 6'32.32"E, 44d29'36.42"S)
1177
1178 Testing listgeo ../test/data/polar_stereographic_variant_a.tif
1179 Geotiff_Information:
1180 Version: 1
1181 Key_Revision: 1.0
1182 Tagged_Information:
1183 ModelTiepointTag (2,3):
1184 0 0 0
1185 440720 3751320 0
1186 ModelPixelScaleTag (1,3):
1187 60 60 0
1188 End_Of_Tags.
1189 Keyed_Information:
1190 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1191 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1192 GTCitationGeoKey (Ascii,21): "RSRGD2000 / RSPS2000"
1193 GeographicTypeGeoKey (Short,1): Code-4764 (RSRGD2000)
1194 GeogCitationGeoKey (Ascii,10): "RSRGD2000"
1195 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1196 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1197 GeogInvFlatteningGeoKey (Double,1): 298.257222101
1198 ProjectedCSTypeGeoKey (Short,1): User-Defined
1199 ProjectionGeoKey (Short,1): User-Defined
1200 ProjCoordTransGeoKey (Short,1): CT_PolarStereographic
1201 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1202 ProjNatOriginLatGeoKey (Double,1): -90
1203 ProjFalseEastingGeoKey (Double,1): 5000000
1204 ProjFalseNorthingGeoKey (Double,1): 1000000
1205 ProjScaleAtNatOriginGeoKey (Double,1): 0.994
1206 ProjStraightVertPoleLongGeoKey (Double,1): 180
1207 End_Of_Keys.
1208 End_Of_Geotiff.
1209
1210 Projection Method: CT_PolarStereographic
1211 ProjNatOriginLatGeoKey: -90.000000 ( 90d 0' 0.00"S)
1212 ProjStraightVertPoleLongGeoKey: 180.000000 (180d 0' 0.00"E)
1213 ProjScaleAtNatOriginGeoKey: 0.994000
1214 ProjFalseEastingGeoKey: 5000000.000000 m
1215 ProjFalseNorthingGeoKey: 1000000.000000 m
1216 GCS: 4764/RSRGD2000
1217 Datum: 6764/Ross Sea Region Geodetic Datum 2000
1218 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1219 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1220 Projection Linear Units: 9001/metre (1.000000m)
1221
1222 Corner Coordinates:
1223 Upper Left ( 440720.000, 3751320.000) (121d 6'32.72"E, 44d29'35.28"S)
1224 Lower Left ( 440720.000, 3751260.000) (121d 6'30.73"E, 44d29'36.14"S)
1225 Upper Right ( 440780.000, 3751320.000) (121d 6'33.92"E, 44d29'36.70"S)
1226 Lower Right ( 440780.000, 3751260.000) (121d 6'31.93"E, 44d29'37.56"S)
1227 Center ( 440750.000, 3751290.000) (121d 6'32.32"E, 44d29'36.42"S)
1228
1229 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_3032_polar_stereographic_variant_b.tif
1230 Geotiff_Information:
1231 Version: 1
1232 Key_Revision: 1.0
1233 Tagged_Information:
1234 ModelTiepointTag (2,3):
1235 0 0 0
1236 440720 3751320 0
1237 ModelPixelScaleTag (1,3):
1238 60 60 0
1239 End_Of_Tags.
1240 Keyed_Information:
1241 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1242 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1243 ProjectedCSTypeGeoKey (Short,1): Code-3032 (WGS 84 / Australian Antarctic Polar Stereographic)
1244 End_Of_Keys.
1245 End_Of_Geotiff.
1246
1247 PCS = 3032 (WGS 84 / Australian Antarctic Polar Stereographic)
1248 Projection = 19993 (Australian Antarctic Polar Stereographic)
1249 Projection Method: CT_PolarStereographic
1250 ProjNatOriginLatGeoKey: -71.000000 ( 71d 0' 0.00"S)
1251 ProjStraightVertPoleLongGeoKey: 70.000000 ( 70d 0' 0.00"E)
1252 ProjScaleAtNatOriginGeoKey: 1.000000
1253 ProjFalseEastingGeoKey: 6000000.000000 m
1254 ProjFalseNorthingGeoKey: 6000000.000000 m
1255 GCS: 4326/WGS 84
1256 Datum: 6326/World Geodetic System 1984
1257 Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
1258 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1259 Projection Linear Units: 9001/metre (1.000000m)
1260
1261 Corner Coordinates:
1262 Upper Left ( 440720.000, 3751320.000) ( 42d 1'22.44"W, 38d27' 1.75"S)
1263 Lower Left ( 440720.000, 3751260.000) ( 42d 1'24.35"W, 38d27' 1.15"S)
1264 Upper Right ( 440780.000, 3751320.000) ( 42d 1'23.21"W, 38d27' 3.26"S)
1265 Lower Right ( 440780.000, 3751260.000) ( 42d 1'25.13"W, 38d27' 2.65"S)
1266 Center ( 440750.000, 3751290.000) ( 42d 1'23.78"W, 38d27' 2.20"S)
1267
1268 Testing listgeo ../test/data/polar_stereographic_variant_b.tif
1269 Geotiff_Information:
1270 Version: 1
1271 Key_Revision: 1.0
1272 Tagged_Information:
1273 ModelTiepointTag (2,3):
1274 0 0 0
1275 440720 3751320 0
1276 ModelPixelScaleTag (1,3):
1277 60 60 0
1278 End_Of_Tags.
1279 Keyed_Information:
1280 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1281 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1282 GTCitationGeoKey (Ascii,50): "WGS 84 / Australian Antarctic Polar Stereographic"
1283 GeographicTypeGeoKey (Short,1): GCS_WGS_84
1284 GeogCitationGeoKey (Ascii,7): "WGS 84"
1285 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1286 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1287 GeogInvFlatteningGeoKey (Double,1): 298.257223563
1288 ProjectedCSTypeGeoKey (Short,1): User-Defined
1289 ProjectionGeoKey (Short,1): User-Defined
1290 ProjCoordTransGeoKey (Short,1): CT_PolarStereographic
1291 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1292 ProjNatOriginLatGeoKey (Double,1): -71
1293 ProjFalseEastingGeoKey (Double,1): 6000000
1294 ProjFalseNorthingGeoKey (Double,1): 6000000
1295 ProjScaleAtNatOriginGeoKey (Double,1): 1
1296 ProjStraightVertPoleLongGeoKey (Double,1): 70
1297 End_Of_Keys.
1298 End_Of_Geotiff.
1299
1300 Projection Method: CT_PolarStereographic
1301 ProjNatOriginLatGeoKey: -71.000000 ( 71d 0' 0.00"S)
1302 ProjStraightVertPoleLongGeoKey: 70.000000 ( 70d 0' 0.00"E)
1303 ProjScaleAtNatOriginGeoKey: 1.000000
1304 ProjFalseEastingGeoKey: 6000000.000000 m
1305 ProjFalseNorthingGeoKey: 6000000.000000 m
1306 GCS: 4326/WGS 84
1307 Datum: 6326/World Geodetic System 1984
1308 Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
1309 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1310 Projection Linear Units: 9001/metre (1.000000m)
1311
1312 Corner Coordinates:
1313 Upper Left ( 440720.000, 3751320.000) ( 42d 1'22.44"W, 38d27' 1.75"S)
1314 Lower Left ( 440720.000, 3751260.000) ( 42d 1'24.35"W, 38d27' 1.15"S)
1315 Upper Right ( 440780.000, 3751320.000) ( 42d 1'23.21"W, 38d27' 3.26"S)
1316 Lower Right ( 440780.000, 3751260.000) ( 42d 1'25.13"W, 38d27' 2.65"S)
1317 Center ( 440750.000, 3751290.000) ( 42d 1'23.78"W, 38d27' 2.20"S)
1318
1319 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_3814_transverse_mercator.tif
1320 Geotiff_Information:
1321 Version: 1
1322 Key_Revision: 1.0
1323 Tagged_Information:
1324 ModelTiepointTag (2,3):
1325 0 0 0
1326 440720 3751320 0
1327 ModelPixelScaleTag (1,3):
1328 60 60 0
1329 End_Of_Tags.
1330 Keyed_Information:
1331 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1332 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1333 ProjectedCSTypeGeoKey (Short,1): Code-3814 (NAD83 / Mississippi TM)
1334 End_Of_Keys.
1335 End_Of_Geotiff.
1336
1337 PCS = 3814 (NAD83 / Mississippi TM)
1338 Projection = 3813 (Mississippi Transverse Mercator)
1339 Projection Method: CT_TransverseMercator
1340 ProjNatOriginLatGeoKey: 32.500000 ( 32d30' 0.00"N)
1341 ProjNatOriginLongGeoKey: -89.750000 ( 89d45' 0.00"W)
1342 ProjScaleAtNatOriginGeoKey: 0.999834
1343 ProjFalseEastingGeoKey: 500000.000000 m
1344 ProjFalseNorthingGeoKey: 1300000.000000 m
1345 GCS: 4269/NAD83
1346 Datum: 6269/North American Datum 1983
1347 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1348 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1349 Projection Linear Units: 9001/metre (1.000000m)
1350
1351 Corner Coordinates:
1352 Upper Left ( 440720.000, 3751320.000) ( 90d39'59.68"W, 54d33'48.58"N)
1353 Lower Left ( 440720.000, 3751260.000) ( 90d39'59.64"W, 54d33'46.64"N)
1354 Upper Right ( 440780.000, 3751320.000) ( 90d39'56.34"W, 54d33'48.60"N)
1355 Lower Right ( 440780.000, 3751260.000) ( 90d39'56.30"W, 54d33'46.66"N)
1356 Center ( 440750.000, 3751290.000) ( 90d39'57.99"W, 54d33'47.62"N)
1357
1358 Testing listgeo ../test/data/transverse_mercator.tif
1359 Geotiff_Information:
1360 Version: 1
1361 Key_Revision: 1.0
1362 Tagged_Information:
1363 ModelTiepointTag (2,3):
1364 0 0 0
1365 440720 3751320 0
1366 ModelPixelScaleTag (1,3):
1367 60 60 0
1368 End_Of_Tags.
1369 Keyed_Information:
1370 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1371 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1372 GTCitationGeoKey (Ascii,23): "NAD83 / Mississippi TM"
1373 GeographicTypeGeoKey (Short,1): GCS_NAD83
1374 GeogCitationGeoKey (Ascii,6): "NAD83"
1375 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1376 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1377 GeogInvFlatteningGeoKey (Double,1): 298.257222101
1378 ProjectedCSTypeGeoKey (Short,1): User-Defined
1379 ProjectionGeoKey (Short,1): User-Defined
1380 ProjCoordTransGeoKey (Short,1): CT_TransverseMercator
1381 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1382 ProjNatOriginLongGeoKey (Double,1): -89.75
1383 ProjNatOriginLatGeoKey (Double,1): 32.5
1384 ProjFalseEastingGeoKey (Double,1): 500000
1385 ProjFalseNorthingGeoKey (Double,1): 1300000
1386 ProjScaleAtNatOriginGeoKey (Double,1): 0.9998335
1387 End_Of_Keys.
1388 End_Of_Geotiff.
1389
1390 Projection Method: CT_TransverseMercator
1391 ProjNatOriginLatGeoKey: 32.500000 ( 32d30' 0.00"N)
1392 ProjNatOriginLongGeoKey: -89.750000 ( 89d45' 0.00"W)
1393 ProjScaleAtNatOriginGeoKey: 0.999834
1394 ProjFalseEastingGeoKey: 500000.000000 m
1395 ProjFalseNorthingGeoKey: 1300000.000000 m
1396 GCS: 4269/NAD83
1397 Datum: 6269/North American Datum 1983
1398 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1399 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1400 Projection Linear Units: 9001/metre (1.000000m)
1401
1402 Corner Coordinates:
1403 Upper Left ( 440720.000, 3751320.000) ( 90d39'59.68"W, 54d33'48.58"N)
1404 Lower Left ( 440720.000, 3751260.000) ( 90d39'59.64"W, 54d33'46.64"N)
1405 Upper Right ( 440780.000, 3751320.000) ( 90d39'56.34"W, 54d33'48.60"N)
1406 Lower Right ( 440780.000, 3751260.000) ( 90d39'56.30"W, 54d33'46.66"N)
1407 Center ( 440750.000, 3751290.000) ( 90d39'57.99"W, 54d33'47.62"N)
1408
1409 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_2046_transverse_mercator_south_oriented.tif
1410 Geotiff_Information:
1411 Version: 1
1412 Key_Revision: 1.0
1413 Tagged_Information:
1414 ModelTiepointTag (2,3):
1415 0 0 0
1416 440720 3751320 0
1417 ModelPixelScaleTag (1,3):
1418 60 60 0
1419 End_Of_Tags.
1420 Keyed_Information:
1421 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1422 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1423 ProjectedCSTypeGeoKey (Short,1): Code-2046 (Hartebeesthoek94 / Lo15)
1424 End_Of_Keys.
1425 End_Of_Geotiff.
1426
1427 PCS = 2046 (Hartebeesthoek94 / Lo15)
1428 Projection = 17515 (South African Survey Grid zone 15)
1429 Projection Method: CT_TransvMercator_SouthOrientated
1430 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
1431 ProjNatOriginLongGeoKey: 15.000000 ( 14d60' 0.00"E)
1432 ProjScaleAtNatOriginGeoKey: 1.000000
1433 ProjFalseEastingGeoKey: 0.000000 m
1434 ProjFalseNorthingGeoKey: 0.000000 m
1435 GCS: 4148/Hartebeesthoek94
1436 Datum: 6148/Hartebeesthoek94
1437 Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
1438 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1439 Projection Linear Units: 9001/metre (1.000000m)
1440
1441 Corner Coordinates:
1442 Upper Left ( 440720.000, 3751320.000)
1443 Lower Left ( 440720.000, 3751260.000)
1444 Upper Right ( 440780.000, 3751320.000)
1445 Lower Right ( 440780.000, 3751260.000)
1446 Center ( 440750.000, 3751290.000)
1447
1448 Testing listgeo ../test/data/transverse_mercator_south_oriented.tif
1449 Geotiff_Information:
1450 Version: 1
1451 Key_Revision: 1.0
1452 Tagged_Information:
1453 ModelTiepointTag (2,3):
1454 0 0 0
1455 440720 3751320 0
1456 ModelPixelScaleTag (1,3):
1457 60 60 0
1458 End_Of_Tags.
1459 Keyed_Information:
1460 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1461 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1462 GTCitationGeoKey (Ascii,24): "Hartebeesthoek94 / Lo15"
1463 GeographicTypeGeoKey (Short,1): Code-4148 (Hartebeesthoek94)
1464 GeogCitationGeoKey (Ascii,17): "Hartebeesthoek94"
1465 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1466 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1467 GeogInvFlatteningGeoKey (Double,1): 298.257223563
1468 ProjectedCSTypeGeoKey (Short,1): User-Defined
1469 ProjectionGeoKey (Short,1): User-Defined
1470 ProjCoordTransGeoKey (Short,1): CT_TransvMercator_SouthOrientated
1471 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1472 ProjNatOriginLongGeoKey (Double,1): 15
1473 ProjNatOriginLatGeoKey (Double,1): 0
1474 ProjFalseEastingGeoKey (Double,1): 0
1475 ProjFalseNorthingGeoKey (Double,1): 0
1476 ProjScaleAtNatOriginGeoKey (Double,1): 1
1477 End_Of_Keys.
1478 End_Of_Geotiff.
1479
1480 Projection Method: CT_TransvMercator_SouthOrientated
1481 ProjNatOriginLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
1482 ProjNatOriginLongGeoKey: 15.000000 ( 15d 0' 0.00"E)
1483 ProjScaleAtNatOriginGeoKey: 1.000000
1484 ProjFalseEastingGeoKey: 0.000000 m
1485 ProjFalseNorthingGeoKey: 0.000000 m
1486 GCS: 4148/Hartebeesthoek94
1487 Datum: 6148/Hartebeesthoek94
1488 Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
1489 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1490 Projection Linear Units: 9001/metre (1.000000m)
1491
1492 Corner Coordinates:
1493 Upper Left ( 440720.000, 3751320.000)
1494 Lower Left ( 440720.000, 3751260.000)
1495 Upper Right ( 440780.000, 3751320.000)
1496 Lower Right ( 440780.000, 3751260.000)
1497 Center ( 440750.000, 3751290.000)
1498
1499 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_3812_lcc2sp.tif
1500 Geotiff_Information:
1501 Version: 1
1502 Key_Revision: 1.0
1503 Tagged_Information:
1504 ModelTiepointTag (2,3):
1505 0 0 0
1506 440720 3751320 0
1507 ModelPixelScaleTag (1,3):
1508 60 60 0
1509 End_Of_Tags.
1510 Keyed_Information:
1511 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1512 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1513 ProjectedCSTypeGeoKey (Short,1): Code-3812 (ETRS89 / Belgian Lambert 2008)
1514 End_Of_Keys.
1515 End_Of_Geotiff.
1516
1517 PCS = 3812 (ETRS89 / Belgian Lambert 2008)
1518 Projection = 3811 (Belgian Lambert 2008)
1519 Projection Method: CT_LambertConfConic_2SP
1520 ProjFalseOriginLatGeoKey: 50.797815 ( 50d47'52.13"N)
1521 ProjFalseOriginLongGeoKey: 4.359216 ( 4d21'33.18"E)
1522 ProjStdParallel1GeoKey: 49.833333 ( 49d50' 0.00"N)
1523 ProjStdParallel2GeoKey: 51.166667 ( 51d10' 0.00"N)
1524 ProjFalseEastingGeoKey: 649328.000000 m
1525 ProjFalseNorthingGeoKey: 665262.000000 m
1526 GCS: 4258/ETRS89
1527 Datum: 6258/European Terrestrial Reference System 1989
1528 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1529 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1530 Projection Linear Units: 9001/metre (1.000000m)
1531
1532 Corner Coordinates:
1533 Upper Left ( 440720.000, 3751320.000) ( 2d49'38.80"W, 77d 7'27.62"N)
1534 Lower Left ( 440720.000, 3751260.000) ( 2d49'38.09"W, 77d 7'25.97"N)
1535 Upper Right ( 440780.000, 3751320.000) ( 2d49'31.41"W, 77d 7'27.78"N)
1536 Lower Right ( 440780.000, 3751260.000) ( 2d49'30.69"W, 77d 7'26.13"N)
1537 Center ( 440750.000, 3751290.000) ( 2d49'34.75"W, 77d 7'26.87"N)
1538
1539 Testing listgeo ../test/data/lcc2sp.tif
1540 Geotiff_Information:
1541 Version: 1
1542 Key_Revision: 1.0
1543 Tagged_Information:
1544 ModelTiepointTag (2,3):
1545 0 0 0
1546 440720 3751320 0
1547 ModelPixelScaleTag (1,3):
1548 60 60 0
1549 End_Of_Tags.
1550 Keyed_Information:
1551 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1552 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1553 GTCitationGeoKey (Ascii,30): "ETRS89 / Belgian Lambert 2008"
1554 GeographicTypeGeoKey (Short,1): GCS_EUREF89
1555 GeogCitationGeoKey (Ascii,7): "ETRS89"
1556 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1557 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1558 GeogInvFlatteningGeoKey (Double,1): 298.257222101
1559 ProjectedCSTypeGeoKey (Short,1): User-Defined
1560 ProjectionGeoKey (Short,1): User-Defined
1561 ProjCoordTransGeoKey (Short,1): CT_LambertConfConic_2SP
1562 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1563 ProjStdParallel1GeoKey (Double,1): 49.8333333333333
1564 ProjStdParallel2GeoKey (Double,1): 51.1666666666667
1565 ProjFalseOriginLongGeoKey (Double,1): 4.35921583333333
1566 ProjFalseOriginLatGeoKey (Double,1): 50.797815
1567 ProjFalseOriginEastingGeoKey (Double,1): 649328
1568 ProjFalseOriginNorthingGeoKey (Double,1): 665262
1569 End_Of_Keys.
1570 End_Of_Geotiff.
1571
1572 Projection Method: CT_LambertConfConic_2SP
1573 ProjFalseOriginLatGeoKey: 50.797815 ( 50d47'52.13"N)
1574 ProjFalseOriginLongGeoKey: 4.359216 ( 4d21'33.18"E)
1575 ProjStdParallel1GeoKey: 49.833333 ( 49d50' 0.00"N)
1576 ProjStdParallel2GeoKey: 51.166667 ( 51d10' 0.00"N)
1577 ProjFalseEastingGeoKey: 649328.000000 m
1578 ProjFalseNorthingGeoKey: 665262.000000 m
1579 GCS: 4258/ETRS89
1580 Datum: 6258/European Terrestrial Reference System 1989
1581 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1582 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1583 Projection Linear Units: 9001/metre (1.000000m)
1584
1585 Corner Coordinates:
1586 Upper Left ( 440720.000, 3751320.000) ( 2d49'38.80"W, 77d 7'27.62"N)
1587 Lower Left ( 440720.000, 3751260.000) ( 2d49'38.09"W, 77d 7'25.97"N)
1588 Upper Right ( 440780.000, 3751320.000) ( 2d49'31.41"W, 77d 7'27.78"N)
1589 Lower Right ( 440780.000, 3751260.000) ( 2d49'30.69"W, 77d 7'26.13"N)
1590 Center ( 440750.000, 3751290.000) ( 2d49'34.75"W, 77d 7'26.87"N)
1591
1592 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_3083_albers_equal_area.tif
1593 Geotiff_Information:
1594 Version: 1
1595 Key_Revision: 1.0
1596 Tagged_Information:
1597 ModelTiepointTag (2,3):
1598 0 0 0
1599 440720 3751320 0
1600 ModelPixelScaleTag (1,3):
1601 60 60 0
1602 End_Of_Tags.
1603 Keyed_Information:
1604 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1605 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1606 ProjectedCSTypeGeoKey (Short,1): Code-3083 (NAD83 / Texas Centric Albers Equal Area)
1607 End_Of_Keys.
1608 End_Of_Geotiff.
1609
1610 PCS = 3083 (NAD83 / Texas Centric Albers Equal Area)
1611 Projection = 14254 (Texas Centric Albers Equal Area)
1612 Projection Method: CT_AlbersEqualArea
1613 ProjStdParallel1GeoKey: 27.500000 ( 27d30' 0.00"N)
1614 ProjStdParallel2GeoKey: 35.000000 ( 35d 0' 0.00"N)
1615 ProjNatOriginLatGeoKey: 18.000000 ( 18d 0' 0.00"N)
1616 ProjNatOriginLongGeoKey: -100.000000 (100d 0' 0.00"W)
1617 ProjFalseEastingGeoKey: 1500000.000000 m
1618 ProjFalseNorthingGeoKey: 6000000.000000 m
1619 GCS: 4269/NAD83
1620 Datum: 6269/North American Datum 1983
1621 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1622 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1623 Projection Linear Units: 9001/metre (1.000000m)
1624
1625 Corner Coordinates:
1626 Upper Left ( 440720.000, 3751320.000) (108d13'30.29"W, 4d19'52.00"S)
1627 Lower Left ( 440720.000, 3751260.000) (108d13'30.16"W, 4d19'54.26"S)
1628 Upper Right ( 440780.000, 3751320.000) (108d13'28.61"W, 4d19'51.83"S)
1629 Lower Right ( 440780.000, 3751260.000) (108d13'28.49"W, 4d19'54.09"S)
1630 Center ( 440750.000, 3751290.000) (108d13'29.39"W, 4d19'53.05"S)
1631
1632 Testing listgeo ../test/data/albers_equal_area.tif
1633 Geotiff_Information:
1634 Version: 1
1635 Key_Revision: 1.0
1636 Tagged_Information:
1637 ModelTiepointTag (2,3):
1638 0 0 0
1639 440720 3751320 0
1640 ModelPixelScaleTag (1,3):
1641 60 60 0
1642 End_Of_Tags.
1643 Keyed_Information:
1644 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1645 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1646 GTCitationGeoKey (Ascii,40): "NAD83 / Texas Centric Albers Equal Area"
1647 GeographicTypeGeoKey (Short,1): GCS_NAD83
1648 GeogCitationGeoKey (Ascii,6): "NAD83"
1649 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1650 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1651 GeogInvFlatteningGeoKey (Double,1): 298.257222101
1652 ProjectedCSTypeGeoKey (Short,1): User-Defined
1653 ProjectionGeoKey (Short,1): User-Defined
1654 ProjCoordTransGeoKey (Short,1): CT_AlbersEqualArea
1655 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1656 ProjStdParallel1GeoKey (Double,1): 27.5
1657 ProjStdParallel2GeoKey (Double,1): 35
1658 ProjNatOriginLongGeoKey (Double,1): -100
1659 ProjNatOriginLatGeoKey (Double,1): 18
1660 ProjFalseEastingGeoKey (Double,1): 1500000
1661 ProjFalseNorthingGeoKey (Double,1): 6000000
1662 End_Of_Keys.
1663 End_Of_Geotiff.
1664
1665 Projection Method: CT_AlbersEqualArea
1666 ProjStdParallel1GeoKey: 27.500000 ( 27d30' 0.00"N)
1667 ProjStdParallel2GeoKey: 35.000000 ( 35d 0' 0.00"N)
1668 ProjNatOriginLatGeoKey: 18.000000 ( 18d 0' 0.00"N)
1669 ProjNatOriginLongGeoKey: -100.000000 (100d 0' 0.00"W)
1670 ProjFalseEastingGeoKey: 1500000.000000 m
1671 ProjFalseNorthingGeoKey: 6000000.000000 m
1672 GCS: 4269/NAD83
1673 Datum: 6269/North American Datum 1983
1674 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1675 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1676 Projection Linear Units: 9001/metre (1.000000m)
1677
1678 Corner Coordinates:
1679 Upper Left ( 440720.000, 3751320.000) (108d13'30.29"W, 4d19'52.00"S)
1680 Lower Left ( 440720.000, 3751260.000) (108d13'30.16"W, 4d19'54.26"S)
1681 Upper Right ( 440780.000, 3751320.000) (108d13'28.61"W, 4d19'51.83"S)
1682 Lower Right ( 440780.000, 3751260.000) (108d13'28.49"W, 4d19'54.09"S)
1683 Center ( 440750.000, 3751290.000) (108d13'29.39"W, 4d19'53.05"S)
1684
1685 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_3035_lambert_azimuthal_equal_area.tif
1686 Geotiff_Information:
1687 Version: 1
1688 Key_Revision: 1.0
1689 Tagged_Information:
1690 ModelTiepointTag (2,3):
1691 0 0 0
1692 440720 3751320 0
1693 ModelPixelScaleTag (1,3):
1694 60 60 0
1695 End_Of_Tags.
1696 Keyed_Information:
1697 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1698 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1699 ProjectedCSTypeGeoKey (Short,1): Code-3035 (ETRS89 / LAEA Europe)
1700 End_Of_Keys.
1701 End_Of_Geotiff.
1702
1703 PCS = 3035 (ETRS89 / LAEA Europe)
1704 Projection = 19986 (Europe Equal Area 2001)
1705 Projection Method: CT_LambertAzimEqualArea
1706 ProjCenterLatGeoKey: 52.000000 ( 52d 0' 0.00"N)
1707 ProjCenterLongGeoKey: 10.000000 ( 10d 0' 0.00"E)
1708 ProjFalseEastingGeoKey: 4321000.000000 m
1709 ProjFalseNorthingGeoKey: 3210000.000000 m
1710 GCS: 4258/ETRS89
1711 Datum: 6258/European Terrestrial Reference System 1989
1712 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1713 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1714 Projection Linear Units: 9001/metre (1.000000m)
1715
1716 Corner Coordinates:
1717 Upper Left ( 440720.000, 3751320.000) ( 42d57'55.53"W, 43d35'56.15"N)
1718 Lower Left ( 440720.000, 3751260.000) ( 42d57'53.84"W, 43d35'54.75"N)
1719 Upper Right ( 440780.000, 3751320.000) ( 42d57'53.38"W, 43d35'57.45"N)
1720 Lower Right ( 440780.000, 3751260.000) ( 42d57'51.69"W, 43d35'56.06"N)
1721 Center ( 440750.000, 3751290.000) ( 42d57'53.61"W, 43d35'56.10"N)
1722
1723 Testing listgeo ../test/data/lambert_azimuthal_equal_area.tif
1724 Geotiff_Information:
1725 Version: 1
1726 Key_Revision: 1.0
1727 Tagged_Information:
1728 ModelTiepointTag (2,3):
1729 0 0 0
1730 440720 3751320 0
1731 ModelPixelScaleTag (1,3):
1732 60 60 0
1733 End_Of_Tags.
1734 Keyed_Information:
1735 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1736 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1737 GTCitationGeoKey (Ascii,21): "ETRS89 / LAEA Europe"
1738 GeographicTypeGeoKey (Short,1): GCS_EUREF89
1739 GeogCitationGeoKey (Ascii,7): "ETRS89"
1740 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1741 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1742 GeogInvFlatteningGeoKey (Double,1): 298.257222101
1743 ProjectedCSTypeGeoKey (Short,1): User-Defined
1744 ProjectionGeoKey (Short,1): User-Defined
1745 ProjCoordTransGeoKey (Short,1): CT_LambertAzimEqualArea
1746 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1747 ProjFalseEastingGeoKey (Double,1): 4321000
1748 ProjFalseNorthingGeoKey (Double,1): 3210000
1749 ProjCenterLongGeoKey (Double,1): 10
1750 ProjCenterLatGeoKey (Double,1): 52
1751 End_Of_Keys.
1752 End_Of_Geotiff.
1753
1754 Projection Method: CT_LambertAzimEqualArea
1755 ProjCenterLatGeoKey: 52.000000 ( 52d 0' 0.00"N)
1756 ProjCenterLongGeoKey: 10.000000 ( 10d 0' 0.00"E)
1757 ProjFalseEastingGeoKey: 4321000.000000 m
1758 ProjFalseNorthingGeoKey: 3210000.000000 m
1759 GCS: 4258/ETRS89
1760 Datum: 6258/European Terrestrial Reference System 1989
1761 Ellipsoid: 7019/GRS 1980 (6378137.00,6356752.31)
1762 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1763 Projection Linear Units: 9001/metre (1.000000m)
1764
1765 Corner Coordinates:
1766 Upper Left ( 440720.000, 3751320.000) ( 42d57'55.53"W, 43d35'56.15"N)
1767 Lower Left ( 440720.000, 3751260.000) ( 42d57'53.84"W, 43d35'54.75"N)
1768 Upper Right ( 440780.000, 3751320.000) ( 42d57'53.38"W, 43d35'57.45"N)
1769 Lower Right ( 440780.000, 3751260.000) ( 42d57'51.69"W, 43d35'56.06"N)
1770 Center ( 440750.000, 3751290.000) ( 42d57'53.61"W, 43d35'56.10"N)
1771
1772 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_3410_lambert_cylindrical_equal_area.tif
1773 Geotiff_Information:
1774 Version: 1
1775 Key_Revision: 1.0
1776 Tagged_Information:
1777 ModelTiepointTag (2,3):
1778 0 0 0
1779 440720 3751320 0
1780 ModelPixelScaleTag (1,3):
1781 60 60 0
1782 End_Of_Tags.
1783 Keyed_Information:
1784 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1785 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1786 ProjectedCSTypeGeoKey (Short,1): Code-3410 (NSIDC EASE-Grid Global)
1787 End_Of_Keys.
1788 End_Of_Geotiff.
1789
1790 PCS = 3410 (NSIDC EASE-Grid Global)
1791 Projection = 19869 (US NSIDC Equal Area global projection)
1792 Projection Method: CT_CylindricalEqualArea
1793 ProjStdParallel1GeoKey: 30.000000 ( 29d60' 0.00"N)
1794 ProjNatOriginLongGeoKey: 0.000000 ( 0d 0' 0.00"E)
1795 ProjFalseEastingGeoKey: 0.000000 m
1796 ProjFalseNorthingGeoKey: 0.000000 m
1797 GCS: 4053/Unspecified datum based upon the International 1924 Authalic Sphere
1798 Datum: 6053/Not specified (based on International 1924 Authalic Sphere)
1799 Ellipsoid: 7057/International 1924 Authalic Sphere (6371228.00,6371228.00)
1800 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1801 Projection Linear Units: 9001/metre (1.000000m)
1802
1803 Corner Coordinates:
1804 Upper Left ( 440720.000, 3751320.000) ( 4d34'35.33"E, 30d39'27.66"N)
1805 Lower Left ( 440720.000, 3751260.000) ( 4d34'35.33"E, 30d39'25.71"N)
1806 Upper Right ( 440780.000, 3751320.000) ( 4d34'37.57"E, 30d39'27.66"N)
1807 Lower Right ( 440780.000, 3751260.000) ( 4d34'37.57"E, 30d39'25.71"N)
1808 Center ( 440750.000, 3751290.000) ( 4d34'36.45"E, 30d39'26.68"N)
1809
1810 Testing listgeo ../test/data/lambert_cylindrical_equal_area.tif
1811 Geotiff_Information:
1812 Version: 1
1813 Key_Revision: 1.0
1814 Tagged_Information:
1815 ModelTiepointTag (2,3):
1816 0 0 0
1817 440720 3751320 0
1818 ModelPixelScaleTag (1,3):
1819 60 60 0
1820 End_Of_Tags.
1821 Keyed_Information:
1822 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1823 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1824 GTCitationGeoKey (Ascii,23): "NSIDC EASE-Grid Global"
1825 GeographicTypeGeoKey (Short,1): Code-4053 (Unspecified datum based upon the International 1924 Authalic Sphere)
1826 GeogCitationGeoKey (Ascii,68): "Unspecified datum based upon the International 1924 Authalic Sphere"
1827 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1828 GeogSemiMajorAxisGeoKey (Double,1): 6371228
1829 ProjectedCSTypeGeoKey (Short,1): User-Defined
1830 ProjectionGeoKey (Short,1): User-Defined
1831 ProjCoordTransGeoKey (Short,1): CT_CylindricalEqualArea
1832 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1833 ProjStdParallel1GeoKey (Double,1): 30
1834 ProjNatOriginLongGeoKey (Double,1): 0
1835 ProjFalseEastingGeoKey (Double,1): 0
1836 ProjFalseNorthingGeoKey (Double,1): 0
1837 End_Of_Keys.
1838 End_Of_Geotiff.
1839
1840 Projection Method: CT_CylindricalEqualArea
1841 ProjStdParallel1GeoKey: 30.000000 ( 30d 0' 0.00"N)
1842 ProjNatOriginLongGeoKey: 0.000000 ( 0d 0' 0.00"E)
1843 ProjFalseEastingGeoKey: 0.000000 m
1844 ProjFalseNorthingGeoKey: 0.000000 m
1845 GCS: 4053/Unspecified datum based upon the International 1924 Authalic Sphere
1846 Datum: 6053/Not specified (based on International 1924 Authalic Sphere)
1847 Ellipsoid: 7057/International 1924 Authalic Sphere (6371228.00,6371228.00)
1848 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1849 Projection Linear Units: 9001/metre (1.000000m)
1850
1851 Corner Coordinates:
1852 Upper Left ( 440720.000, 3751320.000) ( 4d34'35.33"E, 30d39'27.66"N)
1853 Lower Left ( 440720.000, 3751260.000) ( 4d34'35.33"E, 30d39'25.71"N)
1854 Upper Right ( 440780.000, 3751320.000) ( 4d34'37.57"E, 30d39'27.66"N)
1855 Lower Right ( 440780.000, 3751260.000) ( 4d34'37.57"E, 30d39'25.71"N)
1856 Center ( 440750.000, 3751290.000) ( 4d34'36.45"E, 30d39'26.68"N)
1857
1858 Testing listgeo ../test/data/ProjectedCSTypeGeoKey_4087_equidistant_cylindrical.tif
1859 Geotiff_Information:
1860 Version: 1
1861 Key_Revision: 1.0
1862 Tagged_Information:
1863 ModelTiepointTag (2,3):
1864 0 0 0
1865 440720 3751320 0
1866 ModelPixelScaleTag (1,3):
1867 60 60 0
1868 End_Of_Tags.
1869 Keyed_Information:
1870 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1871 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1872 ProjectedCSTypeGeoKey (Short,1): Code-4087 (WGS 84 / World Equidistant Cylindrical)
1873 End_Of_Keys.
1874 End_Of_Geotiff.
1875
1876 PCS = 4087 (WGS 84 / World Equidistant Cylindrical)
1877 Projection = 4085 (World Equidistant Cylindrical)
1878 Projection Method: CT_Equirectangular
1879 ProjCenterLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
1880 ProjCenterLongGeoKey: 0.000000 ( 0d 0' 0.00"E)
1881 ProjStdParallel1GeoKey: 0.000000 ( 0d 0' 0.00"N)
1882 ProjFalseEastingGeoKey: 0.000000 m
1883 ProjFalseNorthingGeoKey: 0.000000 m
1884 GCS: 4326/WGS 84
1885 Datum: 6326/World Geodetic System 1984
1886 Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
1887 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1888 Projection Linear Units: 9001/metre (1.000000m)
1889
1890 Corner Coordinates:
1891 Upper Left ( 440720.000, 3751320.000) ( 3d57'32.60"E, 33d41'55.25"N)
1892 Lower Left ( 440720.000, 3751260.000) ( 3d57'32.60"E, 33d41'53.31"N)
1893 Upper Right ( 440780.000, 3751320.000) ( 3d57'34.54"E, 33d41'55.25"N)
1894 Lower Right ( 440780.000, 3751260.000) ( 3d57'34.54"E, 33d41'53.31"N)
1895 Center ( 440750.000, 3751290.000) ( 3d57'33.57"E, 33d41'54.28"N)
1896
1897 Testing listgeo ../test/data/equidistant_cylindrical.tif
1898 Geotiff_Information:
1899 Version: 1
1900 Key_Revision: 1.0
1901 Tagged_Information:
1902 ModelTiepointTag (2,3):
1903 0 0 0
1904 440720 3751320 0
1905 ModelPixelScaleTag (1,3):
1906 60 60 0
1907 End_Of_Tags.
1908 Keyed_Information:
1909 GTModelTypeGeoKey (Short,1): ModelTypeProjected
1910 GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
1911 GTCitationGeoKey (Ascii,39): "WGS 84 / World Equidistant Cylindrical"
1912 GeographicTypeGeoKey (Short,1): GCS_WGS_84
1913 GeogCitationGeoKey (Ascii,7): "WGS 84"
1914 GeogAngularUnitsGeoKey (Short,1): Angular_Degree
1915 GeogSemiMajorAxisGeoKey (Double,1): 6378137
1916 GeogInvFlatteningGeoKey (Double,1): 298.257223563
1917 ProjectedCSTypeGeoKey (Short,1): User-Defined
1918 ProjectionGeoKey (Short,1): User-Defined
1919 ProjCoordTransGeoKey (Short,1): CT_Equirectangular
1920 ProjLinearUnitsGeoKey (Short,1): Linear_Meter
1921 ProjStdParallel1GeoKey (Double,1): 0
1922 ProjFalseEastingGeoKey (Double,1): 0
1923 ProjFalseNorthingGeoKey (Double,1): 0
1924 ProjCenterLongGeoKey (Double,1): 0
1925 ProjCenterLatGeoKey (Double,1): 0
1926 End_Of_Keys.
1927 End_Of_Geotiff.
1928
1929 Projection Method: CT_Equirectangular
1930 ProjCenterLatGeoKey: 0.000000 ( 0d 0' 0.00"N)
1931 ProjCenterLongGeoKey: 0.000000 ( 0d 0' 0.00"E)
1932 ProjStdParallel1GeoKey: 0.000000 ( 0d 0' 0.00"N)
1933 ProjFalseEastingGeoKey: 0.000000 m
1934 ProjFalseNorthingGeoKey: 0.000000 m
1935 GCS: 4326/WGS 84
1936 Datum: 6326/World Geodetic System 1984
1937 Ellipsoid: 7030/WGS 84 (6378137.00,6356752.31)
1938 Prime Meridian: 8901/Greenwich (0.000000/ 0d 0' 0.00"E)
1939 Projection Linear Units: 9001/metre (1.000000m)
1940
1941 Corner Coordinates:
1942 Upper Left ( 440720.000, 3751320.000) ( 3d57'32.60"E, 33d41'55.25"N)
1943 Lower Left ( 440720.000, 3751260.000) ( 3d57'32.60"E, 33d41'53.31"N)
1944 Upper Right ( 440780.000, 3751320.000) ( 3d57'34.54"E, 33d41'55.25"N)
1945 Lower Right ( 440780.000, 3751260.000) ( 3d57'34.54"E, 33d41'53.31"N)
1946 Center ( 440750.000, 3751290.000) ( 3d57'33.57"E, 33d41'54.28"N)
1947