Statistics
| Revision:

root / branches / gvSIG_19_ext3D_osgVP_2_2_0 / binaries / mac / raster / gdal / GDAL.framework / Versions / 1.6 / Headers / ogr_srs_api.h @ 32115

History | View | Annotate | Download (31.2 KB)

1
/******************************************************************************
2
 * $Id: ogr_srs_api.h 16108 2009-01-18 09:43:31Z rouault $
3
 *
4
 * Project:  OpenGIS Simple Features Reference Implementation
5
 * Purpose:  C API and constant declarations for OGR Spatial References.
6
 * Author:   Frank Warmerdam, warmerdam@pobox.com
7
 *
8
 ******************************************************************************
9
 * Copyright (c) 2000, Frank Warmerdam
10
 *
11
 * Permission is hereby granted, free of charge, to any person obtaining a
12
 * copy of this software and associated documentation files (the "Software"),
13
 * to deal in the Software without restriction, including without limitation
14
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15
 * and/or sell copies of the Software, and to permit persons to whom the
16
 * Software is furnished to do so, subject to the following conditions:
17
 *
18
 * The above copyright notice and this permission notice shall be included
19
 * in all copies or substantial portions of the Software.
20
 *
21
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27
 * DEALINGS IN THE SOFTWARE.
28
 ****************************************************************************/
29

    
30
#ifndef _OGR_SRS_API_H_INCLUDED
31
#define _OGR_SRS_API_H_INCLUDED
32

    
33
#include "ogr_core.h"
34

    
35
CPL_C_START
36

    
37
/**
38
 * \file ogr_srs_api.h
39
 * 
40
 * C spatial reference system services and defines.
41
 * 
42
 * See also: ogr_spatialref.h
43
 */
44

    
45
/* -------------------------------------------------------------------- */
46
/*      Axis orientations (corresponds to CS_AxisOrientationEnum).      */
47
/* -------------------------------------------------------------------- */
48
typedef enum {
49
    OAO_Other=0,
50
    OAO_North=1,
51
    OAO_South=2,
52
    OAO_East=3,
53
    OAO_West=4,
54
    OAO_Up=5,
55
    OAO_Down=6
56
} OGRAxisOrientation;
57
    
58
const char CPL_DLL *OSRAxisEnumToName( OGRAxisOrientation eOrientation );
59

    
60
/* -------------------------------------------------------------------- */
61
/*      Datum types (corresponds to CS_DatumType).                      */
62
/* -------------------------------------------------------------------- */
63

    
64
typedef enum {
65
    ODT_HD_Min=1000,
66
    ODT_HD_Other=1000,
67
    ODT_HD_Classic=1001,
68
    ODT_HD_Geocentric=1002,
69
    ODT_HD_Max=1999,
70
    ODT_VD_Min=2000,
71
    ODT_VD_Other=2000,
72
    ODT_VD_Orthometric=2001,
73
    ODT_VD_Ellipsoidal=2002,
74
    ODT_VD_AltitudeBarometric=2003,
75
    ODT_VD_Normal=2004,
76
    ODT_VD_GeoidModelDerived=2005,
77
    ODT_VD_Depth=2006,
78
    ODT_VD_Max=2999,
79
    ODT_LD_Min=10000,
80
    ODT_LD_Max=32767
81
} OGRDatumType; 
82

    
83
/* ==================================================================== */
84
/*      Some standard WKT geographic coordinate systems.                */
85
/* ==================================================================== */
86

    
87
#define SRS_WKT_WGS84 "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]"
88

    
89
/* ==================================================================== */
90
/*      Some "standard" strings.                                        */
91
/* ==================================================================== */
92

    
93
#define SRS_PT_ALBERS_CONIC_EQUAL_AREA                                  \
94
                                "Albers_Conic_Equal_Area"
95
#define SRS_PT_AZIMUTHAL_EQUIDISTANT "Azimuthal_Equidistant"
96
#define SRS_PT_CASSINI_SOLDNER  "Cassini_Soldner"
97
#define SRS_PT_CYLINDRICAL_EQUAL_AREA "Cylindrical_Equal_Area"
98
#define SRS_PT_BONNE            "Bonne"
99
#define SRS_PT_ECKERT_I         "Eckert_I"
100
#define SRS_PT_ECKERT_II        "Eckert_II"
101
#define SRS_PT_ECKERT_III       "Eckert_III"
102
#define SRS_PT_ECKERT_IV        "Eckert_IV"
103
#define SRS_PT_ECKERT_V         "Eckert_V"
104
#define SRS_PT_ECKERT_VI        "Eckert_VI"
105
#define SRS_PT_EQUIDISTANT_CONIC                                        \
106
                                "Equidistant_Conic"
