Statistics
| Revision:

root / tags / v1_9_Build_1245 / libraries / libjni-gdal-macosx / include / ogr_srs_api.h @ 34764

History | View | Annotate | Download (29.3 KB)

1
/******************************************************************************
2
 * $Id: ogr_srs_api.h 8219 2006-10-23 06:25:39Z nacho $
3
 *
4
 * Project:  OpenGIS Simple Features Reference Implementation
5
 * Purpose:  C API and constant declarations for OGR Spatial References.
6
 * Author:   Frank Warmerdam, warmerda@home.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
 * $Log$
31
 * Revision 1.1  2006-10-23 06:25:39  nacho
32
 * *** empty log message ***
33
 *
34
 * Revision 1.1  2006/06/29 16:23:27  nacho
35
 * *** empty log message ***
36
 *
37
 * Revision 1.2  2006/01/09 12:50:13  nacho
38
 * *** empty log message ***
39
 *
40
 * Revision 1.1  2005/07/27 08:22:55  igbrotru
41
 * *** empty log message ***
42
 *
43
 * Revision 1.1  2004/12/28 14:06:59  igbrotru
44
 * *** empty log message ***
45
 *
46
 * Revision 1.1  2004/12/28 13:32:25  igbrotru
47
 * *** empty log message ***
48
 *
49
 * Revision 1.46  2004/09/23 16:20:13  fwarmerdam
50
 * added OSRCleanup
51
 *
52
 * Revision 1.45  2004/05/12 19:25:54  dron
53
 * SRS_DN_WGS72 constant added.
54
 *
55
 * Revision 1.44  2004/05/10 17:05:14  warmerda
56
 * added AutoIdentifyEPSG()
57
 *
58
 * Revision 1.43  2004/05/06 19:26:04  dron
59
 * Added OSRSetProjection() function.
60
 *
61
 * Revision 1.42  2004/03/04 18:04:45  warmerda
62
 * added importFromDict() support
63
 *
64
 * Revision 1.41  2004/02/07 17:31:21  dron
65
 * Added OSRExportToUSGS() method.
66
 *
67
 * Revision 1.40  2004/02/05 17:07:59  dron
68
 * Support for HOM projection, specified by two points on centerline.
69
 *
70
 * Revision 1.39  2004/02/01 14:23:29  dron
71
 * Added OSRImportFromUSGS().
72
 *
73
 * Revision 1.38  2004/01/24 09:35:00  warmerda
74
 * added TransformEx support to capture per point reprojection failure
75
 *
76
 * Revision 1.37  2003/09/09 07:49:52  dron
77
 * Added OSRExportToPCI().
78
 *
79
 * Revision 1.36  2003/08/31 14:51:01  dron
80
 * Added OSRImportFromPCI().
81
 *
82
 * Revision 1.35  2003/08/18 13:26:01  warmerda
83
 * added SetTMVariant() and related definitions
84
 *
85
 * Revision 1.34  2003/06/21 23:24:36  warmerda
86
 * added Set/Get TOWGS84 calls
87
 *
88
 * Revision 1.33  2003/06/19 17:10:26  warmerda
89
 * a couple fixes in last commit
90
 *
91
 * Revision 1.32  2003/06/18 18:24:17  warmerda
92
 * added projection specific set methods to C API
93
 *
94
 * Revision 1.31  2003/06/10 09:31:12  dron
95
 * Added OSRSetAngularUnits() and OSRGetAngularUnits().
96
 *
97
 * Revision 1.30  2003/05/30 15:39:53  warmerda
98
 * Added override units capability for SetStatePlane()
99
 *
100
 * Revision 1.29  2003/03/21 22:15:11  warmerda
101
 * added C XML import/export entry points
102
 *
103
 * Revision 1.28  2003/03/12 14:29:34  warmerda
104
 * Rename OGRAxisOrientation and OGRDatumType values to avoid conflicts with
105
 * the real OGC definitions in applications such as Cadcorps.
106
 *
107
 * Revision 1.27  2003/02/25 04:53:38  warmerda
108
 * added OSRCopyGeogCSFrom
109
 *
110
 * Revision 1.26  2003/02/06 04:53:12  warmerda
111
 * added Fixup() method
112
 *
113
 * Revision 1.25  2003/01/08 18:14:28  warmerda
114
 * added FixupOrdering()
115
 *
116
 * Revision 1.24  2002/12/16 17:07:13  warmerda
117
 * added NormProjParm functions, and OSRGetPrimeMeridian
118
 *
119
 * Revision 1.23  2002/12/14 22:59:14  warmerda
120
 * added Krovak in ESRI compatible way
121
 *
122
 * Revision 1.22  2002/12/09 18:55:07  warmerda
123
 * moved DMS stuff to gdal/port
124
 *
125
 * Revision 1.21  2002/12/09 16:11:53  warmerda
126
 * added DMS translation
127
 *
128
 * Revision 1.20  2002/11/25 16:12:54  warmerda
129
 * added GetAuthorityCode/Name
130
 *
131
 * Revision 1.19  2002/09/26 18:13:25  warmerda
132
 * avoid double def
133
 *
134
 * Revision 1.18  2002/06/11 18:02:03  warmerda
135
 * add PROJ.4 normalization and EPSG support
136
 *
137
 * Revision 1.17  2001/10/11 19:27:12  warmerda
138
 * upgraded validation infrastructure
139
 *
140
 * Revision 1.16  2001/10/10 20:42:43  warmerda
141
 * added ESRI WKT morphing support
142
 *
143
 * Revision 1.15  2001/09/21 16:21:02  warmerda
144
 * added Clear(), and SetFromUserInput() methods
145
 *
146
 * Revision 1.14  2000/11/09 06:21:32  warmerda
147
 * added limited ESRI prj support
148
 *
149
 * Revision 1.13  2000/10/20 04:19:38  warmerda
150
 * added setstateplane
151
 *
152
 * Revision 1.12  2000/10/16 21:26:07  warmerda
153
 * added some level of LOCAL_CS support
154
 *
155
 * Revision 1.11  2000/09/01 20:58:01  warmerda
156
 * added CPL_DLL for entry points
157
 *
158
 * Revision 1.10  2000/08/30 20:06:14  warmerda
159
 * added projection method list functions
160
 *
161
 * Revision 1.9  2000/08/28 20:13:23  warmerda
162
 * added importFromProj4
163
 *
164
 * Revision 1.8  2000/07/11 01:02:06  warmerda
165
 * added ExportToProj4()
166
 *
167
 * Revision 1.7  2000/07/09 20:48:02  warmerda
168
 * added exportToPrettyWkt
169
 *
170
 * Revision 1.6  2000/05/30 22:45:44  warmerda
171
 * added OSRCloneGeogCS()
172
 *
173
 * Revision 1.5  2000/04/26 18:25:56  warmerda
174
 * added missing CPL_DLL attributes
175
 *
176
 * Revision 1.4  2000/03/22 01:09:43  warmerda
177
 * added SetProjCS and SetWellKnownTextCS
178
 *
179
 * Revision 1.3  2000/03/20 23:33:51  warmerda
180
 * updated docs a bit
181
 *
182
 * Revision 1.2  2000/03/20 22:39:31  warmerda
183
 * Added C API.
184
 *
185
 * Revision 1.1  2000/03/16 19:04:14  warmerda
186
 * New
187
 *
188
 */
