Statistics
| Revision:

svn-gvsig-desktop / tags / v1_2_Build_1204 / libraries / libjni-gdal / include / ogr_srs_api.h @ 25533

History | View | Annotate | Download (29.4 KB)

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

    
193
#ifndef _OGR_SRS_API_H_INCLUDED
194
#define _OGR_SRS_API_H_INCLUDED
195

    
196
#include "ogr_core.h"
197

    
198
CPL_C_START
199

    
200
/**
201
 * \file ogr_srs_api.h
202
 * 
203
 * C spatial reference system services and defines.
204
 * 
205
 * See also: ogr_spatialref.h
206
 */
207

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

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

    
244
/* ==================================================================== */
245
/*      Some "standard" strings.                                        */
246
/* ==================================================================== */
247

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

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

    
305
#define SRS_PT_TUNISIA_MINING_GRID                                      \
306
                                "Tunisia_Mining_Grid"
307
#define SRS_PT_VANDERGRINTEN    "VanDerGrinten"
308
#define SRS_PT_KROVAK           "Krovak"
309

    
310
                                
311

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

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

    
351
#define SRS_UA_DEGREE           "degree"
352
#define SRS_UA_DEGREE_CONV                  "0.0174532925199433"
353
#define SRS_UA_RADIAN           "radian"
354

    
355
#define SRS_PM_GREENWICH        "Greenwich"
356

    
357
#define SRS_DN_NAD27            "North_American_Datum_1927"
358
#define SRS_DN_NAD83            "North_American_Datum_1983"
359
#define SRS_DN_WGS72            "WGS_1972"
360
#define SRS_DN_WGS84            "WGS_1984"
361

    
362
#define SRS_WGS84_SEMIMAJOR     6378137.0                                
363
#define SRS_WGS84_INVFLATTENING 298.257223563
364

    
365
/* -------------------------------------------------------------------- */
366
/*      C Wrappers for C++ objects and methods.                         */
367
/* -------------------------------------------------------------------- */
368
#ifndef _DEFINED_OGRSpatialReferenceH
369
#define _DEFINED_OGRSpatialReferenceH
370

    
371
typedef void *OGRSpatialReferenceH;                               
372
typedef void *OGRCoordinateTransformationH;
373

    
374
#endif
375

    
376

    
377
OGRSpatialReferenceH CPL_DLL
378
      OSRNewSpatialReference( const char * /* = NULL */);
379
OGRSpatialReferenceH CPL_DLL OSRCloneGeogCS( OGRSpatialReferenceH );
380
OGRSpatialReferenceH CPL_DLL OSRCloneCS( OGRSpatialReferenceH );
381
void CPL_DLL OSRDestroySpatialReference( OGRSpatialReferenceH );
382

    
383
int CPL_DLL OSRReference( OGRSpatialReferenceH );
384
int CPL_DLL OSRDereference( OGRSpatialReferenceH );
385

    
386
OGRErr CPL_DLL OSRValidate( OGRSpatialReferenceH );
387
OGRErr CPL_DLL OSRFixupOrdering( OGRSpatialReferenceH );
388
OGRErr CPL_DLL OSRFixup( OGRSpatialReferenceH );
389
OGRErr CPL_DLL OSRStripCTParms( OGRSpatialReferenceH );
390

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

    
411
OGRErr CPL_DLL OSRMorphToESRI( OGRSpatialReferenceH );
412
OGRErr CPL_DLL OSRMorphFromESRI( OGRSpatialReferenceH );
413

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

    
420
OGRErr CPL_DLL OSRSetAngularUnits( OGRSpatialReferenceH, const char *, double );
421
double CPL_DLL OSRGetAngularUnits( OGRSpatialReferenceH, char ** );
422
OGRErr CPL_DLL OSRSetLinearUnits( OGRSpatialReferenceH, const char *, double );
423
double CPL_DLL OSRGetLinearUnits( OGRSpatialReferenceH, char ** );
424

    
425
double CPL_DLL OSRGetPrimeMeridian( OGRSpatialReferenceH, char ** );
426

    
427
int CPL_DLL OSRIsGeographic( OGRSpatialReferenceH );
428
int CPL_DLL OSRIsLocal( OGRSpatialReferenceH );
429
int CPL_DLL OSRIsProjected( OGRSpatialReferenceH );
430
int CPL_DLL OSRIsSameGeogCS( OGRSpatialReferenceH, OGRSpatialReferenceH );
431
int CPL_DLL OSRIsSame( OGRSpatialReferenceH, OGRSpatialReferenceH );
432

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

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

    
457
double CPL_DLL OSRGetSemiMajor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
458
double CPL_DLL OSRGetSemiMinor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
459
double CPL_DLL OSRGetInvFlattening( OGRSpatialReferenceH, OGRErr * /*=NULL*/);
460

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

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

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

    
500
/** Cylindrical Equal Area */
501
OGRErr CPL_DLL OSRSetCEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian,
502
                        double dfFalseEasting, double dfFalseNorthing );