107
#define SRS_PT_EQUIRECTANGULAR  "Equirectangular"
108
#define SRS_PT_GALL_STEREOGRAPHIC                                       \
109
                                "Gall_Stereographic"
110
#define SRS_PT_GAUSSSCHREIBERTMERCATOR                                      \
111
                                "Gauss_Schreiber_Transverse_Mercator"
112
#define SRS_PT_GEOSTATIONARY_SATELLITE                                  \
113
                                "Geostationary_Satellite"
114
#define SRS_PT_GOODE_HOMOLOSINE "Goode_Homolosine"
115
#define SRS_PT_GNOMONIC         "Gnomonic"
116
#define SRS_PT_HOTINE_OBLIQUE_MERCATOR                                  \
117
                                "Hotine_Oblique_Mercator"
118
#define SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN         \
119
                            "Hotine_Oblique_Mercator_Two_Point_Natural_Origin"
120
#define SRS_PT_LABORDE_OBLIQUE_MERCATOR                                 \
121
                                "Laborde_Oblique_Mercator"
122
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP                              \
123
                                "Lambert_Conformal_Conic_1SP"
124
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP                              \
125
                                "Lambert_Conformal_Conic_2SP"
126
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM                      \
127
                                "Lambert_Conformal_Conic_2SP_Belgium"
128
#define SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA                     \
129
                                "Lambert_Azimuthal_Equal_Area"
130
#define SRS_PT_MERCATOR_1SP     "Mercator_1SP"
131
#define SRS_PT_MERCATOR_2SP     "Mercator_2SP"
132
#define SRS_PT_MILLER_CYLINDRICAL "Miller_Cylindrical"
133
#define SRS_PT_MOLLWEIDE        "Mollweide"
134
#define SRS_PT_NEW_ZEALAND_MAP_GRID                                     \
135
                                "New_Zealand_Map_Grid"
136
#define SRS_PT_OBLIQUE_STEREOGRAPHIC                                    \
137
                                "Oblique_Stereographic"
138
#define SRS_PT_ORTHOGRAPHIC     "Orthographic"
139
#define SRS_PT_POLAR_STEREOGRAPHIC                                      \
140
                                "Polar_Stereographic"
141
#define SRS_PT_POLYCONIC        "Polyconic"
142
#define SRS_PT_ROBINSON         "Robinson"
143
#define SRS_PT_SINUSOIDAL       "Sinusoidal"
144
#define SRS_PT_STEREOGRAPHIC    "Stereographic"
145
#define SRS_PT_SWISS_OBLIQUE_CYLINDRICAL                                \
146
                                "Swiss_Oblique_Cylindrical"
147
#define SRS_PT_TRANSVERSE_MERCATOR                                      \
148
                                "Transverse_Mercator"
149
#define SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED                       \
150
                                "Transverse_Mercator_South_Orientated"
151

    
152
/* special mapinfo variants on Transverse Mercator */
153
#define SRS_PT_TRANSVERSE_MERCATOR_MI_21 \
154
                                "Transverse_Mercator_MapInfo_21"
155
#define SRS_PT_TRANSVERSE_MERCATOR_MI_22 \
156
                                "Transverse_Mercator_MapInfo_22"
157
#define SRS_PT_TRANSVERSE_MERCATOR_MI_23 \
158
                                "Transverse_Mercator_MapInfo_23"
159
#define SRS_PT_TRANSVERSE_MERCATOR_MI_24 \
160
                                "Transverse_Mercator_MapInfo_24"
161
#define SRS_PT_TRANSVERSE_MERCATOR_MI_25 \
162
                                "Transverse_Mercator_MapInfo_25"
163

    
164
#define SRS_PT_TUNISIA_MINING_GRID                                      \
165
                                "Tunisia_Mining_Grid"
166
#define SRS_PT_TWO_POINT_EQUIDISTANT                                    \
167
                                "Two_Point_Equidistant"
168
#define SRS_PT_VANDERGRINTEN    "VanDerGrinten"
169
#define SRS_PT_KROVAK           "Krovak"
170
#define SRS_PT_IMW_POLYCONIC    "International_Map_of_the_World_Polyconic"
171
#define SRS_PT_WAGNER_I         "Wagner_I"
172
#define SRS_PT_WAGNER_II        "Wagner_II"
173
#define SRS_PT_WAGNER_III       "Wagner_III"
174
#define SRS_PT_WAGNER_IV        "Wagner_IV"
175
#define SRS_PT_WAGNER_V         "Wagner_V"
176
#define SRS_PT_WAGNER_VI        "Wagner_VI"
177
#define SRS_PT_WAGNER_VII       "Wagner_VII"
178
                                