189

    
190
#ifndef _OGR_SRS_API_H_INCLUDED
191
#define _OGR_SRS_API_H_INCLUDED
192

    
193
#include "ogr_core.h"
194

    
195
CPL_C_START
196

    
197
/**
198
 * \file ogr_srs_api.h
199
 * 
200
 * C spatial reference system services and defines.
201
 * 
202
 * See also: ogr_spatialref.h
203
 */
204

    
205
/* -------------------------------------------------------------------- */
206
/*      Axis orientations (corresponds to CS_AxisOrientationEnum).      */
207
/* -------------------------------------------------------------------- */
208
typedef enum {
209
    OAO_Other=0,
210
    OAO_North=1,
211
    OAO_South=2,
212
    OAO_East=3,
213
    OAO_West=4,
214
    OAO_Up=5,
215
    OAO_Down=6
216
} OGRAxisOrientation;
217
    
218
/* -------------------------------------------------------------------- */
219
/*      Datum types (corresponds to CS_DatumType).                      */
220
/* -------------------------------------------------------------------- */
221

    
222
typedef enum {
223
    ODT_HD_Min=1000,
224
    ODT_HD_Other=1000,
225
    ODT_HD_Classic=1001,
226
    ODT_HD_Geocentric=1002,
227
    ODT_HD_Max=1999,
228
    ODT_VD_Min=2000,
229
    ODT_VD_Other=2000,
230
    ODT_VD_Orthometric=2001,
231
    ODT_VD_Ellipsoidal=2002,
232
    ODT_VD_AltitudeBarometric=2003,
233
    ODT_VD_Normal=2004,
234
    ODT_VD_GeoidModelDerived=2005,
235
    ODT_VD_Depth=2006,
236
    ODT_VD_Max=2999,
237
    ODT_LD_Min=10000,
238
    ODT_LD_Max=32767
239
} OGRDatumType; 
240

    
241
/* ==================================================================== */
242
/*      Some "standard" strings.                                        */
243
/* ==================================================================== */
244

    
245
#define SRS_PT_ALBERS_CONIC_EQUAL_AREA                                  \
246
                                "Albers_Conic_Equal_Area"
