@cpp.js/package-geotiff 1.0.0-beta.22 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/cppjs.build.js +2 -0
- package/dist/prebuilt/Android-x86_64/include/cpl_serv.h +258 -0
- package/dist/prebuilt/Android-x86_64/include/epsg_datum.inc +174 -0
- package/dist/prebuilt/Android-x86_64/include/epsg_ellipse.inc +48 -0
- package/dist/prebuilt/Android-x86_64/include/epsg_gcs.inc +193 -0
- package/dist/prebuilt/Android-x86_64/include/epsg_pcs.inc +1012 -0
- package/dist/prebuilt/Android-x86_64/include/epsg_pm.inc +22 -0
- package/dist/prebuilt/Android-x86_64/include/epsg_proj.inc +443 -0
- package/dist/prebuilt/Android-x86_64/include/epsg_units.inc +35 -0
- package/dist/prebuilt/Android-x86_64/include/epsg_vertcs.inc +46 -0
- package/dist/prebuilt/Android-x86_64/include/geo_config.h +10 -0
- package/dist/prebuilt/Android-x86_64/include/geo_ctrans.inc +84 -0
- package/dist/prebuilt/Android-x86_64/include/geo_keyp.h +128 -0
- package/dist/prebuilt/Android-x86_64/include/geo_normalize.h +259 -0
- package/dist/prebuilt/Android-x86_64/include/geo_simpletags.h +73 -0
- package/dist/prebuilt/Android-x86_64/include/geo_tiffp.h +109 -0
- package/dist/prebuilt/Android-x86_64/include/geokeys.h +52 -0
- package/dist/prebuilt/Android-x86_64/include/geokeys.inc +78 -0
- package/dist/prebuilt/Android-x86_64/include/geokeys_v1_1.inc +85 -0
- package/dist/prebuilt/Android-x86_64/include/geonames.h +149 -0
- package/dist/prebuilt/Android-x86_64/include/geotiff.h +177 -0
- package/dist/prebuilt/Android-x86_64/include/geotiffio.h +20 -0
- package/dist/prebuilt/Android-x86_64/include/geovalues.h +115 -0
- package/dist/prebuilt/Android-x86_64/include/xtiffio.h +101 -0
- package/dist/prebuilt/Android-x86_64/lib/libgeotiff.la +41 -0
- package/dist/prebuilt/Android-x86_64/lib/libgeotiff.so +0 -0
- package/dist/prebuilt/Android-x86_64/lib/pkgconfig/libgeotiff.pc +11 -0
- package/dist/prebuilt/Android-x86_64/share/man/man1/applygeo.1 +31 -0
- package/dist/prebuilt/Android-x86_64/share/man/man1/geotifcp.1 +156 -0
- package/dist/prebuilt/Android-x86_64/share/man/man1/listgeo.1 +51 -0
- package/dist/prebuilt/iOS-iphoneos/lib/libgeotiff.a +0 -0
- package/dist/prebuilt/iOS-iphonesimulator/lib/libgeotiff.a +0 -0
- package/geotiff.xcframework/ios-arm64_arm64e/libgeotiff.a +0 -0
- package/geotiff.xcframework/ios-arm64_arm64e_x86_64-simulator/libgeotiff.a +0 -0
- package/package.json +5 -5
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* GeoTIFF GeoKey Database */
|
|
2
|
+
|
|
3
|
+
/* Note: Any changes/additions to this database require */
|
|
4
|
+
/* a change in the revision value in geokeys.h */
|
|
5
|
+
|
|
6
|
+
/* C database for Geotiff include files. */
|
|
7
|
+
/* the macro ValuePair() must be defined */
|
|
8
|
+
/* by the enclosing include file */
|
|
9
|
+
|
|
10
|
+
/* 6.2.1 GeoTIFF Configuration Keys */
|
|
11
|
+
|
|
12
|
+
ValuePair( GTModelTypeGeoKey, 1024) /* Section 6.3.1.1 Codes */
|
|
13
|
+
ValuePair( GTRasterTypeGeoKey, 1025) /* Section 6.3.1.2 Codes */
|
|
14
|
+
ValuePair( GTCitationGeoKey, 1026) /* documentation */
|
|
15
|
+
|
|
16
|
+
/* 6.2.2 Geographic CS Parameter Keys */
|
|
17
|
+
|
|
18
|
+
ValuePair( GeographicTypeGeoKey, 2048) /* Section 6.3.2.1 Codes */
|
|
19
|
+
ValuePair( GeogCitationGeoKey, 2049) /* documentation */
|
|
20
|
+
ValuePair( GeogGeodeticDatumGeoKey, 2050) /* Section 6.3.2.2 Codes */
|
|
21
|
+
ValuePair( GeogPrimeMeridianGeoKey, 2051) /* Section 6.3.2.4 codes */
|
|
22
|
+
ValuePair( GeogLinearUnitsGeoKey, 2052) /* Section 6.3.1.3 Codes */
|
|
23
|
+
ValuePair( GeogLinearUnitSizeGeoKey, 2053) /* meters */
|
|
24
|
+
ValuePair( GeogAngularUnitsGeoKey, 2054) /* Section 6.3.1.4 Codes */
|
|
25
|
+
ValuePair( GeogAngularUnitSizeGeoKey, 2055) /* radians */
|
|
26
|
+
ValuePair( GeogEllipsoidGeoKey, 2056) /* Section 6.3.2.3 Codes */
|
|
27
|
+
ValuePair( GeogSemiMajorAxisGeoKey, 2057) /* GeogLinearUnits */
|
|
28
|
+
ValuePair( GeogSemiMinorAxisGeoKey, 2058) /* GeogLinearUnits */
|
|
29
|
+
ValuePair( GeogInvFlatteningGeoKey, 2059) /* ratio */
|
|
30
|
+
ValuePair( GeogAzimuthUnitsGeoKey, 2060) /* Section 6.3.1.4 Codes */
|
|
31
|
+
ValuePair( GeogPrimeMeridianLongGeoKey, 2061) /* GeoAngularUnit */
|
|
32
|
+
ValuePair( GeogTOWGS84GeoKey, 2062) /* 2011 - proposed addition */
|
|
33
|
+
|
|
34
|
+
/* 6.2.3 Projected CS Parameter Keys */
|
|
35
|
+
/* Several keys have been renamed,*/
|
|
36
|
+
/* and the deprecated names aliased for backward compatibility */
|
|
37
|
+
|
|
38
|
+
ValuePair( ProjectedCSTypeGeoKey, 3072) /* Section 6.3.3.1 codes */
|
|
39
|
+
ValuePair( PCSCitationGeoKey, 3073) /* documentation */
|
|
40
|
+
ValuePair( ProjectionGeoKey, 3074) /* Section 6.3.3.2 codes */
|
|
41
|
+
ValuePair( ProjCoordTransGeoKey, 3075) /* Section 6.3.3.3 codes */
|
|
42
|
+
ValuePair( ProjLinearUnitsGeoKey, 3076) /* Section 6.3.1.3 codes */
|
|
43
|
+
ValuePair( ProjLinearUnitSizeGeoKey, 3077) /* meters */
|
|
44
|
+
ValuePair( ProjStdParallel1GeoKey, 3078) /* GeogAngularUnit */
|
|
45
|
+
ValuePair( ProjStdParallelGeoKey,ProjStdParallel1GeoKey) /* ** alias ** */
|
|
46
|
+
ValuePair( ProjStdParallel2GeoKey, 3079) /* GeogAngularUnit */
|
|
47
|
+
ValuePair( ProjNatOriginLongGeoKey, 3080) /* GeogAngularUnit */
|
|
48
|
+
ValuePair( ProjOriginLongGeoKey,ProjNatOriginLongGeoKey) /* ** alias ** */
|
|
49
|
+
ValuePair( ProjNatOriginLatGeoKey, 3081) /* GeogAngularUnit */
|
|
50
|
+
ValuePair( ProjOriginLatGeoKey,ProjNatOriginLatGeoKey) /* ** alias ** */
|
|
51
|
+
ValuePair( ProjFalseEastingGeoKey, 3082) /* ProjLinearUnits */
|
|
52
|
+
ValuePair( ProjFalseNorthingGeoKey, 3083) /* ProjLinearUnits */
|
|
53
|
+
ValuePair( ProjFalseOriginLongGeoKey, 3084) /* GeogAngularUnit */
|
|
54
|
+
ValuePair( ProjFalseOriginLatGeoKey, 3085) /* GeogAngularUnit */
|
|
55
|
+
ValuePair( ProjFalseOriginEastingGeoKey, 3086) /* ProjLinearUnits */
|
|
56
|
+
ValuePair( ProjFalseOriginNorthingGeoKey, 3087) /* ProjLinearUnits */
|
|
57
|
+
ValuePair( ProjCenterLongGeoKey, 3088) /* GeogAngularUnit */
|
|
58
|
+
ValuePair( ProjCenterLatGeoKey, 3089) /* GeogAngularUnit */
|
|
59
|
+
ValuePair( ProjCenterEastingGeoKey, 3090) /* ProjLinearUnits */
|
|
60
|
+
ValuePair( ProjCenterNorthingGeoKey, 3091) /* ProjLinearUnits */
|
|
61
|
+
ValuePair( ProjScaleAtNatOriginGeoKey, 3092) /* ratio */
|
|
62
|
+
ValuePair( ProjScaleAtOriginGeoKey,ProjScaleAtNatOriginGeoKey) /* ** alias ** */
|
|
63
|
+
ValuePair( ProjScaleAtCenterGeoKey, 3093) /* ratio */
|
|
64
|
+
ValuePair( ProjAzimuthAngleGeoKey, 3094) /* GeogAzimuthUnit */
|
|
65
|
+
ValuePair( ProjStraightVertPoleLongGeoKey, 3095) /* GeogAngularUnit */
|
|
66
|
+
ValuePair( ProjRectifiedGridAngleGeoKey, 3096) /* GeogAngularUnit */
|
|
67
|
+
|
|
68
|
+
/* 6.2.4 Vertical CS Keys */
|
|
69
|
+
|
|
70
|
+
ValuePair( VerticalCSTypeGeoKey, 4096) /* Section 6.3.4.1 codes */
|
|
71
|
+
ValuePair( VerticalCitationGeoKey, 4097) /* documentation */
|
|
72
|
+
ValuePair( VerticalDatumGeoKey, 4098) /* Section 6.3.4.2 codes */
|
|
73
|
+
ValuePair( VerticalUnitsGeoKey, 4099) /* Section 6.3.1 (.x) codes */
|
|
74
|
+
|
|
75
|
+
/* See https://github.com/opengeospatial/geotiff/pull/99 */
|
|
76
|
+
ValuePair( CoordinateEpochGeoKey, 5120) /* GeoKey of type double */
|
|
77
|
+
|
|
78
|
+
/* End of Data base */
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* GeoTIFF GeoKey Database for OGC GeoTIFF v1.1 */
|
|
2
|
+
|
|
3
|
+
/* C database for Geotiff include files. */
|
|
4
|
+
/* the macro ValuePair() must be defined */
|
|
5
|
+
/* by the enclosing include file */
|
|
6
|
+
|
|
7
|
+
/* GeoTIFF Configuration Keys */
|
|
8
|
+
|
|
9
|
+
#ifndef ONLY_GEOTIFF_V1_1_CHANGES
|
|
10
|
+
ValuePair( GTModelTypeGeoKey, 1024)
|
|
11
|
+
ValuePair( GTRasterTypeGeoKey, 1025)
|
|
12
|
+
ValuePair( GTCitationGeoKey, 1026)
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
/* Geodetic CRS Parameter Keys */
|
|
16
|
+
|
|
17
|
+
ValuePair( GeodeticCRSGeoKey, 2048)
|
|
18
|
+
ValuePair( GeodeticCitationGeoKey, 2049)
|
|
19
|
+
ValuePair( GeodeticDatumGeoKey, 2050)
|
|
20
|
+
ValuePair( PrimeMeridianGeoKey, 2051)
|
|
21
|
+
#ifndef ONLY_GEOTIFF_V1_1_CHANGES
|
|
22
|
+
ValuePair( GeogLinearUnitsGeoKey, 2052)
|
|
23
|
+
ValuePair( GeogLinearUnitSizeGeoKey, 2053)
|
|
24
|
+
ValuePair( GeogAngularUnitsGeoKey, 2054)
|
|
25
|
+
ValuePair( GeogAngularUnitSizeGeoKey, 2055)
|
|
26
|
+
#endif
|
|
27
|
+
ValuePair( EllipsoidGeoKey, 2056)
|
|
28
|
+
ValuePair( EllipsoidSemiMajorAxisGeoKey, 2057)
|
|
29
|
+
ValuePair( EllipsoidSemiMinorAxisGeoKey, 2058)
|
|
30
|
+
ValuePair( EllipsoidInvFlatteningGeoKey, 2059)
|
|
31
|
+
#ifndef ONLY_GEOTIFF_V1_1_CHANGES
|
|
32
|
+
ValuePair( GeogAzimuthUnitsGeoKey, 2060)
|
|
33
|
+
#endif
|
|
34
|
+
ValuePair( PrimeMeridianLongitudeGeoKey, 2061)
|
|
35
|
+
|
|
36
|
+
#ifndef ONLY_GEOTIFF_V1_1_CHANGES
|
|
37
|
+
ValuePair( GeogTOWGS84GeoKey, 2062) /* 2011 - proposed addition */
|
|
38
|
+
#endif
|
|
39
|
+
|
|
40
|
+
/* Projected CRS Parameter Keys */
|
|
41
|
+
|
|
42
|
+
ValuePair( ProjectedCRSGeoKey, 3072)
|
|
43
|
+
ValuePair( ProjectedCitationGeoKey, 3073)
|
|
44
|
+
#ifndef ONLY_GEOTIFF_V1_1_CHANGES
|
|
45
|
+
ValuePair( ProjectionGeoKey, 3074)
|
|
46
|
+
#endif
|
|
47
|
+
ValuePair( ProjMethodGeoKey, 3075)
|
|
48
|
+
#ifndef ONLY_GEOTIFF_V1_1_CHANGES
|
|
49
|
+
ValuePair( ProjLinearUnitsGeoKey, 3076)
|
|
50
|
+
ValuePair( ProjLinearUnitSizeGeoKey, 3077)
|
|
51
|
+
ValuePair( ProjStdParallel1GeoKey, 3078)
|
|
52
|
+
ValuePair( ProjStdParallelGeoKey,ProjStdParallel1GeoKey) /* ** alias ** */
|
|
53
|
+
ValuePair( ProjStdParallel2GeoKey, 3079)
|
|
54
|
+
ValuePair( ProjNatOriginLongGeoKey, 3080)
|
|
55
|
+
ValuePair( ProjOriginLongGeoKey,ProjNatOriginLongGeoKey) /* ** alias ** */
|
|
56
|
+
ValuePair( ProjNatOriginLatGeoKey, 3081)
|
|
57
|
+
ValuePair( ProjOriginLatGeoKey,ProjNatOriginLatGeoKey) /* ** alias ** */
|
|
58
|
+
ValuePair( ProjFalseEastingGeoKey, 3082)
|
|
59
|
+
ValuePair( ProjFalseNorthingGeoKey, 3083)
|
|
60
|
+
ValuePair( ProjFalseOriginLongGeoKey, 3084)
|
|
61
|
+
ValuePair( ProjFalseOriginLatGeoKey, 3085)
|
|
62
|
+
ValuePair( ProjFalseOriginEastingGeoKey, 3086)
|
|
63
|
+
ValuePair( ProjFalseOriginNorthingGeoKey, 3087)
|
|
64
|
+
ValuePair( ProjCenterLongGeoKey, 3088)
|
|
65
|
+
ValuePair( ProjCenterLatGeoKey, 3089)
|
|
66
|
+
ValuePair( ProjCenterEastingGeoKey, 3090)
|
|
67
|
+
ValuePair( ProjCenterNorthingGeoKey, 3091)
|
|
68
|
+
ValuePair( ProjScaleAtNatOriginGeoKey, 3092)
|
|
69
|
+
ValuePair( ProjScaleAtOriginGeoKey,ProjScaleAtNatOriginGeoKey) /* ** alias ** */
|
|
70
|
+
ValuePair( ProjScaleAtCenterGeoKey, 3093)
|
|
71
|
+
ValuePair( ProjAzimuthAngleGeoKey, 3094)
|
|
72
|
+
ValuePair( ProjStraightVertPoleLongGeoKey, 3095)
|
|
73
|
+
ValuePair( ProjRectifiedGridAngleGeoKey, 3096)
|
|
74
|
+
#endif
|
|
75
|
+
|
|
76
|
+
/* Vertical CRS Parameter Keys */
|
|
77
|
+
|
|
78
|
+
ValuePair( VerticalGeoKey, 4096)
|
|
79
|
+
#ifndef ONLY_GEOTIFF_V1_1_CHANGES
|
|
80
|
+
ValuePair( VerticalCitationGeoKey, 4097)
|
|
81
|
+
ValuePair( VerticalDatumGeoKey, 4098)
|
|
82
|
+
ValuePair( VerticalUnitsGeoKey, 4099)
|
|
83
|
+
#endif
|
|
84
|
+
|
|
85
|
+
/* End of Data base */
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* geonames.h
|
|
3
|
+
*
|
|
4
|
+
* This encapsulates all of the value-naming mechanism of
|
|
5
|
+
* libgeotiff.
|
|
6
|
+
*
|
|
7
|
+
* Written By: Niles Ritter
|
|
8
|
+
*
|
|
9
|
+
* copyright (c) 1995 Niles D. Ritter
|
|
10
|
+
*
|
|
11
|
+
* Permission granted to use this software, so long as this copyright
|
|
12
|
+
* notice accompanies any products derived therefrom.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
#ifndef LIBGEOTIFF_GEONAMES_H_
|
|
16
|
+
#define LIBGEOTIFF_GEONAMES_H_
|
|
17
|
+
|
|
18
|
+
struct _KeyInfo {
|
|
19
|
+
int ki_key;
|
|
20
|
+
const char *ki_name;
|
|
21
|
+
};
|
|
22
|
+
typedef struct _KeyInfo KeyInfo;
|
|
23
|
+
|
|
24
|
+
/* If memory is a premium, then omitting the
|
|
25
|
+
* long name lists may save some space; simply
|
|
26
|
+
* #define OMIT_GEOTIFF_NAMES in the compile statement
|
|
27
|
+
* to remove all key->string translation.
|
|
28
|
+
*/
|
|
29
|
+
#ifdef ValuePair
|
|
30
|
+
# undef ValuePair
|
|
31
|
+
#endif
|
|
32
|
+
|
|
33
|
+
#ifndef OMIT_GEOTIFF_NAMES
|
|
34
|
+
#define ValuePair(token,value) {token,#token},
|
|
35
|
+
#else
|
|
36
|
+
#define ValuePair(token,value)
|
|
37
|
+
#endif
|
|
38
|
+
|
|
39
|
+
#define END_LIST { -1, 0 }
|
|
40
|
+
|
|
41
|
+
/************************************************************
|
|
42
|
+
* 6.2.x GeoTIFF Keys
|
|
43
|
+
************************************************************/
|
|
44
|
+
|
|
45
|
+
static const KeyInfo _keyInfo[] = {
|
|
46
|
+
# include "geokeys.inc" /* geokey database */
|
|
47
|
+
END_LIST
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/* Keys used by GeoTIFF 1.1 (OGC 19-008) */
|
|
51
|
+
static const KeyInfo _keyInfoV11[] = {
|
|
52
|
+
# include "geokeys_v1_1.inc" /* geokey database */
|
|
53
|
+
END_LIST
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
#define COMMON_VALUES \
|
|
57
|
+
{KvUndefined, "Undefined"}, \
|
|
58
|
+
{KvUserDefined,"User-Defined"}, \
|
|
59
|
+
ValuePair(KvUndefined,KvUndefined) \
|
|
60
|
+
ValuePair(KvUserDefined,KvUserDefined)
|
|
61
|
+
|
|
62
|
+
static const KeyInfo _csdefaultValue[] = {
|
|
63
|
+
COMMON_VALUES
|
|
64
|
+
END_LIST
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/************************************************************
|
|
68
|
+
* 6.3.x GeoTIFF Key Values
|
|
69
|
+
************************************************************/
|
|
70
|
+
|
|
71
|
+
static const KeyInfo _modeltypeValue[] = {
|
|
72
|
+
COMMON_VALUES
|
|
73
|
+
ValuePair(ModelTypeProjected,1)
|
|
74
|
+
ValuePair(ModelTypeGeographic,2)
|
|
75
|
+
ValuePair(ModelTypeGeocentric,3)
|
|
76
|
+
ValuePair(ModelProjected,1) /* aliases */
|
|
77
|
+
ValuePair(ModelGeographic,2) /* aliases */
|
|
78
|
+
ValuePair(ModelGeocentric,3) /* aliases */
|
|
79
|
+
END_LIST
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
static const KeyInfo _rastertypeValue[] = {
|
|
83
|
+
COMMON_VALUES
|
|
84
|
+
ValuePair(RasterPixelIsArea,1)
|
|
85
|
+
ValuePair(RasterPixelIsPoint,2)
|
|
86
|
+
END_LIST
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
static const KeyInfo _geounitsValue[] = {
|
|
90
|
+
COMMON_VALUES
|
|
91
|
+
# include "epsg_units.inc"
|
|
92
|
+
END_LIST
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
static const KeyInfo _geographicValue[] = {
|
|
96
|
+
COMMON_VALUES
|
|
97
|
+
# include "epsg_gcs.inc"
|
|
98
|
+
END_LIST
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
static const KeyInfo _geodeticdatumValue[] = {
|
|
102
|
+
COMMON_VALUES
|
|
103
|
+
# include "epsg_datum.inc"
|
|
104
|
+
END_LIST
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
static const KeyInfo _ellipsoidValue[] = {
|
|
108
|
+
COMMON_VALUES
|
|
109
|
+
# include "epsg_ellipse.inc"
|
|
110
|
+
END_LIST
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
static const KeyInfo _primemeridianValue[] = {
|
|
114
|
+
COMMON_VALUES
|
|
115
|
+
# include "epsg_pm.inc"
|
|
116
|
+
END_LIST
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
static const KeyInfo _pcstypeValue[] = {
|
|
120
|
+
COMMON_VALUES
|
|
121
|
+
# include "epsg_pcs.inc"
|
|
122
|
+
END_LIST
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
static const KeyInfo _projectionValue[] = {
|
|
126
|
+
COMMON_VALUES
|
|
127
|
+
# include "epsg_proj.inc"
|
|
128
|
+
END_LIST
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
static const KeyInfo _coordtransValue[] = {
|
|
132
|
+
COMMON_VALUES
|
|
133
|
+
# include "geo_ctrans.inc"
|
|
134
|
+
END_LIST
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
static const KeyInfo _vertcstypeValue[] = {
|
|
138
|
+
COMMON_VALUES
|
|
139
|
+
# include "epsg_vertcs.inc"
|
|
140
|
+
END_LIST
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
static const KeyInfo _vdatumValue[] = {
|
|
144
|
+
COMMON_VALUES
|
|
145
|
+
ValuePair(VDatumBase,1)
|
|
146
|
+
END_LIST
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
#endif /* LIBGEOTIFF_GEONAMES_H_ */
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
*
|
|
3
|
+
* geotiff.h - Public interface for Geotiff tag parsing.
|
|
4
|
+
*
|
|
5
|
+
* Written By: Niles D. Ritter
|
|
6
|
+
*
|
|
7
|
+
* copyright (c) 1995 Niles D. Ritter
|
|
8
|
+
*
|
|
9
|
+
* Permission granted to use this software, so long as this copyright
|
|
10
|
+
* notice accompanies any products derived therefrom.
|
|
11
|
+
**********************************************************************/
|
|
12
|
+
|
|
13
|
+
#ifndef LIBGEOTIFF_GEOTIFF_H_
|
|
14
|
+
#define LIBGEOTIFF_GEOTIFF_H_
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* \file geotiff.h
|
|
18
|
+
*
|
|
19
|
+
* Primary libgeotiff include file.
|
|
20
|
+
*
|
|
21
|
+
* This is the de facto registry for valid GeoTIFF GeoKeys
|
|
22
|
+
* and their associated symbolic values. This is also the only file
|
|
23
|
+
* of the GeoTIFF library which needs to be included in client source
|
|
24
|
+
* code.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/* This Version code should only change if a drastic
|
|
28
|
+
* alteration is made to the GeoTIFF key structure. Readers
|
|
29
|
+
* encountering a larger value should give up gracefully.
|
|
30
|
+
*/
|
|
31
|
+
#define GvCurrentVersion 1
|
|
32
|
+
|
|
33
|
+
/* Versions of GeoTIFF specification and corresponding
|
|
34
|
+
* (version, key_revision, minor_revision) triplets.
|
|
35
|
+
* At that time, only 2 versions are known: */
|
|
36
|
+
|
|
37
|
+
/* GEOTIFF_SPEC_1_0 corresponds to the original GeoTIFF specification,
|
|
38
|
+
* "Revision 1.0, specification version 1.8.2 in November 1995 (N. Ritter & Ruth, 1995)"
|
|
39
|
+
* available at http://geotiff.maptools.org/spec/geotiffhome.html */
|
|
40
|
+
#define GEOTIFF_SPEC_1_0_VERSION 1
|
|
41
|
+
#define GEOTIFF_SPEC_1_0_KEY_REVISION 1
|
|
42
|
+
#define GEOTIFF_SPEC_1_0_MINOR_REVISION 0
|
|
43
|
+
|
|
44
|
+
/* GEOTIFF_SPEC_1_1 corresponds to the OGC GeoTIFF standard 19-008 */
|
|
45
|
+
#define GEOTIFF_SPEC_1_1_VERSION 1
|
|
46
|
+
#define GEOTIFF_SPEC_1_1_KEY_REVISION 1
|
|
47
|
+
#define GEOTIFF_SPEC_1_1_MINOR_REVISION 1
|
|
48
|
+
|
|
49
|
+
/* Library version */
|
|
50
|
+
#define LIBGEOTIFF_VERSION 1730
|
|
51
|
+
|
|
52
|
+
#include "geo_config.h"
|
|
53
|
+
#include "geokeys.h"
|
|
54
|
+
|
|
55
|
+
/**********************************************************************
|
|
56
|
+
* Do we want to build as a DLL on windows?
|
|
57
|
+
**********************************************************************/
|
|
58
|
+
#if !defined(GTIF_DLL)
|
|
59
|
+
# if defined(_WIN32) && defined(BUILD_AS_DLL)
|
|
60
|
+
# define GTIF_DLL __declspec(dllexport)
|
|
61
|
+
# else
|
|
62
|
+
# define GTIF_DLL
|
|
63
|
+
# endif
|
|
64
|
+
#endif
|
|
65
|
+
|
|
66
|
+
/**********************************************************************
|
|
67
|
+
*
|
|
68
|
+
* Public Structures & Definitions
|
|
69
|
+
*
|
|
70
|
+
**********************************************************************/
|
|
71
|
+
|
|
72
|
+
#if defined(__cplusplus)
|
|
73
|
+
extern "C" {
|
|
74
|
+
#endif
|
|
75
|
+
|
|
76
|
+
typedef struct gtiff GTIF; /* struct gtiff is private */
|
|
77
|
+
typedef struct _TIFFMethod TIFFMethod;
|
|
78
|
+
typedef unsigned short tifftag_t;
|
|
79
|
+
typedef unsigned short geocode_t;
|
|
80
|
+
typedef int (*GTIFPrintMethod)(char *string, void *aux);
|
|
81
|
+
typedef int (*GTIFReadMethod)(char *string, void *aux); // string 1024+ in size
|
|
82
|
+
|
|
83
|
+
typedef enum {
|
|
84
|
+
TYPE_BYTE=1,
|
|
85
|
+
TYPE_SHORT=2,
|
|
86
|
+
TYPE_LONG=3,
|
|
87
|
+
TYPE_RATIONAL=4,
|
|
88
|
+
TYPE_ASCII=5,
|
|
89
|
+
TYPE_FLOAT=6,
|
|
90
|
+
TYPE_DOUBLE=7,
|
|
91
|
+
TYPE_SBYTE=8,
|
|
92
|
+
TYPE_SSHORT=9,
|
|
93
|
+
TYPE_SLONG=10,
|
|
94
|
+
TYPE_UNKNOWN=11
|
|
95
|
+
} tagtype_t;
|
|
96
|
+
|
|
97
|
+
#define LIBGEOTIFF_WARNING 0
|
|
98
|
+
#define LIBGEOTIFF_ERROR 1
|
|
99
|
+
|
|
100
|
+
#ifndef GTIF_PRINT_FUNC_FORMAT
|
|
101
|
+
#if defined(__GNUC__) && __GNUC__ >= 3
|
|
102
|
+
#define GTIF_PRINT_FUNC_FORMAT( format_idx, arg_idx ) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
|
103
|
+
#else
|
|
104
|
+
#define GTIF_PRINT_FUNC_FORMAT( format_idx, arg_idx )
|
|
105
|
+
#endif
|
|
106
|
+
#endif
|
|
107
|
+
|
|
108
|
+
#ifndef GTERRORCALLBACK_DEFINED
|
|
109
|
+
#define GTERRORCALLBACK_DEFINED
|
|
110
|
+
/* Defined in both geotiff.h and geo_kep.h */
|
|
111
|
+
typedef void (*GTErrorCallback) (struct gtiff*,
|
|
112
|
+
int level,
|
|
113
|
+
const char* msg, ...) GTIF_PRINT_FUNC_FORMAT(3,4);
|
|
114
|
+
#endif
|
|
115
|
+
|
|
116
|
+
/**********************************************************************
|
|
117
|
+
*
|
|
118
|
+
* Public Function Declarations
|
|
119
|
+
*
|
|
120
|
+
**********************************************************************/
|
|
121
|
+
|
|
122
|
+
/* TIFF-level interface */
|
|
123
|
+
GTIF GTIF_DLL *GTIFNew(void *tif);
|
|
124
|
+
GTIF GTIF_DLL *GTIFNewEx(void *tif,
|
|
125
|
+
GTErrorCallback error_callback, void* user_data);
|
|
126
|
+
GTIF GTIF_DLL *GTIFNewSimpleTags(void *tif);
|
|
127
|
+
GTIF GTIF_DLL *GTIFNewWithMethods(void *tif, TIFFMethod*);
|
|
128
|
+
GTIF GTIF_DLL *GTIFNewWithMethodsEx(void *tif, TIFFMethod* methods,
|
|
129
|
+
GTErrorCallback error_callback,
|
|
130
|
+
void* user_data);
|
|
131
|
+
void GTIF_DLL GTIFFree(GTIF *gtif);
|
|
132
|
+
int GTIF_DLL GTIFWriteKeys(GTIF *gtif);
|
|
133
|
+
/* versions must be an array of 3 int */
|
|
134
|
+
void GTIF_DLL GTIFDirectoryInfo(GTIF *gtif, int versions[3], int *keycount);
|
|
135
|
+
void GTIF_DLL *GTIFGetUserData(GTIF *gtif);
|
|
136
|
+
int GTIF_DLL GTIFSetVersionNumbers(GTIF* gtif,
|
|
137
|
+
unsigned short version,
|
|
138
|
+
unsigned short key_revision,
|
|
139
|
+
unsigned short minor_revision);
|
|
140
|
+
|
|
141
|
+
/* GeoKey Access */
|
|
142
|
+
int GTIF_DLL GTIFKeyInfo(GTIF *gtif, geokey_t key, int *size, tagtype_t* type);
|
|
143
|
+
int GTIF_DLL GTIFKeyGet(GTIF *gtif, geokey_t key, void *val, int index,
|
|
144
|
+
int count);
|
|
145
|
+
int GTIF_DLL GTIFKeyGetASCII(GTIF *gtif, geokey_t key, char* szStr,
|
|
146
|
+
int szStrMaxLen);
|
|
147
|
+
int GTIF_DLL GTIFKeyGetSHORT(GTIF *gtif, geokey_t key, unsigned short *val, int index,
|
|
148
|
+
int count);
|
|
149
|
+
int GTIF_DLL GTIFKeyGetDOUBLE(GTIF *gtif, geokey_t key, double *val, int index,
|
|
150
|
+
int count);
|
|
151
|
+
int GTIF_DLL GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type,
|
|
152
|
+
int count,...);
|
|
153
|
+
|
|
154
|
+
/* Metadata Import-Export utilities */
|
|
155
|
+
void GTIF_DLL GTIFPrint(GTIF *gtif, GTIFPrintMethod print, void *aux);
|
|
156
|
+
int GTIF_DLL GTIFImport(GTIF *gtif, GTIFReadMethod scan, void *aux);
|
|
157
|
+
char GTIF_DLL *GTIFKeyName(geokey_t key);
|
|
158
|
+
const char GTIF_DLL *GTIFKeyNameEx(GTIF* gtif, geokey_t key);
|
|
159
|
+
char GTIF_DLL *GTIFValueName(geokey_t key,int value);
|
|
160
|
+
const char GTIF_DLL *GTIFValueNameEx(GTIF* gtif, geokey_t key,int value);
|
|
161
|
+
char GTIF_DLL *GTIFTypeName(tagtype_t type);
|
|
162
|
+
char GTIF_DLL *GTIFTagName(int tag);
|
|
163
|
+
int GTIF_DLL GTIFKeyCode(const char * key);
|
|
164
|
+
int GTIF_DLL GTIFValueCode(geokey_t key,const char *value);
|
|
165
|
+
int GTIF_DLL GTIFTypeCode(const char *type);
|
|
166
|
+
int GTIF_DLL GTIFTagCode(const char *tag);
|
|
167
|
+
|
|
168
|
+
/* Translation between image/PCS space */
|
|
169
|
+
|
|
170
|
+
int GTIF_DLL GTIFImageToPCS( GTIF *gtif, double *x, double *y );
|
|
171
|
+
int GTIF_DLL GTIFPCSToImage( GTIF *gtif, double *x, double *y );
|
|
172
|
+
|
|
173
|
+
#if defined(__cplusplus)
|
|
174
|
+
}
|
|
175
|
+
#endif
|
|
176
|
+
|
|
177
|
+
#endif /* LIBGEOTIFF_GEOTIFF_H_ */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* geotiffio.h
|
|
3
|
+
*
|
|
4
|
+
* Standard include file for geotiff, including all
|
|
5
|
+
* key and code definitions.
|
|
6
|
+
*
|
|
7
|
+
* copyright (c) 1995 Niles D. Ritter
|
|
8
|
+
*
|
|
9
|
+
* Permission granted to use this software, so long as this copyright
|
|
10
|
+
* notice accompanies any products derived therefrom.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
#ifndef LIBGEOTIFF_GEOTIFFIO_H_
|
|
15
|
+
#define LIBGEOTIFF_GEOTIFFIO_H_
|
|
16
|
+
|
|
17
|
+
#include "geotiff.h" /* public key interface */
|
|
18
|
+
#include "geovalues.h" /* key code definitions */
|
|
19
|
+
|
|
20
|
+
#endif /* LIBGEOTIFF_GEOTIFFIO_H_ */
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
*
|
|
3
|
+
* geovalues.h - Public registry for valid GEOTIFF key-values.
|
|
4
|
+
*
|
|
5
|
+
* Written By: Niles D. Ritter
|
|
6
|
+
*
|
|
7
|
+
* copyright (c) 1995 Niles D. Ritter
|
|
8
|
+
*
|
|
9
|
+
* Permission granted to use this software, so long as this copyright
|
|
10
|
+
* notice accompanies any products derived therefrom.
|
|
11
|
+
*
|
|
12
|
+
**********************************************************************/
|
|
13
|
+
|
|
14
|
+
#ifndef LIBGEOTIFF_GEOVALUES_H_
|
|
15
|
+
#define LIBGEOTIFF_GEOVALUES_H_
|
|
16
|
+
|
|
17
|
+
/* If code values are added or modified, the "GvCurrentMinorRev"
|
|
18
|
+
* number should be incremented here. If new Keys are added, then the
|
|
19
|
+
* GvCurrentRevision number should be incremented instead, and the
|
|
20
|
+
* GvCurrentMinorRev should be reset to zero (see "geokeys.h").
|
|
21
|
+
*
|
|
22
|
+
* In addition, any changes here should be reflected in "geo_names.c"
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
#define GvCurrentMinorRev 0 /* First Major Rev EPSG Code Release */
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/*
|
|
30
|
+
* Universal key values -- defined for consistency
|
|
31
|
+
*/
|
|
32
|
+
#define KvUndefined 0
|
|
33
|
+
#define KvUserDefined 32767
|
|
34
|
+
|
|
35
|
+
#ifdef ValuePair
|
|
36
|
+
# undef ValuePair
|
|
37
|
+
#endif
|
|
38
|
+
#define ValuePair(name,value) name = value,
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
* The section numbers refer to the GeoTIFF Specification section
|
|
42
|
+
* in which the code values are documented.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/************************************************************
|
|
46
|
+
* 6.3.1 GeoTIFF General Codes
|
|
47
|
+
************************************************************/
|
|
48
|
+
|
|
49
|
+
/* 6.3.1.1 Model Type Codes */
|
|
50
|
+
typedef enum {
|
|
51
|
+
ModelTypeProjected = 1, /* Projection Coordinate System */
|
|
52
|
+
ModelTypeGeographic = 2, /* Geographic latitude-longitude System */
|
|
53
|
+
ModelTypeGeocentric = 3, /* Geocentric (X,Y,Z) Coordinate System */
|
|
54
|
+
ModelProjected = ModelTypeProjected, /* alias */
|
|
55
|
+
ModelGeographic = ModelTypeGeographic, /* alias */
|
|
56
|
+
ModelGeocentric = ModelTypeGeocentric /* alias */
|
|
57
|
+
} modeltype_t;
|
|
58
|
+
|
|
59
|
+
/* 6.3.1.2 Raster Type Codes */
|
|
60
|
+
typedef enum {
|
|
61
|
+
RasterPixelIsArea = 1, /* Standard pixel-fills-grid-cell */
|
|
62
|
+
RasterPixelIsPoint = 2 /* Pixel-at-grid-vertex */
|
|
63
|
+
} rastertype_t;
|
|
64
|
+
|
|
65
|
+
typedef enum {
|
|
66
|
+
# include "epsg_gcs.inc"
|
|
67
|
+
geographic_end
|
|
68
|
+
} geographic_t;
|
|
69
|
+
|
|
70
|
+
typedef enum {
|
|
71
|
+
# include "epsg_datum.inc"
|
|
72
|
+
geodeticdatum_end
|
|
73
|
+
} geodeticdatum_t;
|
|
74
|
+
|
|
75
|
+
typedef enum {
|
|
76
|
+
# include "epsg_units.inc"
|
|
77
|
+
Unit_End
|
|
78
|
+
} geounits_t;
|
|
79
|
+
|
|
80
|
+
typedef enum {
|
|
81
|
+
# include "epsg_ellipse.inc"
|
|
82
|
+
ellipsoid_end
|
|
83
|
+
} ellipsoid_t;
|
|
84
|
+
|
|
85
|
+
typedef enum {
|
|
86
|
+
# include "epsg_pm.inc"
|
|
87
|
+
primemeridian_end
|
|
88
|
+
} primemeridian_t;
|
|
89
|
+
|
|
90
|
+
typedef enum {
|
|
91
|
+
# include "epsg_pcs.inc"
|
|
92
|
+
pcstype_end
|
|
93
|
+
} pcstype_t;
|
|
94
|
+
|
|
95
|
+
typedef enum {
|
|
96
|
+
# include "epsg_proj.inc"
|
|
97
|
+
projection_end
|
|
98
|
+
} projection_t;
|
|
99
|
+
|
|
100
|
+
typedef enum {
|
|
101
|
+
# include "geo_ctrans.inc"
|
|
102
|
+
coordtrans_end
|
|
103
|
+
} coordtrans_t;
|
|
104
|
+
|
|
105
|
+
typedef enum {
|
|
106
|
+
# include "epsg_vertcs.inc"
|
|
107
|
+
vertcs_end
|
|
108
|
+
} vertcstype_t;
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
typedef enum {
|
|
112
|
+
VDatumBase = 1
|
|
113
|
+
} vdatum_t;
|
|
114
|
+
|
|
115
|
+
#endif /* LIBGEOTIFF_GEOVALUES_H_ */
|