179

    
180
#define SRS_PP_CENTRAL_MERIDIAN         "central_meridian"
181
#define SRS_PP_SCALE_FACTOR             "scale_factor"
182
#define SRS_PP_STANDARD_PARALLEL_1      "standard_parallel_1"
183
#define SRS_PP_STANDARD_PARALLEL_2      "standard_parallel_2"
184
#define SRS_PP_PSEUDO_STD_PARALLEL_1    "pseudo_standard_parallel_1"
185
#define SRS_PP_LONGITUDE_OF_CENTER      "longitude_of_center"
186
#define SRS_PP_LATITUDE_OF_CENTER       "latitude_of_center"
187
#define SRS_PP_LONGITUDE_OF_ORIGIN      "longitude_of_origin"
188
#define SRS_PP_LATITUDE_OF_ORIGIN       "latitude_of_origin"
189
#define SRS_PP_FALSE_EASTING            "false_easting"
190
#define SRS_PP_FALSE_NORTHING           "false_northing"
191
#define SRS_PP_AZIMUTH                  "azimuth"
192
#define SRS_PP_LONGITUDE_OF_POINT_1     "longitude_of_point_1"
193
#define SRS_PP_LATITUDE_OF_POINT_1      "latitude_of_point_1"
194
#define SRS_PP_LONGITUDE_OF_POINT_2     "longitude_of_point_2"
195
#define SRS_PP_LATITUDE_OF_POINT_2      "latitude_of_point_2"
196
#define SRS_PP_LONGITUDE_OF_POINT_3     "longitude_of_point_3"
197
#define SRS_PP_LATITUDE_OF_POINT_3      "latitude_of_point_3"
198
#define SRS_PP_RECTIFIED_GRID_ANGLE     "rectified_grid_angle"
199
#define SRS_PP_LANDSAT_NUMBER           "landsat_number"
200
#define SRS_PP_PATH_NUMBER              "path_number"
201
#define SRS_PP_PERSPECTIVE_POINT_HEIGHT "perspective_point_height"
202
#define SRS_PP_SATELLITE_HEIGHT         "satellite_height"
203
#define SRS_PP_FIPSZONE                 "fipszone"
204
#define SRS_PP_ZONE                     "zone"
205
#define SRS_PP_LATITUDE_OF_1ST_POINT    "Latitude_Of_1st_Point"
206
#define SRS_PP_LONGITUDE_OF_1ST_POINT   "Longitude_Of_1st_Point"
207
#define SRS_PP_LATITUDE_OF_2ND_POINT    "Latitude_Of_2nd_Point"
208
#define SRS_PP_LONGITUDE_OF_2ND_POINT   "Longitude_Of_2nd_Point"
209

    
210
#define SRS_UL_METER            "Meter"
211
#define SRS_UL_FOOT             "Foot (International)" /* or just "FOOT"? */
212
#define SRS_UL_FOOT_CONV                    "0.3048"
213
#define SRS_UL_US_FOOT          "U.S. Foot" /* or "US survey foot" */
214
#define SRS_UL_US_FOOT_CONV                 "0.3048006"
215
#define SRS_UL_NAUTICAL_MILE    "Nautical Mile"
216
#define SRS_UL_NAUTICAL_MILE_CONV           "1852.0"
217
#define SRS_UL_LINK             "Link"          /* Based on US Foot */
218
#define SRS_UL_LINK_CONV                    "0.20116684023368047"
219
#define SRS_UL_CHAIN            "Chain"         /* based on US Foot */
220
#define SRS_UL_CHAIN_CONV                   "20.116684023368047"
221
#define SRS_UL_ROD              "Rod"           /* based on US Foot */
222
#define SRS_UL_ROD_CONV                     "5.02921005842012"
223

    
224
#define SRS_UA_DEGREE           "degree"
225
#define SRS_UA_DEGREE_CONV                  "0.0174532925199433"
226
#define SRS_UA_RADIAN           "radian"
227

    
228
#define SRS_PM_GREENWICH        "Greenwich"
229

    
230
#define SRS_DN_NAD27            "North_American_Datum_1927"
231
#define SRS_DN_NAD83            "North_American_Datum_1983"
232
#define SRS_DN_WGS72            "WGS_1972"
233
#define SRS_DN_WGS84            "WGS_1984"
234

    
235
#define SRS_WGS84_SEMIMAJOR     6378137.0                                
236
#define SRS_WGS84_INVFLATTENING 298.257223563
237

    
238
/* -------------------------------------------------------------------- */
239
/*      C Wrappers for C++ objects and methods.                         */
240
/* -------------------------------------------------------------------- */
241
#ifndef _DEFINED_OGRSpatialReferenceH
242
#define _DEFINED_OGRSpatialReferenceH
243

    
244
#ifdef DEBUG
245
typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH;
246
typedef struct OGRCoordinateTransformationHS *OGRCoordinateTransformationH;
247
#else
248
typedef void *OGRSpatialReferenceH;                               
249
typedef void *OGRCoordinateTransformationH;
250
#endif
251

    
252
#endif
253

    
254

    
255
OGRSpatialReferenceH CPL_DLL CPL_STDCALL
256
      OSRNewSpatialReference( const char * /* = NULL */);