247
#define SRS_PT_AZIMUTHAL_EQUIDISTANT "Azimuthal_Equidistant"
248
#define SRS_PT_CASSINI_SOLDNER  "Cassini_Soldner"
249
#define SRS_PT_CYLINDRICAL_EQUAL_AREA "Cylindrical_Equal_Area"
250
#define SRS_PT_ECKERT_IV        "Eckert_IV"
251
#define SRS_PT_ECKERT_VI        "Eckert_VI"
252
#define SRS_PT_EQUIDISTANT_CONIC "Equidistant_Conic"
253
#define SRS_PT_EQUIRECTANGULAR  "Equirectangular"
254
#define SRS_PT_GALL_STEREOGRAPHIC "Gall_Stereographic"
255
#define SRS_PT_GNOMONIC         "Gnomonic"
256
#define SRS_PT_HOTINE_OBLIQUE_MERCATOR                                  \
257
                                "Hotine_Oblique_Mercator"
258
#define SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN         \
259
                            "Hotine_Oblique_Mercator_Two_Point_Natural_Origin"
260
#define SRS_PT_LABORDE_OBLIQUE_MERCATOR                                 \
261
                                "Laborde_Oblique_Mercator"
262
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP                              \
263
                                "Lambert_Conformal_Conic_1SP"
264
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP                              \
265
                                "Lambert_Conformal_Conic_2SP"
266
#define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM                      \
267
                                "Lambert_Conformal_Conic_2SP_Belgium)"
268
#define SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA                     \
269
                                "Lambert_Azimuthal_Equal_Area"
270
#define SRS_PT_MERCATOR_1SP     "Mercator_1SP"
271
#define SRS_PT_MERCATOR_2SP     "Mercator_2SP"
272
#define SRS_PT_MILLER_CYLINDRICAL "Miller_Cylindrical"
273
#define SRS_PT_MOLLWEIDE        "Mollweide"
274
#define SRS_PT_NEW_ZEALAND_MAP_GRID                                     \
275
                                "New_Zealand_Map_Grid"
276
#define SRS_PT_OBLIQUE_STEREOGRAPHIC                                    \
277
                                "Oblique_Stereographic"
278
#define SRS_PT_ORTHOGRAPHIC     "Orthographic"
279
#define SRS_PT_POLAR_STEREOGRAPHIC                                      \
280
                                "Polar_Stereographic"
281
#define SRS_PT_POLYCONIC        "Polyconic"
282
#define SRS_PT_ROBINSON         "Robinson"
283
#define SRS_PT_SINUSOIDAL       "Sinusoidal"
284
#define SRS_PT_STEREOGRAPHIC    "Stereographic"
285
#define SRS_PT_SWISS_OBLIQUE_CYLINDRICAL                                \
286
                                "Swiss_Oblique_Cylindrical"
287
#define SRS_PT_TRANSVERSE_MERCATOR                                      \
288
                                "Transverse_Mercator"
289
#define SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED                       \
290
                                "Transverse_Mercator_South_Orientated"
291

    
292
/* special mapinfo variants on Transverse Mercator */
293
#define SRS_PT_TRANSVERSE_MERCATOR_MI_22 \
294
                                "Transverse_Mercator_MapInfo_22"
295
#define SRS_PT_TRANSVERSE_MERCATOR_MI_23 \
296
                                "Transverse_Mercator_MapInfo_23"
297
#define SRS_PT_TRANSVERSE_MERCATOR_MI_24 \
298
                                "Transverse_Mercator_MapInfo_24"
299
#define SRS_PT_TRANSVERSE_MERCATOR_MI_25 \
300
                                "Transverse_Mercator_MapInfo_25"
301

    
302
#define SRS_PT_TUNISIA_MINING_GRID                                      \
303
                                "Tunisia_Mining_Grid"
