|
GDAL
|
00001 /****************************************************************************** 00002 * $Id: ogr_srs_api.h 35912 2016-10-24 16:41:45Z goatbar $ 00003 * 00004 * Project: OpenGIS Simple Features Reference Implementation 00005 * Purpose: C API and constant declarations for OGR Spatial References. 00006 * Author: Frank Warmerdam, warmerdam@pobox.com 00007 * 00008 ****************************************************************************** 00009 * Copyright (c) 2000, Frank Warmerdam 00010 * Copyright (c) 2008-2013, Even Rouault <even dot rouault at mines-paris dot org> 00011 * 00012 * Permission is hereby granted, free of charge, to any person obtaining a 00013 * copy of this software and associated documentation files (the "Software"), 00014 * to deal in the Software without restriction, including without limitation 00015 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00016 * and/or sell copies of the Software, and to permit persons to whom the 00017 * Software is furnished to do so, subject to the following conditions: 00018 * 00019 * The above copyright notice and this permission notice shall be included 00020 * in all copies or substantial portions of the Software. 00021 * 00022 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00023 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00024 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00025 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00026 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00027 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 00028 * DEALINGS IN THE SOFTWARE. 00029 ****************************************************************************/ 00030 00031 #ifndef OGR_SRS_API_H_INCLUDED 00032 #define OGR_SRS_API_H_INCLUDED 00033 00034 #ifndef SWIG 00035 #include "ogr_core.h" 00036 00037 CPL_C_START 00038 00048 typedef enum { 00049 OAO_Other=0, 00050 OAO_North=1, 00051 OAO_South=2, 00052 OAO_East=3, 00053 OAO_West=4, 00054 OAO_Up=5, 00055 OAO_Down=6 00056 } OGRAxisOrientation; 00057 00058 const char CPL_DLL *OSRAxisEnumToName( OGRAxisOrientation eOrientation ); 00059 00060 /* -------------------------------------------------------------------- */ 00061 /* Datum types (corresponds to CS_DatumType). */ 00062 /* -------------------------------------------------------------------- */ 00063 00065 // Unused in the code base. TODO: remove 00066 typedef enum { 00067 ODT_HD_Min=1000, 00068 ODT_HD_Other=1000, 00069 ODT_HD_Classic=1001, 00070 ODT_HD_Geocentric=1002, 00071 ODT_HD_Max=1999, 00072 ODT_VD_Min=2000, 00073 ODT_VD_Other=2000, 00074 ODT_VD_Orthometric=2001, 00075 ODT_VD_Ellipsoidal=2002, 00076 ODT_VD_AltitudeBarometric=2003, 00077 ODT_VD_Normal=2004, 00078 ODT_VD_GeoidModelDerived=2005, 00079 ODT_VD_Depth=2006, 00080 ODT_VD_Max=2999, 00081 ODT_LD_Min=10000, 00082 ODT_LD_Max=32767 00083 } OGRDatumType; 00086 #endif // ndef SWIG 00087 00088 /* ==================================================================== */ 00089 /* Some standard WKT geographic coordinate systems. */ 00090 /* ==================================================================== */ 00091 00093 #define SRS_WKT_WGS84 "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]" 00094 00095 /* ==================================================================== */ 00096 /* Some "standard" strings. */ 00097 /* ==================================================================== */ 00098 00100 #define SRS_PT_ALBERS_CONIC_EQUAL_AREA \ 00101 "Albers_Conic_Equal_Area" 00102 00103 #define SRS_PT_AZIMUTHAL_EQUIDISTANT "Azimuthal_Equidistant" 00104 00105 #define SRS_PT_CASSINI_SOLDNER "Cassini_Soldner" 00106 00107 #define SRS_PT_CYLINDRICAL_EQUAL_AREA "Cylindrical_Equal_Area" 00108 00109 #define SRS_PT_BONNE "Bonne" 00110 00111 #define SRS_PT_ECKERT_I "Eckert_I" 00112 00113 #define SRS_PT_ECKERT_II "Eckert_II" 00114 00115 #define SRS_PT_ECKERT_III "Eckert_III" 00116 00117 #define SRS_PT_ECKERT_IV "Eckert_IV" 00118 00119 #define SRS_PT_ECKERT_V "Eckert_V" 00120 00121 #define SRS_PT_ECKERT_VI "Eckert_VI" 00122 00123 #define SRS_PT_EQUIDISTANT_CONIC \ 00124 "Equidistant_Conic" 00125 00126 #define SRS_PT_EQUIRECTANGULAR "Equirectangular" 00127 00128 #define SRS_PT_GALL_STEREOGRAPHIC \ 00129 "Gall_Stereographic" 00130 00131 #define SRS_PT_GAUSSSCHREIBERTMERCATOR \ 00132 "Gauss_Schreiber_Transverse_Mercator" 00133 00134 #define SRS_PT_GEOSTATIONARY_SATELLITE \ 00135 "Geostationary_Satellite" 00136 00137 #define SRS_PT_GOODE_HOMOLOSINE "Goode_Homolosine" 00138 00139 #define SRS_PT_IGH "Interrupted_Goode_Homolosine" 00140 00141 #define SRS_PT_GNOMONIC "Gnomonic" 00142 00143 #define SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER \ 00144 "Hotine_Oblique_Mercator_Azimuth_Center" 00145 00146 #define SRS_PT_HOTINE_OBLIQUE_MERCATOR \ 00147 "Hotine_Oblique_Mercator" 00148 00149 #define SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN \ 00150 "Hotine_Oblique_Mercator_Two_Point_Natural_Origin" 00151 00152 #define SRS_PT_LABORDE_OBLIQUE_MERCATOR \ 00153 "Laborde_Oblique_Mercator" 00154 00155 #define SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP \ 00156 "Lambert_Conformal_Conic_1SP" 00157 00158 #define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP \ 00159 "Lambert_Conformal_Conic_2SP" 00160 00161 #define SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM \ 00162 "Lambert_Conformal_Conic_2SP_Belgium" 00163 00164 #define SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA \ 00165 "Lambert_Azimuthal_Equal_Area" 00166 00167 #define SRS_PT_MERCATOR_1SP "Mercator_1SP" 00168 00169 #define SRS_PT_MERCATOR_2SP "Mercator_2SP" 00170 00171 #define SRS_PT_MERCATOR_AUXILIARY_SPHERE \ 00172 "Mercator_Auxiliary_Sphere" 00173 00174 #define SRS_PT_MILLER_CYLINDRICAL "Miller_Cylindrical" 00175 00176 #define SRS_PT_MOLLWEIDE "Mollweide" 00177 00178 #define SRS_PT_NEW_ZEALAND_MAP_GRID \ 00179 "New_Zealand_Map_Grid" 00180 00181 #define SRS_PT_OBLIQUE_STEREOGRAPHIC \ 00182 "Oblique_Stereographic" 00183 00184 #define SRS_PT_ORTHOGRAPHIC "Orthographic" 00185 00186 #define SRS_PT_POLAR_STEREOGRAPHIC \ 00187 "Polar_Stereographic" 00188 00189 #define SRS_PT_POLYCONIC "Polyconic" 00190 00191 #define SRS_PT_ROBINSON "Robinson" 00192 00193 #define SRS_PT_SINUSOIDAL "Sinusoidal" 00194 00195 #define SRS_PT_STEREOGRAPHIC "Stereographic" 00196 00197 #define SRS_PT_SWISS_OBLIQUE_CYLINDRICAL \ 00198 "Swiss_Oblique_Cylindrical" 00199 00200 #define SRS_PT_TRANSVERSE_MERCATOR \ 00201 "Transverse_Mercator" 00202 00203 #define SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED \ 00204 "Transverse_Mercator_South_Orientated" 00205 00206 /* special mapinfo variants on Transverse Mercator */ 00208 #define SRS_PT_TRANSVERSE_MERCATOR_MI_21 \ 00209 "Transverse_Mercator_MapInfo_21" 00210 00211 #define SRS_PT_TRANSVERSE_MERCATOR_MI_22 \ 00212 "Transverse_Mercator_MapInfo_22" 00213 00214 #define SRS_PT_TRANSVERSE_MERCATOR_MI_23 \ 00215 "Transverse_Mercator_MapInfo_23" 00216 00217 #define SRS_PT_TRANSVERSE_MERCATOR_MI_24 \ 00218 "Transverse_Mercator_MapInfo_24" 00219 00220 #define SRS_PT_TRANSVERSE_MERCATOR_MI_25 \ 00221 "Transverse_Mercator_MapInfo_25" 00222 00224 #define SRS_PT_TUNISIA_MINING_GRID \ 00225 "Tunisia_Mining_Grid" 00226 00227 #define SRS_PT_TWO_POINT_EQUIDISTANT \ 00228 "Two_Point_Equidistant" 00229 00230 #define SRS_PT_VANDERGRINTEN "VanDerGrinten" 00231 00232 #define SRS_PT_KROVAK "Krovak" 00233 00234 #define SRS_PT_IMW_POLYCONIC "International_Map_of_the_World_Polyconic" 00235 00236 #define SRS_PT_WAGNER_I "Wagner_I" 00237 00238 #define SRS_PT_WAGNER_II "Wagner_II" 00239 00240 #define SRS_PT_WAGNER_III "Wagner_III" 00241 00242 #define SRS_PT_WAGNER_IV "Wagner_IV" 00243 00244 #define SRS_PT_WAGNER_V "Wagner_V" 00245 00246 #define SRS_PT_WAGNER_VI "Wagner_VI" 00247 00248 #define SRS_PT_WAGNER_VII "Wagner_VII" 00249 00250 #define SRS_PT_QSC "Quadrilateralized_Spherical_Cube" 00251 00252 #define SRS_PT_AITOFF "Aitoff" 00253 00254 #define SRS_PT_WINKEL_I "Winkel_I" 00255 00256 #define SRS_PT_WINKEL_II "Winkel_II" 00257 00258 #define SRS_PT_WINKEL_TRIPEL "Winkel_Tripel" 00259 00260 #define SRS_PT_CRASTER_PARABOLIC "Craster_Parabolic" 00261 00262 #define SRS_PT_LOXIMUTHAL "Loximuthal" 00263 00264 #define SRS_PT_QUARTIC_AUTHALIC "Quartic_Authalic" 00265 00266 #define SRS_PT_SCH "Spherical_Cross_Track_Height" 00267 00269 #define SRS_PP_CENTRAL_MERIDIAN "central_meridian" 00270 00271 #define SRS_PP_SCALE_FACTOR "scale_factor" 00272 00273 #define SRS_PP_STANDARD_PARALLEL_1 "standard_parallel_1" 00274 00275 #define SRS_PP_STANDARD_PARALLEL_2 "standard_parallel_2" 00276 00277 #define SRS_PP_PSEUDO_STD_PARALLEL_1 "pseudo_standard_parallel_1" 00278 00279 #define SRS_PP_LONGITUDE_OF_CENTER "longitude_of_center" 00280 00281 #define SRS_PP_LATITUDE_OF_CENTER "latitude_of_center" 00282 00283 #define SRS_PP_LONGITUDE_OF_ORIGIN "longitude_of_origin" 00284 00285 #define SRS_PP_LATITUDE_OF_ORIGIN "latitude_of_origin" 00286 00287 #define SRS_PP_FALSE_EASTING "false_easting" 00288 00289 #define SRS_PP_FALSE_NORTHING "false_northing" 00290 00291 #define SRS_PP_AZIMUTH "azimuth" 00292 00293 #define SRS_PP_LONGITUDE_OF_POINT_1 "longitude_of_point_1" 00294 00295 #define SRS_PP_LATITUDE_OF_POINT_1 "latitude_of_point_1" 00296 00297 #define SRS_PP_LONGITUDE_OF_POINT_2 "longitude_of_point_2" 00298 00299 #define SRS_PP_LATITUDE_OF_POINT_2 "latitude_of_point_2" 00300 00301 #define SRS_PP_LONGITUDE_OF_POINT_3 "longitude_of_point_3" 00302 00303 #define SRS_PP_LATITUDE_OF_POINT_3 "latitude_of_point_3" 00304 00305 #define SRS_PP_RECTIFIED_GRID_ANGLE "rectified_grid_angle" 00306 00307 #define SRS_PP_LANDSAT_NUMBER "landsat_number" 00308 00309 #define SRS_PP_PATH_NUMBER "path_number" 00310 00311 #define SRS_PP_PERSPECTIVE_POINT_HEIGHT "perspective_point_height" 00312 00313 #define SRS_PP_SATELLITE_HEIGHT "satellite_height" 00314 00315 #define SRS_PP_FIPSZONE "fipszone" 00316 00317 #define SRS_PP_ZONE "zone" 00318 00319 #define SRS_PP_LATITUDE_OF_1ST_POINT "Latitude_Of_1st_Point" 00320 00321 #define SRS_PP_LONGITUDE_OF_1ST_POINT "Longitude_Of_1st_Point" 00322 00323 #define SRS_PP_LATITUDE_OF_2ND_POINT "Latitude_Of_2nd_Point" 00324 00325 #define SRS_PP_LONGITUDE_OF_2ND_POINT "Longitude_Of_2nd_Point" 00326 00327 #define SRS_PP_PEG_POINT_LATITUDE "peg_point_latitude" 00328 00329 #define SRS_PP_PEG_POINT_LONGITUDE "peg_point_longitude" 00330 00331 #define SRS_PP_PEG_POINT_HEADING "peg_point_heading" 00332 00333 #define SRS_PP_PEG_POINT_HEIGHT "peg_point_height" 00334 00336 #define SRS_UL_METER "Meter" 00337 00338 #define SRS_UL_FOOT "Foot (International)" /* or just "FOOT"? */ 00339 00340 #define SRS_UL_FOOT_CONV "0.3048" 00341 00342 #define SRS_UL_US_FOOT "Foot_US" /* or "US survey foot" from EPSG */ 00343 00344 #define SRS_UL_US_FOOT_CONV "0.3048006096012192" 00345 00346 #define SRS_UL_NAUTICAL_MILE "Nautical Mile" 00347 00348 #define SRS_UL_NAUTICAL_MILE_CONV "1852.0" 00349 00350 #define SRS_UL_LINK "Link" /* Based on US Foot */ 00351 00352 #define SRS_UL_LINK_CONV "0.20116684023368047" 00353 00354 #define SRS_UL_CHAIN "Chain" /* based on US Foot */ 00355 00356 #define SRS_UL_CHAIN_CONV "20.116684023368047" 00357 00358 #define SRS_UL_ROD "Rod" /* based on US Foot */ 00359 00360 #define SRS_UL_ROD_CONV "5.02921005842012" 00361 00362 #define SRS_UL_LINK_Clarke "Link_Clarke" 00363 00364 #define SRS_UL_LINK_Clarke_CONV "0.2011661949" 00365 00367 #define SRS_UL_KILOMETER "Kilometer" 00368 00369 #define SRS_UL_KILOMETER_CONV "1000." 00370 00371 #define SRS_UL_DECIMETER "Decimeter" 00372 00373 #define SRS_UL_DECIMETER_CONV "0.1" 00374 00375 #define SRS_UL_CENTIMETER "Centimeter" 00376 00377 #define SRS_UL_CENTIMETER_CONV "0.01" 00378 00379 #define SRS_UL_MILLIMETER "Millimeter" 00380 00381 #define SRS_UL_MILLIMETER_CONV "0.001" 00382 00383 #define SRS_UL_INTL_NAUT_MILE "Nautical_Mile_International" 00384 00385 #define SRS_UL_INTL_NAUT_MILE_CONV "1852.0" 00386 00387 #define SRS_UL_INTL_INCH "Inch_International" 00388 00389 #define SRS_UL_INTL_INCH_CONV "0.0254" 00390 00391 #define SRS_UL_INTL_FOOT "Foot_International" 00392 00393 #define SRS_UL_INTL_FOOT_CONV "0.3048" 00394 00395 #define SRS_UL_INTL_YARD "Yard_International" 00396 00397 #define SRS_UL_INTL_YARD_CONV "0.9144" 00398 00399 #define SRS_UL_INTL_STAT_MILE "Statute_Mile_International" 00400 00401 #define SRS_UL_INTL_STAT_MILE_CONV "1609.344" 00402 00403 #define SRS_UL_INTL_FATHOM "Fathom_International" 00404 00405 #define SRS_UL_INTL_FATHOM_CONV "1.8288" 00406 00407 #define SRS_UL_INTL_CHAIN "Chain_International" 00408 00409 #define SRS_UL_INTL_CHAIN_CONV "20.1168" 00410 00411 #define SRS_UL_INTL_LINK "Link_International" 00412 00413 #define SRS_UL_INTL_LINK_CONV "0.201168" 00414 00415 #define SRS_UL_US_INCH "Inch_US_Surveyor" 00416 00417 #define SRS_UL_US_INCH_CONV "0.025400050800101603" 00418 00419 #define SRS_UL_US_YARD "Yard_US_Surveyor" 00420 00421 #define SRS_UL_US_YARD_CONV "0.914401828803658" 00422 00423 #define SRS_UL_US_CHAIN "Chain_US_Surveyor" 00424 00425 #define SRS_UL_US_CHAIN_CONV "20.11684023368047" 00426 00427 #define SRS_UL_US_STAT_MILE "Statute_Mile_US_Surveyor" 00428 00429 #define SRS_UL_US_STAT_MILE_CONV "1609.347218694437" 00430 00431 #define SRS_UL_INDIAN_YARD "Yard_Indian" 00432 00433 #define SRS_UL_INDIAN_YARD_CONV "0.91439523" 00434 00435 #define SRS_UL_INDIAN_FOOT "Foot_Indian" 00436 00437 #define SRS_UL_INDIAN_FOOT_CONV "0.30479841" 00438 00439 #define SRS_UL_INDIAN_CHAIN "Chain_Indian" 00440 00441 #define SRS_UL_INDIAN_CHAIN_CONV "20.11669506" 00442 00444 #define SRS_UA_DEGREE "degree" 00445 00446 #define SRS_UA_DEGREE_CONV "0.0174532925199433" 00447 00448 #define SRS_UA_RADIAN "radian" 00449 00451 #define SRS_PM_GREENWICH "Greenwich" 00452 00454 #define SRS_DN_NAD27 "North_American_Datum_1927" 00455 00456 #define SRS_DN_NAD83 "North_American_Datum_1983" 00457 00458 #define SRS_DN_WGS72 "WGS_1972" 00459 00460 #define SRS_DN_WGS84 "WGS_1984" 00461 00463 #define SRS_WGS84_SEMIMAJOR 6378137.0 00464 00465 #define SRS_WGS84_INVFLATTENING 298.257223563 00466 00467 #ifndef SWIG 00468 /* -------------------------------------------------------------------- */ 00469 /* C Wrappers for C++ objects and methods. */ 00470 /* -------------------------------------------------------------------- */ 00471 #ifndef DEFINED_OGRSpatialReferenceH 00472 00473 #define DEFINED_OGRSpatialReferenceH 00474 00476 #ifdef DEBUG 00477 typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH; 00478 typedef struct OGRCoordinateTransformationHS *OGRCoordinateTransformationH; 00479 #else 00480 00481 typedef void *OGRSpatialReferenceH; 00483 typedef void *OGRCoordinateTransformationH; 00484 #endif 00485 00486 #endif 00487 00488 OGRSpatialReferenceH CPL_DLL CPL_STDCALL 00489 OSRNewSpatialReference( const char * /* = NULL */); 00490 OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRCloneGeogCS( OGRSpatialReferenceH ); 00491 OGRSpatialReferenceH CPL_DLL CPL_STDCALL OSRClone( OGRSpatialReferenceH ); 00492 void CPL_DLL CPL_STDCALL OSRDestroySpatialReference( OGRSpatialReferenceH ); 00493 00494 int CPL_DLL OSRReference( OGRSpatialReferenceH ); 00495 int CPL_DLL OSRDereference( OGRSpatialReferenceH ); 00496 void CPL_DLL OSRRelease( OGRSpatialReferenceH ); 00497 00498 OGRErr CPL_DLL OSRValidate( OGRSpatialReferenceH ); 00499 OGRErr CPL_DLL OSRFixupOrdering( OGRSpatialReferenceH ); 00500 OGRErr CPL_DLL OSRFixup( OGRSpatialReferenceH ); 00501 OGRErr CPL_DLL OSRStripCTParms( OGRSpatialReferenceH ); 00502 00503 OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSG( OGRSpatialReferenceH, int ); 00504 OGRErr CPL_DLL CPL_STDCALL OSRImportFromEPSGA( OGRSpatialReferenceH, int ); 00505 OGRErr CPL_DLL OSRImportFromWkt( OGRSpatialReferenceH, char ** ); 00506 OGRErr CPL_DLL OSRImportFromProj4( OGRSpatialReferenceH, const char *); 00507 OGRErr CPL_DLL OSRImportFromESRI( OGRSpatialReferenceH, char **); 00508 OGRErr CPL_DLL OSRImportFromPCI( OGRSpatialReferenceH hSRS, const char *, 00509 const char *, double * ); 00510 OGRErr CPL_DLL OSRImportFromUSGS( OGRSpatialReferenceH, 00511 long, long, double *, long); 00512 OGRErr CPL_DLL OSRImportFromXML( OGRSpatialReferenceH, const char * ); 00513 OGRErr CPL_DLL OSRImportFromDict( OGRSpatialReferenceH, const char *, 00514 const char * ); 00515 OGRErr CPL_DLL OSRImportFromPanorama( OGRSpatialReferenceH, long, long, long, 00516 double * ); 00517 OGRErr CPL_DLL OSRImportFromOzi( OGRSpatialReferenceH , const char * const *); 00518 OGRErr CPL_DLL OSRImportFromMICoordSys( OGRSpatialReferenceH, const char *); 00519 OGRErr CPL_DLL OSRImportFromERM( OGRSpatialReferenceH, 00520 const char *, const char *, const char * ); 00521 OGRErr CPL_DLL OSRImportFromUrl( OGRSpatialReferenceH, const char * ); 00522 00523 OGRErr CPL_DLL CPL_STDCALL OSRExportToWkt( OGRSpatialReferenceH, char ** ); 00524 OGRErr CPL_DLL CPL_STDCALL OSRExportToPrettyWkt( OGRSpatialReferenceH, char **, int); 00525 OGRErr CPL_DLL CPL_STDCALL OSRExportToProj4( OGRSpatialReferenceH, char **); 00526 OGRErr CPL_DLL OSRExportToPCI( OGRSpatialReferenceH, char **, char **, 00527 double ** ); 00528 OGRErr CPL_DLL OSRExportToUSGS( OGRSpatialReferenceH, long *, long *, 00529 double **, long * ); 00530 OGRErr CPL_DLL OSRExportToXML( OGRSpatialReferenceH, char **, const char * ); 00531 OGRErr CPL_DLL OSRExportToPanorama( OGRSpatialReferenceH, long *, long *, 00532 long *, long *, double * ); 00533 OGRErr CPL_DLL OSRExportToMICoordSys( OGRSpatialReferenceH, char ** ); 00534 OGRErr CPL_DLL OSRExportToERM( OGRSpatialReferenceH, char *, char *, char * ); 00535 00536 OGRErr CPL_DLL OSRMorphToESRI( OGRSpatialReferenceH ); 00537 OGRErr CPL_DLL OSRMorphFromESRI( OGRSpatialReferenceH ); 00538 00539 OGRErr CPL_DLL CPL_STDCALL OSRSetAttrValue( OGRSpatialReferenceH hSRS, 00540 const char * pszNodePath, 00541 const char * pszNewNodeValue ); 00542 const char CPL_DLL * CPL_STDCALL OSRGetAttrValue( OGRSpatialReferenceH hSRS, 00543 const char * pszName, int iChild /* = 0 */ ); 00544 00545 OGRErr CPL_DLL OSRSetAngularUnits( OGRSpatialReferenceH, const char *, double ); 00546 double CPL_DLL OSRGetAngularUnits( OGRSpatialReferenceH, char ** ); 00547 OGRErr CPL_DLL OSRSetLinearUnits( OGRSpatialReferenceH, const char *, double ); 00548 OGRErr CPL_DLL OSRSetTargetLinearUnits( OGRSpatialReferenceH, const char *, const char *, double ); 00549 OGRErr CPL_DLL OSRSetLinearUnitsAndUpdateParameters( 00550 OGRSpatialReferenceH, const char *, double ); 00551 double CPL_DLL OSRGetLinearUnits( OGRSpatialReferenceH, char ** ); 00552 double CPL_DLL OSRGetTargetLinearUnits( OGRSpatialReferenceH, const char *, char ** ); 00553 00554 double CPL_DLL OSRGetPrimeMeridian( OGRSpatialReferenceH, char ** ); 00555 00556 int CPL_DLL OSRIsGeographic( OGRSpatialReferenceH ); 00557 int CPL_DLL OSRIsLocal( OGRSpatialReferenceH ); 00558 int CPL_DLL OSRIsProjected( OGRSpatialReferenceH ); 00559 int CPL_DLL OSRIsCompound( OGRSpatialReferenceH ); 00560 int CPL_DLL OSRIsGeocentric( OGRSpatialReferenceH ); 00561 int CPL_DLL OSRIsVertical( OGRSpatialReferenceH ); 00562 int CPL_DLL OSRIsSameGeogCS( OGRSpatialReferenceH, OGRSpatialReferenceH ); 00563 int CPL_DLL OSRIsSameVertCS( OGRSpatialReferenceH, OGRSpatialReferenceH ); 00564 int CPL_DLL OSRIsSame( OGRSpatialReferenceH, OGRSpatialReferenceH ); 00565 00566 OGRErr CPL_DLL OSRSetLocalCS( OGRSpatialReferenceH hSRS, const char *pszName ); 00567 OGRErr CPL_DLL OSRSetProjCS( OGRSpatialReferenceH hSRS, const char * pszName ); 00568 OGRErr CPL_DLL OSRSetGeocCS( OGRSpatialReferenceH hSRS, const char * pszName ); 00569 OGRErr CPL_DLL OSRSetWellKnownGeogCS( OGRSpatialReferenceH hSRS, 00570 const char * pszName ); 00571 OGRErr CPL_DLL CPL_STDCALL OSRSetFromUserInput( OGRSpatialReferenceH hSRS, 00572 const char * ); 00573 OGRErr CPL_DLL OSRCopyGeogCSFrom( OGRSpatialReferenceH hSRS, 00574 const OGRSpatialReferenceH hSrcSRS ); 00575 OGRErr CPL_DLL OSRSetTOWGS84( OGRSpatialReferenceH hSRS, 00576 double, double, double, 00577 double, double, double, double ); 00578 OGRErr CPL_DLL OSRGetTOWGS84( OGRSpatialReferenceH hSRS, double *, int ); 00579 00580 OGRErr CPL_DLL OSRSetCompoundCS( OGRSpatialReferenceH hSRS, 00581 const char *pszName, 00582 OGRSpatialReferenceH hHorizSRS, 00583 OGRSpatialReferenceH hVertSRS ); 00584 OGRErr CPL_DLL OSRSetGeogCS( OGRSpatialReferenceH hSRS, 00585 const char * pszGeogName, 00586 const char * pszDatumName, 00587 const char * pszEllipsoidName, 00588 double dfSemiMajor, double dfInvFlattening, 00589 const char * pszPMName /* = NULL */, 00590 double dfPMOffset /* = 0.0 */, 00591 const char * pszUnits /* = NULL */, 00592 double dfConvertToRadians /* = 0.0 */ ); 00593 00594 OGRErr CPL_DLL OSRSetVertCS( OGRSpatialReferenceH hSRS, 00595 const char * pszVertCSName, 00596 const char * pszVertDatumName, 00597 int nVertDatumType ); 00598 00599 double CPL_DLL OSRGetSemiMajor( OGRSpatialReferenceH, OGRErr * /* = NULL */ ); 00600 double CPL_DLL OSRGetSemiMinor( OGRSpatialReferenceH, OGRErr * /* = NULL */ ); 00601 double CPL_DLL OSRGetInvFlattening( OGRSpatialReferenceH, OGRErr * /*=NULL*/); 00602 00603 OGRErr CPL_DLL OSRSetAuthority( OGRSpatialReferenceH hSRS, 00604 const char * pszTargetKey, 00605 const char * pszAuthority, 00606 int nCode ); 00607 const char CPL_DLL *OSRGetAuthorityCode( OGRSpatialReferenceH hSRS, 00608 const char * pszTargetKey ); 00609 const char CPL_DLL *OSRGetAuthorityName( OGRSpatialReferenceH hSRS, 00610 const char * pszTargetKey ); 00611 OGRErr CPL_DLL OSRSetProjection( OGRSpatialReferenceH, const char * ); 00612 OGRErr CPL_DLL OSRSetProjParm( OGRSpatialReferenceH, const char *, double ); 00613 double CPL_DLL OSRGetProjParm( OGRSpatialReferenceH hSRS, 00614 const char * pszParmName, 00615 double dfDefault /* = 0.0 */, 00616 OGRErr * /* = NULL */ ); 00617 OGRErr CPL_DLL OSRSetNormProjParm( OGRSpatialReferenceH, const char *, double); 00618 double CPL_DLL OSRGetNormProjParm( OGRSpatialReferenceH hSRS, 00619 const char * pszParmName, 00620 double dfDefault /* = 0.0 */, 00621 OGRErr * /* = NULL */ ); 00622 00623 OGRErr CPL_DLL OSRSetUTM( OGRSpatialReferenceH hSRS, int nZone, int bNorth ); 00624 int CPL_DLL OSRGetUTMZone( OGRSpatialReferenceH hSRS, int *pbNorth ); 00625 OGRErr CPL_DLL OSRSetStatePlane( OGRSpatialReferenceH hSRS, 00626 int nZone, int bNAD83 ); 00627 OGRErr CPL_DLL OSRSetStatePlaneWithUnits( OGRSpatialReferenceH hSRS, 00628 int nZone, int bNAD83, 00629 const char *pszOverrideUnitName, 00630 double dfOverrideUnit ); 00631 OGRErr CPL_DLL OSRAutoIdentifyEPSG( OGRSpatialReferenceH hSRS ); 00632 00633 int CPL_DLL OSREPSGTreatsAsLatLong( OGRSpatialReferenceH hSRS ); 00634 int CPL_DLL OSREPSGTreatsAsNorthingEasting( OGRSpatialReferenceH hSRS ); 00635 const char CPL_DLL *OSRGetAxis( OGRSpatialReferenceH hSRS, 00636 const char *pszTargetKey, int iAxis, 00637 OGRAxisOrientation *peOrientation ); 00638 OGRErr CPL_DLL OSRSetAxes( OGRSpatialReferenceH hSRS, 00639 const char *pszTargetKey, 00640 const char *pszXAxisName, 00641 OGRAxisOrientation eXAxisOrientation, 00642 const char *pszYAxisName, 00643 OGRAxisOrientation eYAxisOrientation ); 00645 OGRErr CPL_DLL OSRSetACEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, 00646 double dfCenterLat, double dfCenterLong, 00647 double dfFalseEasting, double dfFalseNorthing ); 00648 00650 OGRErr CPL_DLL OSRSetAE( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, 00651 double dfFalseEasting, double dfFalseNorthing ); 00652 00654 OGRErr CPL_DLL OSRSetBonne(OGRSpatialReferenceH hSRS, 00655 double dfStandardParallel, double dfCentralMeridian, 00656 double dfFalseEasting, double dfFalseNorthing ); 00657 00659 OGRErr CPL_DLL OSRSetCEA( OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian, 00660 double dfFalseEasting, double dfFalseNorthing ); 00661 00663 OGRErr CPL_DLL OSRSetCS( OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, 00664 double dfFalseEasting, double dfFalseNorthing ); 00665 00667 OGRErr CPL_DLL OSRSetEC( OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, 00668 double dfCenterLat, double dfCenterLong, 00669 double dfFalseEasting, double dfFalseNorthing ); 00670 00672 OGRErr CPL_DLL OSRSetEckert( OGRSpatialReferenceH hSRS, int nVariation, 00673 double dfCentralMeridian, 00674 double dfFalseEasting, double dfFalseNorthing ); 00675 00677 OGRErr CPL_DLL OSRSetEckertIV( OGRSpatialReferenceH hSRS, double dfCentralMeridian, 00678 double dfFalseEasting, double dfFalseNorthing ); 00679 00681 OGRErr CPL_DLL OSRSetEckertVI( OGRSpatialReferenceH hSRS, double dfCentralMeridian, 00682 double dfFalseEasting, double dfFalseNorthing ); 00683 00685 OGRErr CPL_DLL OSRSetEquirectangular(OGRSpatialReferenceH hSRS, 00686 double dfCenterLat, double dfCenterLong, 00687 double dfFalseEasting, double dfFalseNorthing ); 00688 00690 OGRErr CPL_DLL OSRSetEquirectangular2( OGRSpatialReferenceH hSRS, 00691 double dfCenterLat, double dfCenterLong, 00692 double dfPseudoStdParallel1, 00693 double dfFalseEasting, 00694 double dfFalseNorthing ); 00695 00697 OGRErr CPL_DLL OSRSetGS( OGRSpatialReferenceH hSRS, double dfCentralMeridian, 00698 double dfFalseEasting, double dfFalseNorthing ); 00699 00701 OGRErr CPL_DLL OSRSetGH( OGRSpatialReferenceH hSRS, double dfCentralMeridian, 00702 double dfFalseEasting, double dfFalseNorthing ); 00703 00705 OGRErr CPL_DLL OSRSetIGH( OGRSpatialReferenceH hSRS ); 00706 00708 OGRErr CPL_DLL OSRSetGEOS( OGRSpatialReferenceH hSRS, 00709 double dfCentralMeridian, double dfSatelliteHeight, 00710 double dfFalseEasting, double dfFalseNorthing ); 00711 00713 OGRErr CPL_DLL OSRSetGaussSchreiberTMercator( OGRSpatialReferenceH hSRS, 00714 double dfCenterLat, double dfCenterLong, 00715 double dfScale, 00716 double dfFalseEasting, 00717 double dfFalseNorthing ); 00719 OGRErr CPL_DLL OSRSetGnomonic(OGRSpatialReferenceH hSRS, 00720 double dfCenterLat, double dfCenterLong, 00721 double dfFalseEasting, double dfFalseNorthing ); 00722 00724 OGRErr CPL_DLL OSRSetOM( OGRSpatialReferenceH hSRS, 00725 double dfCenterLat, double dfCenterLong, 00726 double dfAzimuth, double dfRectToSkew, 00727 double dfScale, 00728 double dfFalseEasting, double dfFalseNorthing ); 00729 00731 OGRErr CPL_DLL OSRSetHOM( OGRSpatialReferenceH hSRS, 00732 double dfCenterLat, double dfCenterLong, 00733 double dfAzimuth, double dfRectToSkew, 00734 double dfScale, 00735 double dfFalseEasting, double dfFalseNorthing ); 00736 00737 OGRErr CPL_DLL OSRSetHOMAC( OGRSpatialReferenceH hSRS, 00738 double dfCenterLat, double dfCenterLong, 00739 double dfAzimuth, double dfRectToSkew, 00740 double dfScale, 00741 double dfFalseEasting, 00742 double dfFalseNorthing ); 00743 00745 OGRErr CPL_DLL OSRSetHOM2PNO( OGRSpatialReferenceH hSRS, double dfCenterLat, 00746 double dfLat1, double dfLong1, 00747 double dfLat2, double dfLong2, 00748 double dfScale, 00749 double dfFalseEasting, double dfFalseNorthing ); 00750 00752 OGRErr CPL_DLL OSRSetIWMPolyconic( OGRSpatialReferenceH hSRS, 00753 double dfLat1, double dfLat2, 00754 double dfCenterLong, 00755 double dfFalseEasting, 00756 double dfFalseNorthing ); 00757 00759 OGRErr CPL_DLL OSRSetKrovak( OGRSpatialReferenceH hSRS, 00760 double dfCenterLat, double dfCenterLong, 00761 double dfAzimuth, double dfPseudoStdParallelLat, 00762 double dfScale, 00763 double dfFalseEasting, double dfFalseNorthing ); 00764 00766 OGRErr CPL_DLL OSRSetLAEA( OGRSpatialReferenceH hSRS, 00767 double dfCenterLat, double dfCenterLong, 00768 double dfFalseEasting, double dfFalseNorthing ); 00769 00771 OGRErr CPL_DLL OSRSetLCC( OGRSpatialReferenceH hSRS, 00772 double dfStdP1, double dfStdP2, 00773 double dfCenterLat, double dfCenterLong, 00774 double dfFalseEasting, double dfFalseNorthing ); 00775 00777 OGRErr CPL_DLL OSRSetLCC1SP( OGRSpatialReferenceH hSRS, 00778 double dfCenterLat, double dfCenterLong, 00779 double dfScale, 00780 double dfFalseEasting, double dfFalseNorthing ); 00781 00783 OGRErr CPL_DLL OSRSetLCCB( OGRSpatialReferenceH hSRS, 00784 double dfStdP1, double dfStdP2, 00785 double dfCenterLat, double dfCenterLong, 00786 double dfFalseEasting, double dfFalseNorthing ); 00787 00789 OGRErr CPL_DLL OSRSetMC( OGRSpatialReferenceH hSRS, 00790 double dfCenterLat, double dfCenterLong, 00791 double dfFalseEasting, double dfFalseNorthing ); 00792 00794 OGRErr CPL_DLL OSRSetMercator( OGRSpatialReferenceH hSRS, 00795 double dfCenterLat, double dfCenterLong, 00796 double dfScale, 00797 double dfFalseEasting, double dfFalseNorthing ); 00798 00800 OGRErr CPL_DLL OSRSetMercator2SP( OGRSpatialReferenceH hSRS, 00801 double dfStdP1, 00802 double dfCenterLat, double dfCenterLong, 00803 double dfFalseEasting, double dfFalseNorthing ); 00804 00806 OGRErr CPL_DLL OSRSetMollweide( OGRSpatialReferenceH hSRS, 00807 double dfCentralMeridian, 00808 double dfFalseEasting, 00809 double dfFalseNorthing ); 00810 00812 OGRErr CPL_DLL OSRSetNZMG( OGRSpatialReferenceH hSRS, 00813 double dfCenterLat, double dfCenterLong, 00814 double dfFalseEasting, double dfFalseNorthing ); 00815 00817 OGRErr CPL_DLL OSRSetOS( OGRSpatialReferenceH hSRS, 00818 double dfOriginLat, double dfCMeridian, 00819 double dfScale, 00820 double dfFalseEasting,double dfFalseNorthing); 00821 00823 OGRErr CPL_DLL OSRSetOrthographic( OGRSpatialReferenceH hSRS, 00824 double dfCenterLat, double dfCenterLong, 00825 double dfFalseEasting, 00826 double dfFalseNorthing); 00827 00829 OGRErr CPL_DLL OSRSetPolyconic( OGRSpatialReferenceH hSRS, 00830 double dfCenterLat, double dfCenterLong, 00831 double dfFalseEasting, double dfFalseNorthing ); 00832 00834 OGRErr CPL_DLL OSRSetPS( OGRSpatialReferenceH hSRS, 00835 double dfCenterLat, double dfCenterLong, 00836 double dfScale, 00837 double dfFalseEasting, double dfFalseNorthing); 00838 00840 OGRErr CPL_DLL OSRSetRobinson( OGRSpatialReferenceH hSRS, 00841 double dfCenterLong, 00842 double dfFalseEasting, double dfFalseNorthing ); 00843 00845 OGRErr CPL_DLL OSRSetSinusoidal( OGRSpatialReferenceH hSRS, 00846 double dfCenterLong, 00847 double dfFalseEasting, 00848 double dfFalseNorthing ); 00849 00851 OGRErr CPL_DLL OSRSetStereographic( OGRSpatialReferenceH hSRS, 00852 double dfCenterLat, double dfCenterLong, 00853 double dfScale, 00854 double dfFalseEasting, 00855 double dfFalseNorthing); 00856 00858 OGRErr CPL_DLL OSRSetSOC( OGRSpatialReferenceH hSRS, 00859 double dfLatitudeOfOrigin, double dfCentralMeridian, 00860 double dfFalseEasting, double dfFalseNorthing ); 00861 00868 OGRErr CPL_DLL OSRSetTM( OGRSpatialReferenceH hSRS, 00869 double dfCenterLat, double dfCenterLong, 00870 double dfScale, 00871 double dfFalseEasting, double dfFalseNorthing ); 00872 00874 OGRErr CPL_DLL OSRSetTMVariant( 00875 OGRSpatialReferenceH hSRS, const char *pszVariantName, 00876 double dfCenterLat, double dfCenterLong, 00877 double dfScale, 00878 double dfFalseEasting, double dfFalseNorthing ); 00879 00881 OGRErr CPL_DLL OSRSetTMG( OGRSpatialReferenceH hSRS, 00882 double dfCenterLat, double dfCenterLong, 00883 double dfFalseEasting, double dfFalseNorthing ); 00884 00886 OGRErr CPL_DLL OSRSetTMSO( OGRSpatialReferenceH hSRS, 00887 double dfCenterLat, double dfCenterLong, 00888 double dfScale, 00889 double dfFalseEasting, double dfFalseNorthing ); 00890 00892 OGRErr CPL_DLL OSRSetTPED( OGRSpatialReferenceH hSRS, 00893 double dfLat1, double dfLong1, 00894 double dfLat2, double dfLong2, 00895 double dfFalseEasting, double dfFalseNorthing ); 00896 00898 OGRErr CPL_DLL OSRSetVDG( OGRSpatialReferenceH hSRS, 00899 double dfCenterLong, 00900 double dfFalseEasting, double dfFalseNorthing ); 00901 00903 OGRErr CPL_DLL OSRSetWagner( OGRSpatialReferenceH hSRS, int nVariation, 00904 double dfCenterLat, 00905 double dfFalseEasting, 00906 double dfFalseNorthing ); 00907 00909 OGRErr CPL_DLL OSRSetQSC( OGRSpatialReferenceH hSRS, 00910 double dfCenterLat, double dfCenterLong ); 00911 00913 OGRErr CPL_DLL OSRSetSCH( OGRSpatialReferenceH hSRS, 00914 double dfPegLat, double dfPegLong, 00915 double dfPegHeading, double dfPegHgt); 00916 00917 double CPL_DLL OSRCalcInvFlattening( double dfSemiMajor, double dfSemiMinor ); 00918 double CPL_DLL OSRCalcSemiMinorFromInvFlattening( double dfSemiMajor, double dfInvFlattening ); 00919 00920 void CPL_DLL OSRCleanup( void ); 00921 00922 /* -------------------------------------------------------------------- */ 00923 /* OGRCoordinateTransform C API. */ 00924 /* -------------------------------------------------------------------- */ 00925 OGRCoordinateTransformationH CPL_DLL CPL_STDCALL 00926 OCTNewCoordinateTransformation( OGRSpatialReferenceH hSourceSRS, 00927 OGRSpatialReferenceH hTargetSRS ); 00928 void CPL_DLL CPL_STDCALL 00929 OCTDestroyCoordinateTransformation( OGRCoordinateTransformationH ); 00930 00931 int CPL_DLL CPL_STDCALL 00932 OCTTransform( OGRCoordinateTransformationH hCT, 00933 int nCount, double *x, double *y, double *z ); 00934 00935 int CPL_DLL CPL_STDCALL 00936 OCTTransformEx( OGRCoordinateTransformationH hCT, 00937 int nCount, double *x, double *y, double *z, 00938 int *pabSuccess ); 00939 00941 /* this is really private to OGR. */ 00942 char *OCTProj4Normalize( const char *pszProj4Src ); 00943 00944 void OCTCleanupProjMutex( void ); 00947 /* -------------------------------------------------------------------- */ 00948 /* Projection transform dictionary query. */ 00949 /* -------------------------------------------------------------------- */ 00950 00951 char CPL_DLL ** OPTGetProjectionMethods( void ); 00952 char CPL_DLL ** OPTGetParameterList( const char * pszProjectionMethod, 00953 char ** ppszUserName ); 00954 int CPL_DLL OPTGetParameterInfo( const char * pszProjectionMethod, 00955 const char * pszParameterName, 00956 char ** ppszUserName, 00957 char ** ppszType, 00958 double *pdfDefaultValue ); 00959 00960 CPL_C_END 00961 00962 #endif /* ndef SWIG */ 00963 00964 #endif /* ndef OGR_SRS_API_H_INCLUDED */
1.7.6.1.