ogr_srs_api.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * $Id: ogr_srs_api.h,v 1.54 2005/10/03 18:13:28 fwarmerdam Exp $
00003  *
00004  * Project:  OpenGIS Simple Features Reference Implementation
00005  * Purpose:  C API and constant declarations for OGR Spatial References.
00006  * Author:   Frank Warmerdam, warmerda@home.com
00007  *
00008  ******************************************************************************
00009  * Copyright (c) 2000, Frank Warmerdam
00010  *
00011  * Permission is hereby granted, free of charge, to any person obtaining a
00012  * copy of this software and associated documentation files (the "Software"),
00013  * to deal in the Software without restriction, including without limitation
00014  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00015  * and/or sell copies of the Software, and to permit persons to whom the
00016  * Software is furnished to do so, subject to the following conditions:
00017  *
00018  * The above copyright notice and this permission notice shall be included
00019  * in all copies or substantial portions of the Software.
00020  *
00021  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00022  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00023  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00024  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00025  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00026  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00027  * DEALINGS IN THE SOFTWARE.
00028  ******************************************************************************
00029  *
00030  * $Log: ogr_srs_api.h,v $
00031  * Revision 1.54  2005/10/03 18:13:28  fwarmerdam
00032  * Fixed prototype for OSRSetGEOS().
00033  *
00034  * Revision 1.53  2005/09/21 00:50:08  fwarmerdam
00035  * Added Release
00036  *
00037  * Revision 1.52  2005/05/09 15:39:44  fwarmerdam
00038  * Added TM_MI_21 as per email from Safe.
00039  *
00040  * Revision 1.51  2005/04/06 00:02:05  fwarmerdam
00041  * various osr and oct functions now stdcall
00042  *
00043  * Revision 1.50  2005/02/17 16:34:17  fwarmerdam
00044  * OSRCloneCS() should be OSRClone().
00045  *
00046  * Revision 1.49  2005/02/11 14:21:28  fwarmerdam
00047  * added GEOS projection support
00048  *
00049  * Revision 1.48  2005/01/05 21:02:33  fwarmerdam
00050  * added Goode Homolosine
00051  *
00052  * Revision 1.47  2004/11/11 18:28:45  fwarmerdam
00053  * added Bonne projection support
00054  *
00055  * Revision 1.46  2004/09/23 16:20:13  fwarmerdam
00056  * added OSRCleanup
00057  *
00058  * Revision 1.45  2004/05/12 19:25:54  dron
00059  * SRS_DN_WGS72 constant added.
00060  *
00061  * Revision 1.44  2004/05/10 17:05:14  warmerda
00062  * added AutoIdentifyEPSG()
00063  *
00064  * Revision 1.43  2004/05/06 19:26:04  dron
00065  * Added OSRSetProjection() function.
00066  *
00067  * Revision 1.42  2004/03/04 18:04:45  warmerda
00068  * added importFromDict() support
00069  *
00070  * Revision 1.41  2004/02/07 17:31:21  dron
00071  * Added OSRExportToUSGS() method.
00072  *
00073  * Revision 1.40  2004/02/05 17:07:59  dron
00074  * Support for HOM projection, specified by two points on centerline.
00075  *
00076  * Revision 1.39  2004/02/01 14:23:29  dron
00077  * Added OSRImportFromUSGS().
00078  *
00079  * Revision 1.38  2004/01/24 09:35:00  warmerda
00080  * added TransformEx support to capture per point reprojection failure
00081  *
00082  * Revision 1.37  2003/09/09 07:49:52  dron
00083  * Added OSRExportToPCI().
00084  *
00085  * Revision 1.36  2003/08/31 14:51:01  dron
00086  * Added OSRImportFromPCI().
00087  *
00088  * Revision 1.35  2003/08/18 13:26:01  warmerda
00089  * added SetTMVariant() and related definitions
00090  *
00091  * Revision 1.34  2003/06/21 23:24:36  warmerda
00092  * added Set/Get TOWGS84 calls
00093  *
00094  * Revision 1.33  2003/06/19 17:10:26  warmerda
00095  * a couple fixes in last commit
00096  *
00097  * Revision 1.32  2003/06/18 18:24:17  warmerda
00098  * added projection specific set methods to C API
00099  *
00100  * Revision 1.31  2003/06/10 09:31:12  dron
00101  * Added OSRSetAngularUnits() and OSRGetAngularUnits().
00102  *
00103  * Revision 1.30  2003/05/30 15:39:53  warmerda
00104  * Added override units capability for SetStatePlane()
00105  *
00106  * Revision 1.29  2003/03/21 22:15:11  warmerda
00107  * added C XML import/export entry points
00108  *
00109  * Revision 1.28  2003/03/12 14:29:34  warmerda
00110  * Rename OGRAxisOrientation and OGRDatumType values to avoid conflicts with
00111  * the real OGC definitions in applications such as Cadcorps.
00112  *
00113  * Revision 1.27  2003/02/25 04:53:38  warmerda
00114  * added OSRCopyGeogCSFrom
00115  *
00116  * Revision 1.26  2003/02/06 04:53:12  warmerda
00117  * added Fixup() method
00118  *
00119  * Revision 1.25  2003/01/08 18:14:28  warmerda
00120  * added FixupOrdering()
00121  *
00122  * Revision 1.24  2002/12/16 17:07:13  warmerda
00123  * added NormProjParm functions, and OSRGetPrimeMeridian
00124  *
00125  * Revision 1.23  2002/12/14 22:59:14  warmerda
00126  * added Krovak in ESRI compatible way
00127  *
00128  * Revision 1.22  2002/12/09 18:55:07  warmerda
00129  * moved DMS stuff to gdal/port
00130  *
00131  * Revision 1.21  2002/12/09 16:11:53  warmerda
00132  * added DMS translation
00133  *
00134  * Revision 1.20  2002/11/25 16:12:54  warmerda
00135  * added GetAuthorityCode/Name
00136  *
00137  * Revision 1.19  2002/09/26 18:13:25  warmerda
00138  * avoid double def
00139  *
00140  * Revision 1.18  2002/06/11 18:02:03  warmerda
00141  * add PROJ.4 normalization and EPSG support
00142  *
00143  * Revision 1.17  2001/10/11 19:27:12  warmerda
00144  * upgraded validation infrastructure
00145  *
00146  * Revision 1.16  2001/10/10 20:42:43  warmerda
00147  * added ESRI WKT morphing support
00148  *
00149  * Revision 1.15  2001/09/21 16:21:02  warmerda
00150  * added Clear(), and SetFromUserInput() methods
00151  *
00152  * Revision 1.14  2000/11/09 06:21:32  warmerda
00153  * added limited ESRI prj support
00154  *
00155  * Revision 1.13  2000/10/20 04:19:38  warmerda
00156  * added setstateplane
00157  *
00158  * Revision 1.12  2000/10/16 21:26:07  warmerda
00159  * added some level of LOCAL_CS support
00160  *
00161  * Revision 1.11  2000/09/01 20:58:01  warmerda
00162  * added CPL_DLL for entry points
00163  *
00164  * Revision 1.10  2000/08/30 20:06:14  warmerda
00165  * added projection method list functions
00166  *
00167  * Revision 1.9  2000/08/28 20:13:23  warmerda
00168  * added importFromProj4
00169  *
00170  * Revision 1.8  2000/07/11 01:02:06  warmerda
00171  * added ExportToProj4()
00172  *
00173  * Revision 1.7  2000/07/09 20:48:02  warmerda
00174  * added exportToPrettyWkt
00175  *
00176  * Revision 1.6  2000/05/30 22:45:44  warmerda
00177  * added OSRCloneGeogCS()
00178  *
00179  * Revision 1.5  2000/04/26 18:25:56  warmerda
00180  * added missing CPL_DLL attributes
00181  *
00182  * Revision 1.4  2000/03/22 01:09:43  warmerda
00183  * added SetProjCS and SetWellKnownTextCS
00184  *
00185  * Revision 1.3  2000/03/20 23:33:51  warmerda
00186  * updated docs a bit
00187  *
00188  * Revision 1.2  2000/03/20 22:39:31  warmerda
00189  * Added C API.
00190  *
00191  * Revision 1.1  2000/03/16 19:04:14  warmerda
00192  * New
00193  *
00194  */
00195 
00196 #ifndef _OGR_SRS_API_H_INCLUDED
00197 #define _OGR_SRS_API_H_INCLUDED
00198 
00199 #include "ogr_core.h"
00200 
00201 CPL_C_START
00202 
00211 /* -------------------------------------------------------------------- */
00212 /*      Axis orientations (corresponds to CS_AxisOrientationEnum).      */
00213 /* -------------------------------------------------------------------- */
00214 typedef enum {
00215     OAO_Other=0,
00216     OAO_North=1,
00217     OAO_South=2,
00218     OAO_East=3,
00219     OAO_West=4,
00220     OAO_Up=5,
00221     OAO_Down=6
00222 } OGRAxisOrientation;
00223     
00224 /* -------------------------------------------------------------------- */
00225 /*      Datum types (corresponds to CS_DatumType).                      */
00226 /* -------------------------------------------------------------------- */
00227 
00228 typedef enum {
00229     ODT_HD_Min=1000,
00230     ODT_HD_Other=1000,
00231     ODT_HD_Classic=1001,
00232     ODT_HD_Geocentric=1002,
00233     ODT_HD_Max=1999,
00234     ODT_VD_Min=2000,
00235     ODT_VD_Other=2000,
00236     ODT_VD_Orthometric=2001,
00237     ODT_VD_Ellipsoidal=2002,
00238     ODT_VD_AltitudeBarometric=2003,
00239     ODT_VD_Normal=2004,
00240     ODT_VD_GeoidModelDerived=2005,
00241     ODT_VD_Depth=2006,
00242     ODT_VD_Max=2999,
00243     ODT_LD_Min=10000,
00244     ODT_LD_Max=32767
00245 } OGRDatumType; 
00246 
00247 /* ==================================================================== */
00248 /*      Some "standard" strings.                                        */
00249 /* ==================================================================== */
00250 
00251 #define SRS_PT_ALBERS_CONIC_EQUAL_AREA                                  \
00252                                 "Albers_Conic_Equal_Area"
00253 #define SRS_PT_AZIMUTHAL_EQUIDISTANT "Azimuthal_Equidistant"
00254 #define SRS_PT_CASSINI_SOLDNER  "Cassini_Soldner"
00255 #define SRS_PT_CYLINDRICAL_EQUAL_AREA "Cylindrical_Equal_Area"
00256 #define SRS_PT_BONNE            "Bonne"
00257 #define SRS_PT_ECKERT_IV        "Eckert_IV"
00258 #define SRS_PT_ECKERT_VI        "Eckert_VI"
00259 #define SRS_PT_EQUIDISTANT_CONIC "Equidistant_Conic"
00260 #define SRS_PT_EQUIRECTANGULAR  "Equirectangular"
00261 #define SRS_PT_GALL_STEREOGRAPHIC "Gall_Stereographic"
00262 #define SRS_PT_GEOSTATIONARY_SATELLITE "Geostationary_Satellite"
00263 #define SRS_PT_GOODE_HOMOLOSINE "Goode_Homolosine"
00264 #define SRS_PT_GNOMONIC         "Gnomonic"
00265 #define SRS_PT_HOTINE_OBLIQUE_MERCATOR                                  \
00266                                 "Hotine_Oblique_Mercator"
00267 #define SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN         \
00268                             "Hotine_Oblique_Mercator_Two_Point_Natural_Origin"
00269 #define SRS_PT_LABORDE_OBLIQUE_MERCATOR                                 \
00270                                 "Laborde_Oblique_Mercator"
00271 #define SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP                              \
00272                                 "Lambert_Conformal_Conic_1SP"
00273 #define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP                              \
00274                                 "Lambert_Conformal_Conic_2SP"
00275 #define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM                      \
00276                                 "Lambert_Conformal_Conic_2SP_Belgium)"
00277 #define SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA                     \
00278                                 "Lambert_Azimuthal_Equal_Area"
00279 #define SRS_PT_MERCATOR_1SP     "Mercator_1SP"
00280 #define SRS_PT_MERCATOR_2SP     "Mercator_2SP"
00281 #define SRS_PT_MILLER_CYLINDRICAL "Miller_Cylindrical"
00282 #define SRS_PT_MOLLWEIDE        "Mollweide"
00283 #define SRS_PT_NEW_ZEALAND_MAP_GRID                                     \
00284                                 "New_Zealand_Map_Grid"
00285 #define SRS_PT_OBLIQUE_STEREOGRAPHIC                                    \
00286                                 "Oblique_Stereographic"
00287 #define SRS_PT_ORTHOGRAPHIC     "Orthographic"
00288 #define SRS_PT_POLAR_STEREOGRAPHIC                                      \
00289                                 "Polar_Stereographic"
00290 #define SRS_PT_POLYCONIC        "Polyconic"
00291 #define SRS_PT_ROBINSON         "Robinson"
00292 #define SRS_PT_SINUSOIDAL       "Sinusoidal"
00293 #define SRS_PT_STEREOGRAPHIC    "Stereographic"
00294 #define SRS_PT_SWISS_OBLIQUE_CYLINDRICAL                                \
00295                                 "Swiss_Oblique_Cylindrical"
00296 #define SRS_PT_TRANSVERSE_MERCATOR                                      \
00297                                 "Transverse_Mercator"
00298 #define SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED                       \
00299                                 "Transverse_Mercator_South_Orientated"
00300 
00301 /* special mapinfo variants on Transverse Mercator */
00302 #define SRS_PT_TRANSVERSE_MERCATOR_MI_21 \
00303                                 "Transverse_Mercator_MapInfo_21"
00304 #define SRS_PT_TRANSVERSE_MERCATOR_MI_22 \
00305                                 "Transverse_Mercator_MapInfo_22"
00306 #define SRS_PT_TRANSVERSE_MERCATOR_MI_23 \
00307                                 "Transverse_Mercator_MapInfo_23"
00308 #define SRS_PT_TRANSVERSE_MERCATOR_MI_24 \
00309                                 "Transverse_Mercator_MapInfo_24"
00310 #define SRS_PT_TRANSVERSE_MERCATOR_MI_25 \
00311                                 "Transverse_Mercator_MapInfo_25"
00312 
00313 #define SRS_PT_TUNISIA_MINING_GRID                                      \
00314                                 "Tunisia_Mining_Grid"
00315 #define SRS_PT_VANDERGRINTEN    "VanDerGrinten"
00316 #define SRS_PT_KROVAK           "Krovak"
00317 
00318                                 
00319 
00320 #define SRS_PP_CENTRAL_MERIDIAN         "central_meridian"
00321 #define SRS_PP_SCALE_FACTOR             "scale_factor"
00322 #define SRS_PP_STANDARD_PARALLEL_1      "standard_parallel_1"
00323 #define SRS_PP_STANDARD_PARALLEL_2      "standard_parallel_2"
00324 #define SRS_PP_PSEUDO_STD_PARALLEL_1    "pseudo_standard_parallel_1"
00325 #define SRS_PP_LONGITUDE_OF_CENTER      "longitude_of_center"
00326 #define SRS_PP_LATITUDE_OF_CENTER       "latitude_of_center"
00327 #define SRS_PP_LONGITUDE_OF_ORIGIN      "longitude_of_origin"
00328 #define SRS_PP_LATITUDE_OF_ORIGIN       "latitude_of_origin"
00329 #define SRS_PP_FALSE_EASTING            "false_easting"
00330 #define SRS_PP_FALSE_NORTHING           "false_northing"
00331 #define SRS_PP_AZIMUTH                  "azimuth"
00332 #define SRS_PP_LONGITUDE_OF_POINT_1     "longitude_of_point_1"
00333 #define SRS_PP_LATITUDE_OF_POINT_1      "latitude_of_point_1"
00334 #define SRS_PP_LONGITUDE_OF_POINT_2     "longitude_of_point_2"
00335 #define SRS_PP_LATITUDE_OF_POINT_2      "latitude_of_point_2"
00336 #define SRS_PP_LONGITUDE_OF_POINT_3     "longitude_of_point_3"
00337 #define SRS_PP_LATITUDE_OF_POINT_3      "latitude_of_point_3"
00338 #define SRS_PP_RECTIFIED_GRID_ANGLE     "rectified_grid_angle"
00339 #define SRS_PP_LANDSAT_NUMBER           "landsat_number"
00340 #define SRS_PP_PATH_NUMBER              "path_number"
00341 #define SRS_PP_PERSPECTIVE_POINT_HEIGHT "perspective_point_height"
00342 #define SRS_PP_SATELLITE_HEIGHT         "satellite_height"
00343 #define SRS_PP_FIPSZONE                 "fipszone"
00344 #define SRS_PP_ZONE                     "zone"
00345 
00346 #define SRS_UL_METER            "Meter"
00347 #define SRS_UL_FOOT             "Foot (International)" /* or just "FOOT"? */
00348 #define SRS_UL_FOOT_CONV                    "0.3048"
00349 #define SRS_UL_US_FOOT          "U.S. Foot" /* or "US survey foot" */
00350 #define SRS_UL_US_FOOT_CONV                 "0.3048006"
00351 #define SRS_UL_NAUTICAL_MILE    "Nautical Mile"
00352 #define SRS_UL_NAUTICAL_MILE_CONV           "1852.0"
00353 #define SRS_UL_LINK             "Link"          /* Based on US Foot */
00354 #define SRS_UL_LINK_CONV                    "0.20116684023368047"
00355 #define SRS_UL_CHAIN            "Chain"         /* based on US Foot */
00356 #define SRS_UL_CHAIN_CONV                   "2.0116684023368047"
00357 #define SRS_UL_ROD              "Rod"           /* based on US Foot */
00358 #define SRS_UL_ROD_CONV                     "5.02921005842012"
00359 
00360 #define SRS_UA_DEGREE           "degree"
00361 #define SRS_UA_DEGREE_CONV                  "0.0174532925199433"
00362 #define SRS_UA_RADIAN           "radian"
00363 
00364 #define SRS_PM_GREENWICH        "Greenwich"
00365 
00366 #define SRS_DN_NAD27            "North_American_Datum_1927"
00367 #define SRS_DN_NAD83            "North_American_Datum_1983"
00368 #define SRS_DN_WGS72            "WGS_1972"
00369 #define SRS_DN_WGS84            "WGS_1984"
00370 
00371 #define SRS_WGS84_SEMIMAJOR     6378137.0                                
00372 #define SRS_WGS84_INVFLATTENING 298.257223563
00373 
00374 /* -------------------------------------------------------------------- */
00375 /*      C Wrappers for C++ objects and methods.                         */
00376 /* -------------------------------------------------------------------- */
00377 #ifndef _DEFINED_OGRSpatialReferenceH
00378 #define _DEFINED_OGRSpatialReferenceH
00379 
00380 typedef void *OGRSpatialReferenceH;                               
00381 typedef void *OGRCoordinateTransformationH;
00382 
00383 #endif
00384 
00385 
00386 OGRSpatialReferenceH CPL_DLL CPL_STDCALL
00387       OSRNewSpatialReference( const char * /* = NULL */);
00388 OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRCloneGeogCS( OGRSpatialReferenceH );
00389 OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRClone( OGRSpatialReferenceH );
00390 void CPL_DLL CPL_STDCALL OSRDestroySpatialReference( OGRSpatialReferenceH );
00391 
00392 int CPL_DLL OSRReference( OGRSpatialReferenceH );
00393 int CPL_DLL OSRDereference( OGRSpatialReferenceH );
00394 void CPL_DLL OSRRelease( OGRSpatialReferenceH );
00395 
00396 OGRErr CPL_DLL OSRValidate( OGRSpatialReferenceH );
00397 OGRErr CPL_DLL OSRFixupOrdering( OGRSpatialReferenceH );
00398 OGRErr CPL_DLL OSRFixup( OGRSpatialReferenceH );
00399 OGRErr CPL_DLL OSRStripCTParms( OGRSpatialReferenceH );
00400 
00401 OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSG( OGRSpatialReferenceH, int );
00402 OGRErr CPL_DLL OSRImportFromWkt( OGRSpatialReferenceH, char ** );
00403 OGRErr CPL_DLL OSRImportFromProj4( OGRSpatialReferenceH, const char *);
00404 OGRErr CPL_DLL OSRImportFromESRI( OGRSpatialReferenceH, char **);
00405 OGRErr CPL_DLL OSRImportFromPCI( OGRSpatialReferenceH hSRS, const char *,
00406                                  const char *, double * );
00407 OGRErr CPL_DLL OSRImportFromUSGS( OGRSpatialReferenceH,
00408                                   long, long, double *, long);
00409 OGRErr CPL_DLL OSRImportFromXML( OGRSpatialReferenceH, const char * );
00410 OGRErr CPL_DLL OSRImportFromDict( OGRSpatialReferenceH, const char *, 
00411                                   const char * );
00412 OGRErr CPL_DLL CPL_STDCALL OSRExportToWkt( OGRSpatialReferenceH, char ** );
00413 OGRErr CPL_DLL CPL_STDCALL OSRExportToPrettyWkt( OGRSpatialReferenceH, char **, int);
00414 OGRErr CPL_DLL CPL_STDCALL OSRExportToProj4( OGRSpatialReferenceH, char **);
00415 OGRErr CPL_DLL OSRExportToPCI( OGRSpatialReferenceH, char **, char **,
00416                                double ** );
00417 OGRErr CPL_DLL OSRExportToUSGS( OGRSpatialReferenceH, long *, long *,
00418                                 double **, long * );
00419 OGRErr CPL_DLL OSRExportToXML( OGRSpatialReferenceH, char **, const char * );
00420 
00421 OGRErr CPL_DLL OSRMorphToESRI( OGRSpatialReferenceH );
00422 OGRErr CPL_DLL OSRMorphFromESRI( OGRSpatialReferenceH );
00423 
00424 OGRErr CPL_DLL CPL_STDCALL OSRSetAttrValue( OGRSpatialReferenceH hSRS,
00425                                 const char * pszNodePath,
00426                                 const char * pszNewNodeValue );
00427 const char CPL_DLL * CPL_STDCALL OSRGetAttrValue( OGRSpatialReferenceH hSRS,
00428                            const char * pszName, int iChild /* = 0 */ );
00429 
00430 OGRErr CPL_DLL OSRSetAngularUnits( OGRSpatialReferenceH, const char *, double );
00431 double CPL_DLL OSRGetAngularUnits( OGRSpatialReferenceH, char ** );
00432 OGRErr CPL_DLL OSRSetLinearUnits( OGRSpatialReferenceH, const char *, double );
00433 double CPL_DLL OSRGetLinearUnits( OGRSpatialReferenceH, char ** );
00434 
00435 double CPL_DLL OSRGetPrimeMeridian( OGRSpatialReferenceH, char ** );
00436 
00437 int CPL_DLL OSRIsGeographic( OGRSpatialReferenceH );
00438 int CPL_DLL OSRIsLocal( OGRSpatialReferenceH );
00439 int CPL_DLL OSRIsProjected( OGRSpatialReferenceH );
00440 int CPL_DLL OSRIsSameGeogCS( OGRSpatialReferenceH, OGRSpatialReferenceH );
00441 int CPL_DLL OSRIsSame( OGRSpatialReferenceH, OGRSpatialReferenceH );
00442 
00443 OGRErr CPL_DLL OSRSetLocalCS( OGRSpatialReferenceH hSRS, const char *pszName );
00444 OGRErr CPL_DLL OSRSetProjCS( OGRSpatialReferenceH hSRS, const char * pszName );
00445 OGRErr CPL_DLL OSRSetWellKnownGeogCS( OGRSpatialReferenceH hSRS,
00446                                       const char * pszName );
00447 OGRErr CPL_DLL CPL_STDCALL OSRSetFromUserInput( OGRSpatialReferenceH hSRS, 
00448                                     const char * );
00449 OGRErr CPL_DLL OSRCopyGeogCSFrom( OGRSpatialReferenceH hSRS, 
00450                                   OGRSpatialReferenceH hSrcSRS );
00451 OGRErr CPL_DLL OSRSetTOWGS84( OGRSpatialReferenceH hSRS, 
00452                               double, double, double, 
00453                               double, double, double, double );
00454 OGRErr CPL_DLL OSRGetTOWGS84( OGRSpatialReferenceH hSRS, double *, int );
00455                         
00456 
00457 OGRErr CPL_DLL OSRSetGeogCS( OGRSpatialReferenceH hSRS,
00458                       const char * pszGeogName,
00459                       const char * pszDatumName,
00460                       const char * pszEllipsoidName,
00461                       double dfSemiMajor, double dfInvFlattening,
00462                       const char * pszPMName /* = NULL */,
00463                       double dfPMOffset /* = 0.0 */,
00464                       const char * pszUnits /* = NULL */,
00465                       double dfConvertToRadians /* = 0.0 */ );
00466 
00467 double CPL_DLL OSRGetSemiMajor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
00468 double CPL_DLL OSRGetSemiMinor( OGRSpatialReferenceH, OGRErr * /* = NULL */ );
00469 double CPL_DLL OSRGetInvFlattening( OGRSpatialReferenceH, OGRErr * /*=NULL*/);
00470 
00471 OGRErr CPL_DLL OSRSetAuthority( OGRSpatialReferenceH hSRS,
00472                          const char * pszTargetKey,
00473                          const char * pszAuthority,
00474                          int nCode );
00475 const char CPL_DLL *OSRGetAuthorityCode( OGRSpatialReferenceH hSRS,
00476                                          const char * pszTargetKey );
00477 const char CPL_DLL *OSRGetAuthorityName( OGRSpatialReferenceH hSRS,
00478                                          const char * pszTargetKey );
00479 OGRErr CPL_DLL OSRSetProjection( OGRSpatialReferenceH, const char * );
00480 OGRErr CPL_DLL OSRSetProjParm( OGRSpatialReferenceH, const char *, double );
00481 double CPL_DLL OSRGetProjParm( OGRSpatialReferenceH hSRS,
00482                         const char * pszParmName, 
00483                         double dfDefault /* = 0.0 */,
00484                         OGRErr * /* = NULL */ );
00485 OGRErr CPL_DLL OSRSetNormProjParm( OGRSpatialReferenceH, const char *, double);
00486 double CPL_DLL OSRGetNormProjParm( OGRSpatialReferenceH hSRS,
00487                                    const char * pszParmName, 
00488                                    double dfDefault /* = 0.0 */,
00489                                    OGRErr * /* = NULL */ );
00490 
00491 OGRErr CPL_DLL OSRSetUTM( OGRSpatialReferenceH hSRS, int nZone, int bNorth );
00492 int    CPL_DLL OSRGetUTMZone( OGRSpatialReferenceH hSRS, int *pbNorth );
00493 OGRErr CPL_DLL OSRSetStatePlane( OGRSpatialReferenceH hSRS, 
00494                                  int nZone, int bNAD83 );
00495 OGRErr CPL_DLL OSRSetStatePlaneWithUnits( OGRSpatialReferenceH hSRS, 
00496                                           int nZone, int bNAD83,
00497                                           const char *pszOverrideUnitName,
00498                                           double dfOverrideUnit );
00499 OGRErr CPL_DLL OSRAutoIdentifyEPSG( OGRSpatialReferenceH hSRS );
00500 
00502 OGRErr CPL_DLL OSRSetACEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
00503                          double dfCenterLat, double dfCenterLong,
00504                          double dfFalseEasting, double dfFalseNorthing );
00505     
00507 OGRErr CPL_DLL  OSRSetAE( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00508                        double dfFalseEasting, double dfFalseNorthing );
00509 
00511 OGRErr CPL_DLL OSRSetBonne(OGRSpatialReferenceH hSRS, 
00512                            double dfStandardParallel, double dfCentralMeridian,
00513                            double dfFalseEasting, double dfFalseNorthing );
00514 
00516 OGRErr CPL_DLL OSRSetCEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian,
00517                         double dfFalseEasting, double dfFalseNorthing );
00518 
00520 OGRErr CPL_DLL OSRSetCS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00521                        double dfFalseEasting, double dfFalseNorthing );
00522 
00524 OGRErr CPL_DLL OSRSetEC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
00525                        double dfCenterLat, double dfCenterLong,
00526                        double dfFalseEasting, double dfFalseNorthing );
00527 
00529 OGRErr CPL_DLL OSRSetEckertIV( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
00530                              double dfFalseEasting, double dfFalseNorthing );
00531 
00533 OGRErr CPL_DLL OSRSetEckertVI( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
00534                              double dfFalseEasting, double dfFalseNorthing );
00535 
00537 OGRErr CPL_DLL OSRSetEquirectangular(OGRSpatialReferenceH hSRS,
00538                               double dfCenterLat, double dfCenterLong,
00539                               double dfFalseEasting, double dfFalseNorthing );
00540 
00542 OGRErr CPL_DLL OSRSetGS( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
00543                        double dfFalseEasting, double dfFalseNorthing );
00544     
00546 OGRErr CPL_DLL OSRSetGH( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
00547                          double dfFalseEasting, double dfFalseNorthing );
00548     
00550 OGRErr CPL_DLL OSRSetGEOS( OGRSpatialReferenceH hSRS, 
00551                            double dfCentralMeridian, double dfSatelliteHeight,
00552                            double dfFalseEasting, double dfFalseNorthing );
00553     
00555 OGRErr CPL_DLL OSRSetGnomonic(OGRSpatialReferenceH hSRS,
00556                               double dfCenterLat, double dfCenterLong,
00557                             double dfFalseEasting, double dfFalseNorthing );
00558 
00560 OGRErr CPL_DLL OSRSetHOM( OGRSpatialReferenceH hSRS,
00561                           double dfCenterLat, double dfCenterLong,
00562                           double dfAzimuth, double dfRectToSkew,
00563                           double dfScale,
00564                           double dfFalseEasting, double dfFalseNorthing );
00565 
00567 OGRErr CPL_DLL OSRSetHOM2PNO( OGRSpatialReferenceH hSRS, double dfCenterLat,
00568                               double dfLat1, double dfLong1,
00569                               double dfLat2, double dfLong2,
00570                               double dfScale,
00571                               double dfFalseEasting, double dfFalseNorthing );
00572 
00574 OGRErr CPL_DLL OSRSetKrovak( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00575                            double dfAzimuth, double dfPseudoStdParallelLat,
00576                            double dfScale, 
00577                            double dfFalseEasting, double dfFalseNorthing );
00578 
00580 OGRErr CPL_DLL OSRSetLAEA( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00581                          double dfFalseEasting, double dfFalseNorthing );
00582 
00584 OGRErr CPL_DLL OSRSetLCC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
00585                         double dfCenterLat, double dfCenterLong,
00586                         double dfFalseEasting, double dfFalseNorthing );
00587 
00589 OGRErr CPL_DLL OSRSetLCC1SP( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00590                            double dfScale,
00591                            double dfFalseEasting, double dfFalseNorthing );
00592 
00594 OGRErr CPL_DLL OSRSetLCCB( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2,
00595                          double dfCenterLat, double dfCenterLong,
00596                          double dfFalseEasting, double dfFalseNorthing );
00597     
00599 OGRErr CPL_DLL OSRSetMC( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00600                        double dfFalseEasting, double dfFalseNorthing );
00601 
00603 OGRErr CPL_DLL OSRSetMercator( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00604                              double dfScale, 
00605                              double dfFalseEasting, double dfFalseNorthing );
00606 
00608 OGRErr CPL_DLL  OSRSetMollweide( OGRSpatialReferenceH hSRS, double dfCentralMeridian,
00609                               double dfFalseEasting, double dfFalseNorthing );
00610 
00612 OGRErr CPL_DLL OSRSetNZMG( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00613                          double dfFalseEasting, double dfFalseNorthing );
00614 
00616 OGRErr CPL_DLL OSRSetOS( OGRSpatialReferenceH hSRS, double dfOriginLat, double dfCMeridian,
00617                        double dfScale,
00618                        double dfFalseEasting,double dfFalseNorthing);
00619     
00621 OGRErr CPL_DLL OSRSetOrthographic( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00622                                  double dfFalseEasting,double dfFalseNorthing);
00623 
00625 OGRErr CPL_DLL OSRSetPolyconic( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00626                               double dfFalseEasting, double dfFalseNorthing );
00627 
00629 OGRErr CPL_DLL OSRSetPS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00630                        double dfScale,
00631                        double dfFalseEasting, double dfFalseNorthing);
00632     
00634 OGRErr CPL_DLL OSRSetRobinson( OGRSpatialReferenceH hSRS, double dfCenterLong, 
00635                              double dfFalseEasting, double dfFalseNorthing );
00636     
00638 OGRErr CPL_DLL OSRSetSinusoidal( OGRSpatialReferenceH hSRS, double dfCenterLong, 
00639                                double dfFalseEasting, double dfFalseNorthing );
00640     
00642 OGRErr CPL_DLL OSRSetStereographic( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00643                                   double dfScale,
00644                                  double dfFalseEasting,double dfFalseNorthing);
00645     
00647 OGRErr CPL_DLL OSRSetSOC( OGRSpatialReferenceH hSRS, double dfLatitudeOfOrigin, double dfCentralMeridian,
00648                         double dfFalseEasting, double dfFalseNorthing );
00649     
00651 OGRErr CPL_DLL OSRSetTM( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong,
00652                        double dfScale,
00653                        double dfFalseEasting, double dfFalseNorthing );
00654 
00656 OGRErr CPL_DLL OSRSetTMVariant( 
00657     OGRSpatialReferenceH hSRS, const char *pszVariantName,
00658     double dfCenterLat, double dfCenterLong,
00659     double dfScale,
00660     double dfFalseEasting, double dfFalseNorthing );
00661 
00663 OGRErr CPL_DLL OSRSetTMG( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, 
00664                         double dfFalseEasting, double dfFalseNorthing );
00665 
00667 OGRErr CPL_DLL OSRSetTMSO( OGRSpatialReferenceH hSRS,
00668                            double dfCenterLat, double dfCenterLong,
00669                            double dfScale,
00670                            double dfFalseEasting, double dfFalseNorthing );
00671 
00673 OGRErr CPL_DLL OSRSetVDG( OGRSpatialReferenceH hSRS,
00674                           double dfCenterLong,
00675                           double dfFalseEasting, double dfFalseNorthing );
00676 
00677 void CPL_DLL OSRCleanup( void );
00678 
00679 /* -------------------------------------------------------------------- */
00680 /*      OGRCoordinateTransform C API.                                   */
00681 /* -------------------------------------------------------------------- */
00682 OGRCoordinateTransformationH CPL_DLL CPL_STDCALL
00683 OCTNewCoordinateTransformation( OGRSpatialReferenceH hSourceSRS,
00684                                 OGRSpatialReferenceH hTargetSRS );
00685 void CPL_DLL CPL_STDCALL 
00686       OCTDestroyCoordinateTransformation( OGRCoordinateTransformationH );
00687 
00688 int CPL_DLL CPL_STDCALL
00689 OCTTransform( OGRCoordinateTransformationH hCT,
00690               int nCount, double *x, double *y, double *z );
00691 
00692 int CPL_DLL CPL_STDCALL
00693 OCTTransformEx( OGRCoordinateTransformationH hCT,
00694                 int nCount, double *x, double *y, double *z,
00695                 int *pabSuccess );
00696 
00697 /* this is really private to OGR. */
00698 char *OCTProj4Normalize( const char *pszProj4Src );
00699 
00700 /* -------------------------------------------------------------------- */
00701 /*      Projection transform dictionary query.                          */
00702 /* -------------------------------------------------------------------- */
00703 
00704 char CPL_DLL ** OPTGetProjectionMethods();
00705 char CPL_DLL ** OPTGetParameterList( const char * pszProjectionMethod,
00706                              char ** ppszUserName );
00707 int CPL_DLL OPTGetParameterInfo( const char * pszProjectionMethod,
00708                                  const char * pszParameterName,
00709                                  char ** ppszUserName,
00710                                  char ** ppszType,
00711                                  double *pdfDefaultValue );
00712 
00713 CPL_C_END
00714 
00715 #endif /* ndef _OGR_SRS_API_H_INCLUDED */

Generated on Sun Jul 2 22:18:21 2006 for OGR by  doxygen 1.4.6