304
#define SRS_PT_VANDERGRINTEN    "VanDerGrinten"
305
#define SRS_PT_KROVAK           "Krovak"
306

    
307
                                
308

    
309
#define SRS_PP_CENTRAL_MERIDIAN         "central_meridian"
310
#define SRS_PP_SCALE_FACTOR             "scale_factor"
311
#define SRS_PP_STANDARD_PARALLEL_1      "standard_parallel_1"
312
#define SRS_PP_STANDARD_PARALLEL_2      "standard_parallel_2"
313
#define SRS_PP_PSEUDO_STD_PARALLEL_1    "pseudo_standard_parallel_1"
314
#define SRS_PP_LONGITUDE_OF_CENTER      "longitude_of_center"
315
#define SRS_PP_LATITUDE_OF_CENTER       "latitude_of_center"
316
#define SRS_PP_LONGITUDE_OF_ORIGIN      "longitude_of_origin"
317
#define SRS_PP_LATITUDE_OF_ORIGIN       "latitude_of_origin"
318
#define SRS_PP_FALSE_EASTING            "false_easting"
319
#define SRS_PP_FALSE_NORTHING           "false_northing"
320
#define SRS_PP_AZIMUTH                  "azimuth"
321
#define SRS_PP_LONGITUDE_OF_POINT_1     "longitude_of_point_1"
322
#define SRS_PP_LATITUDE_OF_POINT_1      "latitude_of_point_1"
323
#define SRS_PP_LONGITUDE_OF_POINT_2     "longitude_of_point_2"
324
#define SRS_PP_LATITUDE_OF_POINT_2      "latitude_of_point_2"
325
#define SRS_PP_LONGITUDE_OF_POINT_3     "longitude_of_point_3"
326
#define SRS_PP_LATITUDE_OF_POINT_3      "latitude_of_point_3"
327
#define SRS_PP_RECTIFIED_GRID_ANGLE     "rectified_grid_angle"
328
#define SRS_PP_LANDSAT_NUMBER           "landsat_number"
329
#define SRS_PP_PATH_NUMBER              "path_number"
330
#define SRS_PP_PERSPECTIVE_POINT_HEIGHT "perspective_point_height"
331
#define SRS_PP_FIPSZONE                 "fipszone"
332
#define SRS_PP_ZONE                     "zone"
333

    
334
#define SRS_UL_METER            "Meter"
335
#define SRS_UL_FOOT             "Foot (International)" /* or just "FOOT"? */
336
#define SRS_UL_FOOT_CONV                    "0.3048"
337
#define SRS_UL_US_FOOT          "U.S. Foot" /* or "US survey foot" */
338
#define SRS_UL_US_FOOT_CONV                 "0.3048006"
339
#define SRS_UL_NAUTICAL_MILE    "Nautical Mile"
340
#define SRS_UL_NAUTICAL_MILE_CONV           "1852.0"
341
#define SRS_UL_LINK             "Link"          /* Based on US Foot */
342
#define SRS_UL_LINK_CONV                    "0.20116684023368047"
343
#define SRS_UL_CHAIN            "Chain"         /* based on US Foot */
344
#define SRS_UL_CHAIN_CONV                   "2.0116684023368047"
345
#define SRS_UL_ROD              "Rod"           /* based on US Foot */
346
#define SRS_UL_ROD_CONV                     "5.02921005842012"
347

    
348
#define SRS_UA_DEGREE           "degree"
349
#define SRS_UA_DEGREE_CONV                  "0.0174532925199433"
350
#define SRS_UA_RADIAN           "radian"
351

    
352
#define SRS_PM_GREENWICH        "Greenwich"
353

    
354
#define SRS_DN_NAD27            "North_American_Datum_1927"
355
#define SRS_DN_NAD83            "North_American_Datum_1983"
356
#define SRS_DN_WGS72            "WGS_1972"
357
#define SRS_DN_WGS84            "WGS_1984"
358

    
359
#define SRS_WGS84_SEMIMAJOR     6378137.0                                
360
#define SRS_WGS84_INVFLATTENING 298.257223563
361

    
362
/* -------------------------------------------------------------------- */
363
/*      C Wrappers for C++ objects and methods.                         */
364
/* -------------------------------------------------------------------- */
365
#ifndef _DEFINED_OGRSpatialReferenceH
366
#define _DEFINED_OGRSpatialReferenceH
367

    
368
typedef void *OGRSpatialReferenceH;                               
369
typedef void *OGRCoordinateTransformationH;
370

    
371
#endif
372

    
373

    
374
OGRSpatialReferenceH CPL_DLL
375
      OSRNewSpatialReference( const char * /* = NULL */);