257
OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRCloneGeogCS( OGRSpatialReferenceH );
258
OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRClone( OGRSpatialReferenceH );
259
void CPL_DLL CPL_STDCALL OSRDestroySpatialReference( OGRSpatialReferenceH );
260

    
261
int CPL_DLL OSRReference( OGRSpatialReferenceH );
262
int CPL_DLL OSRDereference( OGRSpatialReferenceH );
263
void CPL_DLL OSRRelease( OGRSpatialReferenceH );
264

    
265
OGRErr CPL_DLL OSRValidate( OGRSpatialReferenceH );
266
OGRErr CPL_DLL OSRFixupOrdering( OGRSpatialReferenceH );
267
OGRErr CPL_DLL OSRFixup( OGRSpatialReferenceH );
268
OGRErr CPL_DLL OSRStripCTParms( OGRSpatialReferenceH );
269

    
270
OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSG( OGRSpatialReferenceH, int );
271
OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSGA( OGRSpatialReferenceH, int );
272
OGRErr CPL_DLL OSRImportFromWkt( OGRSpatialReferenceH, char ** );
273
OGRErr CPL_DLL OSRImportFromProj4( OGRSpatialReferenceH, const char *);
274
OGRErr CPL_DLL OSRImportFromESRI( OGRSpatialReferenceH, char **);
275
OGRErr CPL_DLL OSRImportFromPCI( OGRSpatialReferenceH hSRS, const char *,
276
                                 const char *, double * );
277
OGRErr CPL_DLL OSRImportFromUSGS( OGRSpatialReferenceH,
278
                                  long, long, double *, long);
279
OGRErr CPL_DLL OSRImportFromXML( OGRSpatialReferenceH, const char * );
280
OGRErr CPL_DLL OSRImportFromDict( OGRSpatialReferenceH, const char *, 
281
                                  const char * );
282
OGRErr CPL_DLL OSRImportFromPanorama( OGRSpatialReferenceH, long, long, long,
283
                                      double * );
284
OGRErr CPL_DLL OSRImportFromMICoordSys( OGRSpatialReferenceH, const char *);
285
OGRErr CPL_DLL OSRImportFromUrl( OGRSpatialReferenceH, const char * );
286

    
287
OGRErr CPL_DLL CPL_STDCALL OSRExportToWkt( OGRSpatialReferenceH, char ** );
288
OGRErr CPL_DLL CPL_STDCALL OSRExportToPrettyWkt( OGRSpatialReferenceH, char **, int);
289
OGRErr CPL_DLL CPL_STDCALL OSRExportToProj4( OGRSpatialReferenceH, char **);
290
OGRErr CPL_DLL OSRExportToPCI( OGRSpatialReferenceH, char **, char **,
291
                               double ** );
292
OGRErr CPL_DLL OSRExportToUSGS( OGRSpatialReferenceH, long *, long *,
293
                                double **, long * );
294
OGRErr CPL_DLL OSRExportToXML( OGRSpatialReferenceH, char **, const char * );
295
OGRErr CPL_DLL OSRExportToPanorama( OGRSpatialReferenceH, long *, long *,
296
                                    long *, long *, double * );
297
OGRErr CPL_DLL OSRExportToMICoordSys( OGRSpatialReferenceH, char ** );
298

    
299
OGRErr CPL_DLL OSRMorphToESRI( OGRSpatialReferenceH );
300
OGRErr CPL_DLL OSRMorphFromESRI( OGRSpatialReferenceH );
301

    
302
OGRErr CPL_DLL CPL_STDCALL OSRSetAttrValue( OGRSpatialReferenceH hSRS,
303
                                const char * pszNodePath,
304
                                const char * pszNewNodeValue );
305
const char CPL_DLL * CPL_STDCALL OSRGetAttrValue( OGRSpatialReferenceH hSRS,
306
                           const char * pszName, int iChild /* = 0 */ );
307

    
308
OGRErr CPL_DLL OSRSetAngularUnits( OGRSpatialReferenceH, const char *, double );
309
double CPL_DLL OSRGetAngularUnits( OGRSpatialReferenceH, char ** );
310
OGRErr CPL_DLL OSRSetLinearUnits( OGRSpatialReferenceH, const char *, double );
311
OGRErr CPL_DLL OSRSetLinearUnitsAndUpdateParameters( 
312
    OGRSpatialReferenceH, const char *, double );