503

    
504
/** Cassini-Soldner */
505
OGRErr CPL_DLL OSRSetCS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
506
                       double dfFalseEasting, double dfFalseNorthing );
507

    
508
/** Equidistant Conic */
509
OGRErr CPL_DLL OSRSetEC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
510
                       double dfCenterLat, double dfCenterLong,
511
                       double dfFalseEasting, double dfFalseNorthing );
512

    
513
/** Eckert IV */
514
OGRErr CPL_DLL OSRSetEckertIV( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
515
                             double dfFalseEasting, double dfFalseNorthing );
516

    
517
/** Eckert VI */
518
OGRErr CPL_DLL OSRSetEckertVI( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
519
                             double dfFalseEasting, double dfFalseNorthing );
520

    
521
/** Equirectangular */
522
OGRErr CPL_DLL OSRSetEquirectangular(OGRSpatialReferenceH hSRS,
523
                              double dfCenterLat, double dfCenterLong,
524
                              double dfFalseEasting, double dfFalseNorthing );
525

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

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

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

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

    
555
/** Lambert Azimuthal Equal-Area */
556
OGRErr CPL_DLL OSRSetLAEA( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
557
                         double dfFalseEasting, double dfFalseNorthing );
558

    
559
/** Lambert Conformal Conic */
560
OGRErr CPL_DLL OSRSetLCC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
561
                        double dfCenterLat, double dfCenterLong,
562
                        double dfFalseEasting, double dfFalseNorthing );
563

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

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

    
578
/** Mercator */
579
OGRErr CPL_DLL OSRSetMercator( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
580
                             double dfScale, 
581
                             double dfFalseEasting, double dfFalseNorthing );
582

    
583
/** Mollweide */
584
OGRErr CPL_DLL  OSRSetMollweide( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
585
                              double dfFalseEasting, double dfFalseNorthing );
586

    
587
/** New Zealand Map Grid */
588
OGRErr CPL_DLL OSRSetNZMG( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
589
                         double dfFalseEasting, double dfFalseNorthing );
590

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

    
600
/** Polyconic */
601
OGRErr CPL_DLL OSRSetPolyconic( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
602
                              double dfFalseEasting, double dfFalseNorthing );
603

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

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

    
638
/** Tunesia Mining Grid  */
639
OGRErr CPL_DLL OSRSetTMG( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, 
640
                        double dfFalseEasting, double dfFalseNorthing );
641

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

    
648
/** VanDerGrinten */
649
OGRErr CPL_DLL OSRSetVDG( OGRSpatialReferenceH hSRS,
650
                          double dfCenterLong,
651
                          double dfFalseEasting, double dfFalseNorthing );
652

    
653
void CPL_DLL OSRCleanup( void );
654

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

    
664
int CPL_DLL OCTTransform( OGRCoordinateTransformationH hCT,
665
                  int nCount, double *x, double *y, double *z );
666
int CPL_DLL OCTTransformEx( OGRCoordinateTransformationH hCT,
667
                            int nCount, double *x, double *y, double *z,
668
                            int *pabSuccess );
669

    
670
/* this is really private to OGR. */
671
char *OCTProj4Normalize( const char *pszProj4Src );
672

    
673
/* -------------------------------------------------------------------- */
674
/*      Projection transform dictionary query.                          */
675
/* -------------------------------------------------------------------- */
676

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

    
686
CPL_C_END
687

    
688
#endif /* ndef _OGR_SRS_API_H_INCLUDED */