376
OGRSpatialReferenceH CPL_DLL OSRCloneGeogCS( OGRSpatialReferenceH );
377
OGRSpatialReferenceH CPL_DLL OSRCloneCS( OGRSpatialReferenceH );
378
void CPL_DLL OSRDestroySpatialReference( OGRSpatialReferenceH );
379

    
380
int CPL_DLL OSRReference( OGRSpatialReferenceH );
381
int CPL_DLL OSRDereference( OGRSpatialReferenceH );
382

    
383
OGRErr CPL_DLL OSRValidate( OGRSpatialReferenceH );
384
OGRErr CPL_DLL OSRFixupOrdering( OGRSpatialReferenceH );
385
OGRErr CPL_DLL OSRFixup( OGRSpatialReferenceH );
386
OGRErr CPL_DLL OSRStripCTParms( OGRSpatialReferenceH );
387

    
388
OGRErr CPL_DLL OSRImportFromEPSG( OGRSpatialReferenceH, int );
389
OGRErr CPL_DLL OSRImportFromWkt( OGRSpatialReferenceH, char ** );
390
OGRErr CPL_DLL OSRImportFromProj4( OGRSpatialReferenceH, const char *);
391
OGRErr CPL_DLL OSRImportFromESRI( OGRSpatialReferenceH, char **);
392
OGRErr CPL_DLL OSRImportFromPCI( OGRSpatialReferenceH hSRS, const char *,
393
                                 const char *, double * );
394
OGRErr CPL_DLL OSRImportFromUSGS( OGRSpatialReferenceH,
395
                                  long, long, double *, long);
396
OGRErr CPL_DLL OSRImportFromXML( OGRSpatialReferenceH, const char * );
397
OGRErr CPL_DLL OSRImportFromDict( OGRSpatialReferenceH, const char *, 
398
                                  const char * );
399
OGRErr CPL_DLL OSRExportToWkt( OGRSpatialReferenceH, char ** );
400
OGRErr CPL_DLL OSRExportToPrettyWkt( OGRSpatialReferenceH, char **, int);
401
OGRErr CPL_DLL OSRExportToProj4( OGRSpatialReferenceH, char **);
402
OGRErr CPL_DLL OSRExportToPCI( OGRSpatialReferenceH, char **, char **,
403
                               double ** );
404
OGRErr CPL_DLL OSRExportToUSGS( OGRSpatialReferenceH, long *, long *,
405
                                double **, long * );
406
OGRErr CPL_DLL OSRExportToXML( OGRSpatialReferenceH, char **, const char * );
407

    
408
OGRErr CPL_DLL OSRMorphToESRI( OGRSpatialReferenceH );
409
OGRErr CPL_DLL OSRMorphFromESRI( OGRSpatialReferenceH );
410

    
411
OGRErr CPL_DLL OSRSetAttrValue( OGRSpatialReferenceH hSRS,
412
                                const char * pszNodePath,
413
                                const char * pszNewNodeValue );
414
const char CPL_DLL * OSRGetAttrValue( OGRSpatialReferenceH hSRS,
415
                           const char * pszName, int iChild /* = 0 */ );
416

    
417
OGRErr CPL_DLL OSRSetAngularUnits( OGRSpatialReferenceH, const char *, double );
418
double CPL_DLL OSRGetAngularUnits( OGRSpatialReferenceH, char ** );
419
OGRErr CPL_DLL OSRSetLinearUnits( OGRSpatialReferenceH, const char *, double );
420
double CPL_DLL OSRGetLinearUnits( OGRSpatialReferenceH, char ** );
421

    
422
double CPL_DLL OSRGetPrimeMeridian( OGRSpatialReferenceH, char ** );
423

    
424
int CPL_DLL OSRIsGeographic( OGRSpatialReferenceH );
425
int CPL_DLL OSRIsLocal( OGRSpatialReferenceH );
426
int CPL_DLL OSRIsProjected( OGRSpatialReferenceH );
427
int CPL_DLL OSRIsSameGeogCS( OGRSpatialReferenceH, OGRSpatialReferenceH );
428
int CPL_DLL OSRIsSame( OGRSpatialReferenceH, OGRSpatialReferenceH );
429

    
430
OGRErr CPL_DLL OSRSetLocalCS( OGRSpatialReferenceH hSRS, const char *pszName );
431
OGRErr CPL_DLL OSRSetProjCS( OGRSpatialReferenceH hSRS, const char * pszName );
432
OGRErr CPL_DLL OSRSetWellKnownGeogCS( OGRSpatialReferenceH hSRS,
433
                                      const char * pszName );