313
double CPL_DLL OSRGetLinearUnits( OGRSpatialReferenceH, char ** );
314

    
315
double CPL_DLL OSRGetPrimeMeridian( OGRSpatialReferenceH, char ** );
316

    
317
int CPL_DLL OSRIsGeographic( OGRSpatialReferenceH );
318
int CPL_DLL OSRIsLocal( OGRSpatialReferenceH );
319
int CPL_DLL OSRIsProjected( OGRSpatialReferenceH );
320
int CPL_DLL OSRIsSameGeogCS( OGRSpatialReferenceH, OGRSpatialReferenceH );
321
int CPL_DLL OSRIsSame( OGRSpatialReferenceH, OGRSpatialReferenceH );
322

    
323
OGRErr CPL_DLL OSRSetLocalCS( OGRSpatialReferenceH hSRS, const char *pszName );
324
OGRErr CPL_DLL OSRSetProjCS( OGRSpatialReferenceH hSRS, const char * pszName );
325
OGRErr CPL_DLL OSRSetWellKnownGeogCS( OGRSpatialReferenceH hSRS,
326
                                      const char * pszName );
327
OGRErr CPL_DLL CPL_STDCALL OSRSetFromUserInput( OGRSpatialReferenceH hSRS, 
328
                                    const char * );
329
OGRErr CPL_DLL OSRCopyGeogCSFrom( OGRSpatialReferenceH hSRS, 
330
                                  OGRSpatialReferenceH hSrcSRS );
331
OGRErr CPL_DLL OSRSetTOWGS84( OGRSpatialReferenceH hSRS, 
332
                              double, double, double, 
333
                              double, double, double, double );
334
OGRErr CPL_DLL OSRGetTOWGS84( OGRSpatialReferenceH hSRS, double *, int );
335
                        
336

    
337
OGRErr CPL_DLL OSRSetGeogCS( OGRSpatialReferenceH hSRS,
338
                      const char * pszGeogName,
339
                      const char * pszDatumName,
340
                      const char * pszEllipsoidName,
341
                      double dfSemiMajor, double dfInvFlattening,
342
                      const char * pszPMName /* = NULL */,
343
                      double dfPMOffset /* = 0.0 */,
344
                      const char * pszUnits /* = NULL */,
345
                      double dfConvertToRadians /* = 0.0 */ );
346

    
347
double CPL_DLL OSRGetSemiMajor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
348
double CPL_DLL OSRGetSemiMinor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
349
double CPL_DLL OSRGetInvFlattening( OGRSpatialReferenceH, OGRErr * /*=NULL*/);
350

    
351
OGRErr CPL_DLL OSRSetAuthority( OGRSpatialReferenceH hSRS,
352
                         const char * pszTargetKey,
353
                         const char * pszAuthority,
354
                         int nCode );
355
const char CPL_DLL *OSRGetAuthorityCode( OGRSpatialReferenceH hSRS,
356
                                         const char * pszTargetKey );
357
const char CPL_DLL *OSRGetAuthorityName( OGRSpatialReferenceH hSRS,
358
                                         const char * pszTargetKey );
359
OGRErr CPL_DLL OSRSetProjection( OGRSpatialReferenceH, const char * );
360
OGRErr CPL_DLL OSRSetProjParm( OGRSpatialReferenceH, const char *, double );
361
double CPL_DLL OSRGetProjParm( OGRSpatialReferenceH hSRS,
362
                        const char * pszParmName, 
363
                        double dfDefault /* = 0.0 */,
364
                        OGRErr * /* = NULL */ );
365
OGRErr CPL_DLL OSRSetNormProjParm( OGRSpatialReferenceH, const char *, double);
366
double CPL_DLL OSRGetNormProjParm( OGRSpatialReferenceH hSRS,
367
                                   const char * pszParmName, 
368
                                   double dfDefault /* = 0.0 */,
369
                                   OGRErr * /* = NULL */ );
370

    
371
OGRErr CPL_DLL OSRSetUTM( OGRSpatialReferenceH hSRS, int nZone, int bNorth );
372
int    CPL_DLL OSRGetUTMZone( OGRSpatialReferenceH hSRS, int *pbNorth );
373
OGRErr CPL_DLL OSRSetStatePlane( OGRSpatialReferenceH hSRS, 
374
                                 int nZone, int bNAD83 );
375
OGRErr CPL_DLL OSRSetStatePlaneWithUnits( OGRSpatialReferenceH hSRS, 
376
                                          int nZone, int bNAD83,
377
                                          const char *pszOverrideUnitName,
378
                                          double dfOverrideUnit );
