File: README

package info (click to toggle)
libgeotiff 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,300 kB
  • sloc: ansic: 8,080; sh: 3,977; makefile: 166
file content (157 lines) | stat: -rw-r--r-- 4,739 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
About LIBGEOTIFF:
-----------------

This library is designed to permit the extraction and parsing of the
"GeoTIFF" Key directories, as well as definition and installation
of GeoTIFF keys in new files. For more information about GeoTIFF
specifications, projection codes and use, see the WWW web page at:

   http://geotiff.osgeo.org/

or the download archive at:

   http://download.osgeo.org/geotiff/


Use of LIBTIFF
--------------

The default configuration assumes that the public-domain LIBTIFF
package for reading and writing TIFF files has been installed, with
the development kit (include files).  The latest version of libtiff may 
be found at:

   http://www.simplesystems.org/libtiff/

For this build to work you must use libtiff version v3.6.0 alpha or newer.

Use of PROJ
-----------

PROJ 6 or later is a required dependency of libgeotiff 1.5 or later.
The latest version of PROJ can be found at

    https://proj4.org/


Building LIBGEOTIFF:
--------------------

Assuming that whatever TIFF library you use has been built, and installed
may now build the rest of the geotiff library with:

   % cd libgeotiff
   % ./configure --with-proj=/contrib/proj-6
   % make 

Common Configuration Issues:

 o If you want to alter the compiler used, set the CC environment variable
   before running configure.  

   % setenv CC cc
   % rm config.status
   % ./configure
   % make clean 
   % make 

 o If you want to control the compiler files, set the CFLAGS environment 
   variable.  This can be used to override the default optimization/debug
   flags for instance.

   % setenv CFLAGS -O4
   % rm config.status
   % ./configure
   % make clean 
   % make

 o If you want to force use of a locally built libtiff that was never 
   "installed" you can point to the directory like this:

   % rm config.status
   % ./configure --with-libtiff=/u/contrib/libtiff-3.6.0/libtiff
   % make clean 
   % make

 o If you have installed libtiff in a location other than /usr, then you can
   point to the install tree like this:

   % rm config.status
   % ./configure --with-libtiff=/usr/local
   % make clean 
   % make

 o The logic to build shared libraries is pretty weak, and is likely to
   only work on systems with the GNU tool chain (gcc, and ld) installed. 
   On other systems you can try hacking on Makefile after running configure.
   It may be necessary to set the GEOTIFF_SO macro to "libgeotiff.1.2.x"
   as it is made empty by default on systems configure doesn't think can 
   build shared libraries.


Test Programs:

There are two demonstration test programs "makegeo" and "listgeo"
that create and list-out the GeoTIFF tags and keys associated 
with a small TIFF file, as well as a full-featured utility called
"geotifcp". These will all be built in the bin/ directory as a matter of 
course, though may require modification if you are not using LIBTIFF, as they
make explicit calls to LIBTIFF for opening the files and setting the
tags. To run them simply call:

  % bin/makegeo
  % bin/listgeo newgeo.tif

to generate and list an example GeoTIFF file. To see the
"geotifcp" utility in action, first call:

  %  bin/listgeo newgeo.tif > metadata.txt
 
to create a GeoTIFF metadata file "metadata.txt", and then

  %  bin/geotifcp  -g  metadata.txt  newgeo.tif  newer.tif
 
to copy the TIFF file newgeo.tif to newer.tif, using the
GeoTIFF metadata as stored in "metadata.txt". See "docs/manual.txt"
for further uses of geotifcp.

To convert a projection metafile, an ESRI world file, and a raw TIFF file
into a GeoTIFF file do something like the following:

  % bin/tiffcp -g metadata.txt -e abc.tfw abc.tif geo_abc.tif


 
Non-Standard Configuration:
---------------------------

If you are using a TIFF software package other than libtiff, then you
must override the TIFF file methods used in LIBGEOTIFF. To do this, 
go into directory libgeotiff and edit the files:

    "geo_tiffp.h"
    "geo_tiffp.c"
    
which contain all of the TIFF externals. You will need to define your
own versions of the TIFF tag reading, writing, and memory allocation
calls. See the comments of those two files to see what needs to be
changed. Also, whatever software package you use will have to 
recognize the GeoTIFF tags listed in the include files, and permit
variable-length arrays to be passed in to those tags.


Credits
-------

 o This library was originally written by Niles Ritter (also the primary
   author of the GeoTIFF specification).  

 o Eric Brown of Universal Systems, who contributed a bug fix to 
   GTIFPCSToImage().

 o Safe Software (www.safe.com) who supported by upgrade to use the 
   EPSG 6.2.2 database for libgeotiff 1.2.0.

 o Many others who contributed before it occured to me to maintain credits.