434
OGRErr CPL_DLL OSRSetFromUserInput( OGRSpatialReferenceH hSRS, 
435
                                    const char * );
436
OGRErr CPL_DLL OSRCopyGeogCSFrom( OGRSpatialReferenceH hSRS, 
437
                                  OGRSpatialReferenceH hSrcSRS );
438
OGRErr CPL_DLL OSRSetTOWGS84( OGRSpatialReferenceH hSRS, 
439
                              double, double, double, 
440
                              double, double, double, double );
441
OGRErr CPL_DLL OSRGetTOWGS84( OGRSpatialReferenceH hSRS, double *, int );
442
                        
443

    
444
OGRErr CPL_DLL OSRSetGeogCS( OGRSpatialReferenceH hSRS,
445
                      const char * pszGeogName,
446
                      const char * pszDatumName,
447
                      const char * pszEllipsoidName,
448
                      double dfSemiMajor, double dfInvFlattening,
449
                      const char * pszPMName /* = NULL */,
450
                      double dfPMOffset /* = 0.0 */,
451
                      const char * pszUnits /* = NULL */,
452
                      double dfConvertToRadians /* = 0.0 */ );
453

    
454
double CPL_DLL OSRGetSemiMajor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
455
double CPL_DLL OSRGetSemiMinor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
456
double CPL_DLL OSRGetInvFlattening( OGRSpatialReferenceH, OGRErr * /*=NULL*/);
457

    
458
OGRErr CPL_DLL OSRSetAuthority( OGRSpatialReferenceH hSRS,
459
                         const char * pszTargetKey,
460
                         const char * pszAuthority,
461
                         int nCode );
462
const char CPL_DLL *OSRGetAuthorityCode( OGRSpatialReferenceH hSRS,
463
                                         const char * pszTargetKey );
464
const char CPL_DLL *OSRGetAuthorityName( OGRSpatialReferenceH hSRS,
465
                                         const char * pszTargetKey );
466
OGRErr CPL_DLL OSRSetProjection( OGRSpatialReferenceH, const char * );
467
OGRErr CPL_DLL OSRSetProjParm( OGRSpatialReferenceH, const char *, double );
468
double CPL_DLL OSRGetProjParm( OGRSpatialReferenceH hSRS,
469
                        const char * pszParmName, 
470
                        double dfDefault /* = 0.0 */,
471
                        OGRErr * /* = NULL */ );
472
OGRErr CPL_DLL OSRSetNormProjParm( OGRSpatialReferenceH, const char *, double);
473
double CPL_DLL OSRGetNormProjParm( OGRSpatialReferenceH hSRS,
474
                                   const char * pszParmName, 
475
                                   double dfDefault /* = 0.0 */,
476
                                   OGRErr * /* = NULL */ );
477

    
478
OGRErr CPL_DLL OSRSetUTM( OGRSpatialReferenceH hSRS, int nZone, int bNorth );
479
int    CPL_DLL OSRGetUTMZone( OGRSpatialReferenceH hSRS, int *pbNorth );
480
OGRErr CPL_DLL OSRSetStatePlane( OGRSpatialReferenceH hSRS, 
481
                                 int nZone, int bNAD83 );
482
OGRErr CPL_DLL OSRSetStatePlaneWithUnits( OGRSpatialReferenceH hSRS, 
483
                                          int nZone, int bNAD83,
484
                                          const char *pszOverrideUnitName,
485
                                          double dfOverrideUnit );
486
OGRErr CPL_DLL OSRAutoIdentifyEPSG( OGRSpatialReferenceH hSRS );
487

    
488
/** Albers Conic Equal Area */
489
OGRErr CPL_DLL OSRSetACEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
490
                         double dfCenterLat, double dfCenterLong,
491
                         double dfFalseEasting, double dfFalseNorthing );
492
    
493
/** Azimuthal Equidistant */
494
OGRErr CPL_DLL  OSRSetAE( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
495
                       double dfFalseEasting, double dfFalseNorthing );
496

    
497
/** Cylindrical Equal Area */
498
OGRErr CPL_DLL OSRSetCEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian,
499
                        double dfFalseEasting, double dfFalseNorthing );