379
OGRErr CPL_DLL OSRAutoIdentifyEPSG( OGRSpatialReferenceH hSRS );
380
const char CPL_DLL *OSRGetAxis( OGRSpatialReferenceH hSRS,
381
                                const char *pszTargetKey, int iAxis, 
382
                                OGRAxisOrientation *peOrientation );
383

    
384
/** Albers Conic Equal Area */
385
OGRErr CPL_DLL OSRSetACEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
386
                         double dfCenterLat, double dfCenterLong,
387
                         double dfFalseEasting, double dfFalseNorthing );
388
    
389
/** Azimuthal Equidistant */
390
OGRErr CPL_DLL  OSRSetAE( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
391
                       double dfFalseEasting, double dfFalseNorthing );
392

    
393
/** Bonne */
394
OGRErr CPL_DLL OSRSetBonne(OGRSpatialReferenceH hSRS, 
395
                           double dfStandardParallel, double dfCentralMeridian,
396
                           double dfFalseEasting, double dfFalseNorthing );
397

    
398
/** Cylindrical Equal Area */
399
OGRErr CPL_DLL OSRSetCEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian,
400
                        double dfFalseEasting, double dfFalseNorthing );
401

    
402
/** Cassini-Soldner */
403
OGRErr CPL_DLL OSRSetCS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
404
                       double dfFalseEasting, double dfFalseNorthing );
405

    
406
/** Equidistant Conic */
407
OGRErr CPL_DLL OSRSetEC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
408
                       double dfCenterLat, double dfCenterLong,
409
                       double dfFalseEasting, double dfFalseNorthing );
410

    
411
/** Eckert I-VI */
412
OGRErr CPL_DLL OSRSetEckert( OGRSpatialReferenceH hSRS,  int nVariation,
413
                             double dfCentralMeridian,
414
                             double dfFalseEasting, double dfFalseNorthing );
415

    
416
/** Eckert IV */
417
OGRErr CPL_DLL OSRSetEckertIV( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
418
                             double dfFalseEasting, double dfFalseNorthing );
419

    
420
/** Eckert VI */
421
OGRErr CPL_DLL OSRSetEckertVI( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
422
                             double dfFalseEasting, double dfFalseNorthing );
423

    
424
/** Equirectangular */
425
OGRErr CPL_DLL OSRSetEquirectangular(OGRSpatialReferenceH hSRS,
426
                              double dfCenterLat, double dfCenterLong,
427
                              double dfFalseEasting, double dfFalseNorthing );
428

    
429
/** Equirectangular generalized form */
430
OGRErr CPL_DLL OSRSetEquirectangular2( OGRSpatialReferenceH hSRS,
431
                              double dfCenterLat, double dfCenterLong,
432
                              double dfPseudoStdParallel1,
433
                              double dfFalseEasting,
434
                              double dfFalseNorthing );
435

    
436
/** Gall Stereograpic */
437
OGRErr CPL_DLL OSRSetGS( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
438
                       double dfFalseEasting, double dfFalseNorthing );
439
    
440
/** Goode Homolosine */
441
OGRErr CPL_DLL OSRSetGH( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
442
                         double dfFalseEasting, double dfFalseNorthing );
443
    
444
/** GEOS - Geostationary Satellite View */
445
OGRErr CPL_DLL OSRSetGEOS( OGRSpatialReferenceH hSRS, 
446
                           double dfCentralMeridian, double dfSatelliteHeight,
447
                           double dfFalseEasting, double dfFalseNorthing );
448

    
449
/** Gauss Schreiber Transverse Mercator */    
450
OGRErr CPL_DLL OSRSetGaussSchreiberTMercator( OGRSpatialReferenceH hSRS,
451
                                  double dfCenterLat, double dfCenterLong,
452
                                  double dfScale,
453
                                  double dfFalseEasting,
454
                                  double dfFalseNorthing );
455
/** Gnomonic */
456
OGRErr CPL_DLL OSRSetGnomonic(OGRSpatialReferenceH hSRS,
457
                              double dfCenterLat, double dfCenterLong,
458
                            double dfFalseEasting, double dfFalseNorthing );
459

    
460
/** Hotine Oblique Mercator using azimuth angle */
461
OGRErr CPL_DLL OSRSetHOM( OGRSpatialReferenceH hSRS,
462
                          double dfCenterLat, double dfCenterLong,
463
                          double dfAzimuth, double dfRectToSkew,
464
                          double dfScale,
465
                          double dfFalseEasting, double dfFalseNorthing );
466

    
467
/** Hotine Oblique Mercator using two points on centerline */
468
OGRErr CPL_DLL OSRSetHOM2PNO( OGRSpatialReferenceH hSRS, double dfCenterLat,
469
                              double dfLat1, double dfLong1,
470
                              double dfLat2, double dfLong2,
471
                              double dfScale,
472
                              double dfFalseEasting, double dfFalseNorthing );
473

    
474
/** International Map of the World Polyconic */
475
OGRErr CPL_DLL OSRSetIWMPolyconic( OGRSpatialReferenceH hSRS,
476
                                   double dfLat1, double dfLat2,
477
                                   double dfCenterLong,
478
                                   double dfFalseEasting,
479
                                   double dfFalseNorthing );
480

    
481
/** Krovak Oblique Conic Conformal */
482
OGRErr CPL_DLL OSRSetKrovak( OGRSpatialReferenceH hSRS,
483
                             double dfCenterLat, double dfCenterLong,
484
                             double dfAzimuth, double dfPseudoStdParallelLat,
485
                             double dfScale, 
486
                             double dfFalseEasting, double dfFalseNorthing );
487

    
488
/** Lambert Azimuthal Equal-Area */
489
OGRErr CPL_DLL OSRSetLAEA( OGRSpatialReferenceH hSRS,
490
                           double dfCenterLat, double dfCenterLong,
491
                           double dfFalseEasting, double dfFalseNorthing );
492

    
493
/** Lambert Conformal Conic */
494
OGRErr CPL_DLL OSRSetLCC( OGRSpatialReferenceH hSRS,
495
                          double dfStdP1, double dfStdP2,
496
                          double dfCenterLat, double dfCenterLong,
497
                          double dfFalseEasting, double dfFalseNorthing );
498

    
499
/** Lambert Conformal Conic 1SP */
500
OGRErr CPL_DLL OSRSetLCC1SP( OGRSpatialReferenceH hSRS,
501
                             double dfCenterLat, double dfCenterLong,
502
                             double dfScale,
503
                             double dfFalseEasting, double dfFalseNorthing );
504

    
505
/** Lambert Conformal Conic (Belgium) */
506
OGRErr CPL_DLL OSRSetLCCB( OGRSpatialReferenceH hSRS,
507
                           double dfStdP1, double dfStdP2,
508
                           double dfCenterLat, double dfCenterLong,
509
                           double dfFalseEasting, double dfFalseNorthing );
510
    
511
/** Miller Cylindrical */
512
OGRErr CPL_DLL OSRSetMC( OGRSpatialReferenceH hSRS,
513
                         double dfCenterLat, double dfCenterLong,
514
                         double dfFalseEasting, double dfFalseNorthing );
515

    
516
/** Mercator */
517
OGRErr CPL_DLL OSRSetMercator( OGRSpatialReferenceH hSRS,
518
                               double dfCenterLat, double dfCenterLong,
519
                               double dfScale, 
520
                               double dfFalseEasting, double dfFalseNorthing );
521

    
522
/** Mollweide */
523
OGRErr CPL_DLL  OSRSetMollweide( OGRSpatialReferenceH hSRS,
524
                                 double dfCentralMeridian,
525
                                 double dfFalseEasting,
526
                                 double dfFalseNorthing );
527

    
528
/** New Zealand Map Grid */
529
OGRErr CPL_DLL OSRSetNZMG( OGRSpatialReferenceH hSRS,
530
                           double dfCenterLat, double dfCenterLong,
531
                           double dfFalseEasting, double dfFalseNorthing );
532

    
533
/** Oblique Stereographic */
534
OGRErr CPL_DLL OSRSetOS( OGRSpatialReferenceH hSRS,
535
                         double dfOriginLat, double dfCMeridian,
536
                         double dfScale,
537
                         double dfFalseEasting,double dfFalseNorthing);
538
    
539
/** Orthographic */
540
OGRErr CPL_DLL OSRSetOrthographic( OGRSpatialReferenceH hSRS,
541
                                   double dfCenterLat, double dfCenterLong,
542
                                   double dfFalseEasting,
543
                                   double dfFalseNorthing);
544

    
545
/** Polyconic */
546
OGRErr CPL_DLL OSRSetPolyconic( OGRSpatialReferenceH hSRS,
547
                                double dfCenterLat, double dfCenterLong,
548
                                double dfFalseEasting, double dfFalseNorthing );
549

    
550
/** Polar Stereographic */
551
OGRErr CPL_DLL OSRSetPS( OGRSpatialReferenceH hSRS,
552
                         double dfCenterLat, double dfCenterLong,
553
                         double dfScale,
554
                         double dfFalseEasting, double dfFalseNorthing);
555
    