500

    
501
/** Cassini-Soldner */
502
OGRErr CPL_DLL OSRSetCS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
503
                       double dfFalseEasting, double dfFalseNorthing );
504

    
505
/** Equidistant Conic */
506
OGRErr CPL_DLL OSRSetEC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
507
                       double dfCenterLat, double dfCenterLong,
508
                       double dfFalseEasting, double dfFalseNorthing );
509

    
510
/** Eckert IV */
511
OGRErr CPL_DLL OSRSetEckertIV( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
512
                             double dfFalseEasting, double dfFalseNorthing );
513

    
514
/** Eckert VI */
515
OGRErr CPL_DLL OSRSetEckertVI( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
516
                             double dfFalseEasting, double dfFalseNorthing );
517

    
518
/** Equirectangular */
519
OGRErr CPL_DLL OSRSetEquirectangular(OGRSpatialReferenceH hSRS,
520
                              double dfCenterLat, double dfCenterLong,
521
                              double dfFalseEasting, double dfFalseNorthing );
522

    
523
/** Gall Stereograpic */
524
OGRErr CPL_DLL OSRSetGS( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
525
                       double dfFalseEasting, double dfFalseNorthing );
526
    
527
/** Gnomonic */
528
OGRErr CPL_DLL OSRSetGnomonic(OGRSpatialReferenceH hSRS,
529
                              double dfCenterLat, double dfCenterLong,
530
                            double dfFalseEasting, double dfFalseNorthing );
531

    
532
/** Hotine Oblique Mercator using azimuth angle */
533
OGRErr CPL_DLL OSRSetHOM( OGRSpatialReferenceH hSRS,
534
                          double dfCenterLat, double dfCenterLong,
535
                          double dfAzimuth, double dfRectToSkew,
536
                          double dfScale,
537
                          double dfFalseEasting, double dfFalseNorthing );
538

    
539
/** Hotine Oblique Mercator using two points on centerline */
540
OGRErr CPL_DLL OSRSetHOM2PNO( OGRSpatialReferenceH hSRS, double dfCenterLat,
541
                              double dfLat1, double dfLong1,
542
                              double dfLat2, double dfLong2,
543
                              double dfScale,
544
                              double dfFalseEasting, double dfFalseNorthing );
545

    
546
/** Krovak Oblique Conic Conformal */
547
OGRErr CPL_DLL OSRSetKrovak( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
548
                           double dfAzimuth, double dfPseudoStdParallelLat,
549
                           double dfScale, 
550
                           double dfFalseEasting, double dfFalseNorthing );
551

    
552
/** Lambert Azimuthal Equal-Area */
553
OGRErr CPL_DLL OSRSetLAEA( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
554
                         double dfFalseEasting, double dfFalseNorthing );
555

    
556
/** Lambert Conformal Conic */
557
OGRErr CPL_DLL OSRSetLCC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
558
                        double dfCenterLat, double dfCenterLong,
559
                        double dfFalseEasting, double dfFalseNorthing );
560

    
561
/** Lambert Conformal Conic 1SP */
562
OGRErr CPL_DLL OSRSetLCC1SP( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
563
                           double dfScale,
564
                           double dfFalseEasting, double dfFalseNorthing );
565

    
566
/** Lambert Conformal Conic (Belgium) */
567
OGRErr CPL_DLL OSRSetLCCB( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
568
                         double dfCenterLat, double dfCenterLong,
569
                         double dfFalseEasting, double dfFalseNorthing );
570
    
571
/** Miller Cylindrical */
572
OGRErr CPL_DLL OSRSetMC( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
573
                       double dfFalseEasting, double dfFalseNorthing );
574

    
575
/** Mercator */
576
OGRErr CPL_DLL OSRSetMercator( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
577
                             double dfScale, 
578
                             double dfFalseEasting, double dfFalseNorthing );
579

    
580
/** Mollweide */
581
OGRErr CPL_DLL  OSRSetMollweide( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
582
                              double dfFalseEasting, double dfFalseNorthing );
583

    
584
/** New Zealand Map Grid */
585
OGRErr CPL_DLL OSRSetNZMG( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
586
                         double dfFalseEasting, double dfFalseNorthing );
587

    
588
/** Oblique Stereographic */
589
OGRErr CPL_DLL OSRSetOS( OGRSpatialReferenceH hSRS, double dfOriginLat, double dfCMeridian,
590
                       double dfScale,
591
                       double dfFalseEasting,double dfFalseNorthing);
592
    