556
/** Robinson */
557
OGRErr CPL_DLL OSRSetRobinson( OGRSpatialReferenceH hSRS,
558
                               double dfCenterLong, 
559
                               double dfFalseEasting, double dfFalseNorthing );
560
    
561
/** Sinusoidal */
562
OGRErr CPL_DLL OSRSetSinusoidal( OGRSpatialReferenceH hSRS,
563
                                 double dfCenterLong, 
564
                                 double dfFalseEasting,
565
                                 double dfFalseNorthing );
566
    
567
/** Stereographic */
568
OGRErr CPL_DLL OSRSetStereographic( OGRSpatialReferenceH hSRS,
569
                                    double dfCenterLat, double dfCenterLong,
570
                                    double dfScale,
571
                                    double dfFalseEasting,
572
                                    double dfFalseNorthing);
573
    
574
/** Swiss Oblique Cylindrical */
575
OGRErr CPL_DLL OSRSetSOC( OGRSpatialReferenceH hSRS,
576
                          double dfLatitudeOfOrigin, double dfCentralMeridian,
577
                          double dfFalseEasting, double dfFalseNorthing );
578
    
579
/** Transverse Mercator */
580
OGRErr CPL_DLL OSRSetTM( OGRSpatialReferenceH hSRS,
581
                         double dfCenterLat, double dfCenterLong,
582
                         double dfScale,
583
                         double dfFalseEasting, double dfFalseNorthing );
584

    
585
/** Transverse Mercator variant */
586
OGRErr CPL_DLL OSRSetTMVariant( 
587
    OGRSpatialReferenceH hSRS, const char *pszVariantName,
588
    double dfCenterLat, double dfCenterLong,
589
    double dfScale,
590
    double dfFalseEasting, double dfFalseNorthing );
591

    
592
/** Tunesia Mining Grid  */
593
OGRErr CPL_DLL OSRSetTMG( OGRSpatialReferenceH hSRS,
594
                          double dfCenterLat, double dfCenterLong, 
595
                         double dfFalseEasting, double dfFalseNorthing );
596

    
597
/** Transverse Mercator (South Oriented) */
598
OGRErr CPL_DLL OSRSetTMSO( OGRSpatialReferenceH hSRS,
599
                           double dfCenterLat, double dfCenterLong,
600
                           double dfScale,
601
                           double dfFalseEasting, double dfFalseNorthing );
602

    
603
/** VanDerGrinten */
604
OGRErr CPL_DLL OSRSetVDG( OGRSpatialReferenceH hSRS,
605
                          double dfCenterLong,
606
                          double dfFalseEasting, double dfFalseNorthing );
607

    
608
/** Wagner I -- VII */
609
OGRErr CPL_DLL OSRSetWagner( OGRSpatialReferenceH hSRS, int nVariation,
610
                             double dfFalseEasting,
611
                             double dfFalseNorthing );
612

    
613
void CPL_DLL OSRCleanup( void );
614

    
615
/* -------------------------------------------------------------------- */
616
/*      OGRCoordinateTransform C API.                                   */
617
/* -------------------------------------------------------------------- */
618
OGRCoordinateTransformationH CPL_DLL CPL_STDCALL
619
OCTNewCoordinateTransformation( OGRSpatialReferenceH hSourceSRS,
620
                                OGRSpatialReferenceH hTargetSRS );
621
void CPL_DLL CPL_STDCALL 
622
      OCTDestroyCoordinateTransformation( OGRCoordinateTransformationH );
623

    
624
int CPL_DLL CPL_STDCALL
625
OCTTransform( OGRCoordinateTransformationH hCT,
626
              int nCount, double *x, double *y, double *z );
627

    
628
int CPL_DLL CPL_STDCALL
629
OCTTransformEx( OGRCoordinateTransformationH hCT,
630
                int nCount, double *x, double *y, double *z,
631
                int *pabSuccess );
632

    
633
/* this is really private to OGR. */
634
char *OCTProj4Normalize( const char *pszProj4Src );
635

    
636
/* -------------------------------------------------------------------- */
637
/*      Projection transform dictionary query.                          */
638
/* -------------------------------------------------------------------- */
639

    
640
char CPL_DLL ** OPTGetProjectionMethods();
641
char CPL_DLL ** OPTGetParameterList( const char * pszProjectionMethod,
642
                             char ** ppszUserName );
643
int CPL_DLL OPTGetParameterInfo( const char * pszProjectionMethod,
644
                                 const char * pszParameterName,
645
                                 char ** ppszUserName,
646
                                 char ** ppszType,
647
                                 double *pdfDefaultValue );
648

    
649
CPL_C_END
650

    
651
#endif /* ndef _OGR_SRS_API_H_INCLUDED */