593
/** Orthographic */
594
OGRErr CPL_DLL OSRSetOrthographic( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
595
                                 double dfFalseEasting,double dfFalseNorthing);
596

    
597
/** Polyconic */
598
OGRErr CPL_DLL OSRSetPolyconic( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
599
                              double dfFalseEasting, double dfFalseNorthing );
600

    
601
/** Polar Stereographic */
602
OGRErr CPL_DLL OSRSetPS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
603
                       double dfScale,
604
                       double dfFalseEasting, double dfFalseNorthing);
605
    
606
/** Robinson */
607
OGRErr CPL_DLL OSRSetRobinson( OGRSpatialReferenceH hSRS, double dfCenterLong, 
608
                             double dfFalseEasting, double dfFalseNorthing );
609
    
610
/** Sinusoidal */
611
OGRErr CPL_DLL OSRSetSinusoidal( OGRSpatialReferenceH hSRS, double dfCenterLong, 
612
                               double dfFalseEasting, double dfFalseNorthing );
613
    
614
/** Stereographic */
615
OGRErr CPL_DLL OSRSetStereographic( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
616
                                  double dfScale,
617
                                 double dfFalseEasting,double dfFalseNorthing);
618
    
619
/** Swiss Oblique Cylindrical */
620
OGRErr CPL_DLL OSRSetSOC( OGRSpatialReferenceH hSRS, double dfLatitudeOfOrigin, double dfCentralMeridian,
621
                        double dfFalseEasting, double dfFalseNorthing );
622
    
623
/** Transverse Mercator */
624
OGRErr CPL_DLL OSRSetTM( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
625
                       double dfScale,
626
                       double dfFalseEasting, double dfFalseNorthing );
627

    
628
/** Transverse Mercator variant */
629
OGRErr CPL_DLL OSRSetTMVariant( 
630
    OGRSpatialReferenceH hSRS, const char *pszVariantName,
631
    double dfCenterLat, double dfCenterLong,
632
    double dfScale,
633
    double dfFalseEasting, double dfFalseNorthing );
634

    
635
/** Tunesia Mining Grid  */
636
OGRErr CPL_DLL OSRSetTMG( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, 
637
                        double dfFalseEasting, double dfFalseNorthing );
638

    
639
/** Transverse Mercator (South Oriented) */
640
OGRErr CPL_DLL OSRSetTMSO( OGRSpatialReferenceH hSRS,
641
                           double dfCenterLat, double dfCenterLong,
642
                           double dfScale,
643
                           double dfFalseEasting, double dfFalseNorthing );
644

    
645
/** VanDerGrinten */
646
OGRErr CPL_DLL OSRSetVDG( OGRSpatialReferenceH hSRS,
647
                          double dfCenterLong,
648
                          double dfFalseEasting, double dfFalseNorthing );
649

    
650
void CPL_DLL OSRCleanup( void );
651

    
652
/* -------------------------------------------------------------------- */
653
/*      OGRCoordinateTransform C API.                                   */
654
/* -------------------------------------------------------------------- */
655
OGRCoordinateTransformationH CPL_DLL
656
OCTNewCoordinateTransformation( OGRSpatialReferenceH hSourceSRS,
657
                                OGRSpatialReferenceH hTargetSRS );
658
void CPL_DLL
659
      OCTDestroyCoordinateTransformation( OGRCoordinateTransformationH );
660

    
661
int CPL_DLL OCTTransform( OGRCoordinateTransformationH hCT,
662
                  int nCount, double *x, double *y, double *z );
663
int CPL_DLL OCTTransformEx( OGRCoordinateTransformationH hCT,
664
                            int nCount, double *x, double *y, double *z,
665
                            int *pabSuccess );
666

    
667
/* this is really private to OGR. */
668
char *OCTProj4Normalize( const char *pszProj4Src );
669

    
670
/* -------------------------------------------------------------------- */
671
/*      Projection transform dictionary query.                          */
672
/* -------------------------------------------------------------------- */
673

    
674
char CPL_DLL ** OPTGetProjectionMethods();
675
char CPL_DLL ** OPTGetParameterList( const char * pszProjectionMethod,
676
                             char ** ppszUserName );
677
int CPL_DLL OPTGetParameterInfo( const char * pszProjectionMethod,
678
                                 const char * pszParameterName,
679
                                 char ** ppszUserName,
680
                                 char ** ppszType,
681
                                 double *pdfDefaultValue );
682

    
683
CPL_C_END
684

    
685
#endif /* ndef _OGR_SRS_API_H_INCLUDED */