1 /* Converted to D from C:/devLibs/gdal21/include/ogr_srs_api.h by htod */ 2 module gdal.ogr.srsapi; 3 /****************************************************************************** 4 * $Id: ogr_srs_api.h 33631 2016-03-04 06:28:09Z goatbar $ 5 * 6 * Project: OpenGIS Simple Features Reference Implementation 7 * Purpose: C API and constant declarations for OGR Spatial References. 8 * Author: Frank Warmerdam, warmerdam@pobox.com 9 * 10 ****************************************************************************** 11 * Copyright (c) 2000, Frank Warmerdam 12 * Copyright (c) 2008-2013, Even Rouault <even dot rouault at mines-paris dot org> 13 * 14 * Permission is hereby granted, free of charge, to any person obtaining a 15 * copy of this software and associated documentation files (the "Software"), 16 * to deal in the Software without restriction, including without limitation 17 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 18 * and/or sell copies of the Software, and to permit persons to whom the 19 * Software is furnished to do so, subject to the following conditions: 20 * 21 * The above copyright notice and this permission notice shall be included 22 * in all copies or substantial portions of the Software. 23 * 24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 25 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 27 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 29 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 30 * DEALINGS IN THE SOFTWARE. 31 ****************************************************************************/ 32 import gdal.ogr.core; 33 34 /** 35 * \file ogr_srs_api.h 36 * 37 * C spatial reference system services and defines. 38 * 39 * See also: ogr_spatialref.h 40 */ 41 42 /* -------------------------------------------------------------------- */ 43 /* Axis orientations (corresponds to CS_AxisOrientationEnum). */ 44 /* -------------------------------------------------------------------- */ 45 enum 46 { 47 OAO_Other = 0, 48 OAO_North = 1, 49 OAO_South = 2, 50 OAO_East = 3, 51 OAO_West = 4, 52 OAO_Up = 5, 53 OAO_Down = 6, 54 } 55 extern (C): 56 alias int OGRAxisOrientation; 57 58 const(char)* OSRAxisEnumToName(OGRAxisOrientation eOrientation) nothrow @nogc; 59 60 /* -------------------------------------------------------------------- */ 61 /* Datum types (corresponds to CS_DatumType). */ 62 /* -------------------------------------------------------------------- */ 63 64 enum 65 { 66 ODT_HD_Min = 1000, 67 ODT_HD_Other = 1000, 68 ODT_HD_Classic = 1001, 69 ODT_HD_Geocentric = 1002, 70 ODT_HD_Max = 1999, 71 ODT_VD_Min = 2000, 72 ODT_VD_Other = 2000, 73 ODT_VD_Orthometric = 2001, 74 ODT_VD_Ellipsoidal = 2002, 75 ODT_VD_AltitudeBarometric = 2003, 76 ODT_VD_Normal = 2004, 77 ODT_VD_GeoidModelDerived = 2005, 78 ODT_VD_Depth = 2006, 79 ODT_VD_Max = 2999, 80 ODT_LD_Min = 10000, 81 ODT_LD_Max = 32767, 82 } 83 alias int OGRDatumType; 84 85 /* ==================================================================== */ 86 /* Some standard WKT geographic coordinate systems. */ 87 /* ==================================================================== */ 88 89 enum 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\"]]"; 90 91 /* ==================================================================== */ 92 /* Some "standard" strings. */ 93 /* ==================================================================== */ 94 95 enum SRS_PT_ALBERS_CONIC_EQUAL_AREA = "Albers_Conic_Equal_Area"; 96 enum SRS_PT_AZIMUTHAL_EQUIDISTANT = "Azimuthal_Equidistant"; 97 enum SRS_PT_CASSINI_SOLDNER = "Cassini_Soldner"; 98 enum SRS_PT_CYLINDRICAL_EQUAL_AREA = "Cylindrical_Equal_Area"; 99 enum SRS_PT_BONNE = "Bonne"; 100 enum SRS_PT_ECKERT_I = "Eckert_I"; 101 enum SRS_PT_ECKERT_II = "Eckert_II"; 102 enum SRS_PT_ECKERT_III = "Eckert_III"; 103 enum SRS_PT_ECKERT_IV = "Eckert_IV"; 104 enum SRS_PT_ECKERT_V = "Eckert_V"; 105 enum SRS_PT_ECKERT_VI = "Eckert_VI"; 106 enum SRS_PT_EQUIDISTANT_CONIC = "Equidistant_Conic"; 107 enum SRS_PT_EQUIRECTANGULAR = "Equirectangular"; 108 enum SRS_PT_GALL_STEREOGRAPHIC = "Gall_Stereographic"; 109 enum SRS_PT_GAUSSSCHREIBERTMERCATOR = "Gauss_Schreiber_Transverse_Mercator"; 110 enum SRS_PT_GEOSTATIONARY_SATELLITE = "Geostationary_Satellite"; 111 enum SRS_PT_GOODE_HOMOLOSINE = "Goode_Homolosine"; 112 enum SRS_PT_IGH = "Interrupted_Goode_Homolosine"; 113 enum SRS_PT_GNOMONIC = "Gnomonic"; 114 enum SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER = "Hotine_Oblique_Mercator_Azimuth_Center"; 115 enum SRS_PT_HOTINE_OBLIQUE_MERCATOR = "Hotine_Oblique_Mercator"; 116 enum SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN = "Hotine_Oblique_Mercator_Two_Point_Natural_Origin"; 117 enum SRS_PT_LABORDE_OBLIQUE_MERCATOR = "Laborde_Oblique_Mercator"; 118 enum SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP = "Lambert_Conformal_Conic_1SP"; 119 enum SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP = "Lambert_Conformal_Conic_2SP"; 120 enum SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM = "Lambert_Conformal_Conic_2SP_Belgium"; 121 enum SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA = "Lambert_Azimuthal_Equal_Area"; 122 enum SRS_PT_MERCATOR_1SP = "Mercator_1SP"; 123 enum SRS_PT_MERCATOR_2SP = "Mercator_2SP"; 124 // Mercator_Auxiliary_Sphere is used used by ESRI to mean EPSG:3875 125 enum SRS_PT_MERCATOR_AUXILIARY_SPHERE = "Mercator_Auxiliary_Sphere"; 126 enum SRS_PT_MILLER_CYLINDRICAL = "Miller_Cylindrical"; 127 enum SRS_PT_MOLLWEIDE = "Mollweide"; 128 enum SRS_PT_NEW_ZEALAND_MAP_GRID = "New_Zealand_Map_Grid"; 129 enum SRS_PT_OBLIQUE_STEREOGRAPHIC = "Oblique_Stereographic"; 130 enum SRS_PT_ORTHOGRAPHIC = "Orthographic"; 131 enum SRS_PT_POLAR_STEREOGRAPHIC = "Polar_Stereographic"; 132 enum SRS_PT_POLYCONIC = "Polyconic"; 133 enum SRS_PT_ROBINSON = "Robinson"; 134 enum SRS_PT_SINUSOIDAL = "Sinusoidal"; 135 enum SRS_PT_STEREOGRAPHIC = "Stereographic"; 136 enum SRS_PT_SWISS_OBLIQUE_CYLINDRICAL = "Swiss_Oblique_Cylindrical"; 137 enum SRS_PT_TRANSVERSE_MERCATOR = "Transverse_Mercator"; 138 enum SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED = "Transverse_Mercator_South_Orientated"; 139 140 /* special mapinfo variants on Transverse Mercator */ 141 enum SRS_PT_TRANSVERSE_MERCATOR_MI_21 = "Transverse_Mercator_MapInfo_21"; 142 enum SRS_PT_TRANSVERSE_MERCATOR_MI_22 = "Transverse_Mercator_MapInfo_22"; 143 enum SRS_PT_TRANSVERSE_MERCATOR_MI_23 = "Transverse_Mercator_MapInfo_23"; 144 enum SRS_PT_TRANSVERSE_MERCATOR_MI_24 = "Transverse_Mercator_MapInfo_24"; 145 enum SRS_PT_TRANSVERSE_MERCATOR_MI_25 = "Transverse_Mercator_MapInfo_25"; 146 147 enum SRS_PT_TUNISIA_MINING_GRID = "Tunisia_Mining_Grid"; 148 enum SRS_PT_TWO_POINT_EQUIDISTANT = "Two_Point_Equidistant"; 149 enum SRS_PT_VANDERGRINTEN = "VanDerGrinten"; 150 enum SRS_PT_KROVAK = "Krovak"; 151 enum SRS_PT_IMW_POLYCONIC = "International_Map_of_the_World_Polyconic"; 152 enum SRS_PT_WAGNER_I = "Wagner_I"; 153 enum SRS_PT_WAGNER_II = "Wagner_II"; 154 enum SRS_PT_WAGNER_III = "Wagner_III"; 155 enum SRS_PT_WAGNER_IV = "Wagner_IV"; 156 enum SRS_PT_WAGNER_V = "Wagner_V"; 157 enum SRS_PT_WAGNER_VI = "Wagner_VI"; 158 enum SRS_PT_WAGNER_VII = "Wagner_VII"; 159 enum SRS_PT_QSC = "Quadrilateralized_Spherical_Cube"; 160 enum SRS_PT_AITOFF = "Aitoff"; 161 enum SRS_PT_WINKEL_I = "Winkel_I"; 162 enum SRS_PT_WINKEL_II = "Winkel_II"; 163 enum SRS_PT_WINKEL_TRIPEL = "Winkel_Tripel"; 164 enum SRS_PT_CRASTER_PARABOLIC = "Craster_Parabolic"; 165 enum SRS_PT_LOXIMUTHAL = "Loximuthal"; 166 enum SRS_PT_QUARTIC_AUTHALIC = "Quartic_Authalic"; 167 enum SRS_PT_SCH = "Spherical_Cross_Track_Height"; 168 169 enum SRS_PP_CENTRAL_MERIDIAN = "central_meridian"; 170 enum SRS_PP_SCALE_FACTOR = "scale_factor"; 171 enum SRS_PP_STANDARD_PARALLEL_1 = "standard_parallel_1"; 172 enum SRS_PP_STANDARD_PARALLEL_2 = "standard_parallel_2"; 173 enum SRS_PP_PSEUDO_STD_PARALLEL_1 = "pseudo_standard_parallel_1"; 174 enum SRS_PP_LONGITUDE_OF_CENTER = "longitude_of_center"; 175 enum SRS_PP_LATITUDE_OF_CENTER = "latitude_of_center"; 176 enum SRS_PP_LONGITUDE_OF_ORIGIN = "longitude_of_origin"; 177 enum SRS_PP_LATITUDE_OF_ORIGIN = "latitude_of_origin"; 178 enum SRS_PP_FALSE_EASTING = "false_easting"; 179 enum SRS_PP_FALSE_NORTHING = "false_northing"; 180 enum SRS_PP_AZIMUTH = "azimuth"; 181 enum SRS_PP_LONGITUDE_OF_POINT_1 = "longitude_of_point_1"; 182 enum SRS_PP_LATITUDE_OF_POINT_1 = "latitude_of_point_1"; 183 enum SRS_PP_LONGITUDE_OF_POINT_2 = "longitude_of_point_2"; 184 enum SRS_PP_LATITUDE_OF_POINT_2 = "latitude_of_point_2"; 185 enum SRS_PP_LONGITUDE_OF_POINT_3 = "longitude_of_point_3"; 186 enum SRS_PP_LATITUDE_OF_POINT_3 = "latitude_of_point_3"; 187 enum SRS_PP_RECTIFIED_GRID_ANGLE = "rectified_grid_angle"; 188 enum SRS_PP_LANDSAT_NUMBER = "landsat_number"; 189 enum SRS_PP_PATH_NUMBER = "path_number"; 190 enum SRS_PP_PERSPECTIVE_POINT_HEIGHT = "perspective_point_height"; 191 enum SRS_PP_SATELLITE_HEIGHT = "satellite_height"; 192 enum SRS_PP_FIPSZONE = "fipszone"; 193 enum SRS_PP_ZONE = "zone"; 194 enum SRS_PP_LATITUDE_OF_1ST_POINT = "Latitude_Of_1st_Point"; 195 enum SRS_PP_LONGITUDE_OF_1ST_POINT = "Longitude_Of_1st_Point"; 196 enum SRS_PP_LATITUDE_OF_2ND_POINT = "Latitude_Of_2nd_Point"; 197 enum SRS_PP_LONGITUDE_OF_2ND_POINT = "Longitude_Of_2nd_Point"; 198 enum SRS_PP_PEG_POINT_LATITUDE = "peg_point_latitude"; 199 enum SRS_PP_PEG_POINT_LONGITUDE = "peg_point_longitude"; 200 enum SRS_PP_PEG_POINT_HEADING = "peg_point_heading"; 201 enum SRS_PP_PEG_POINT_HEIGHT = "peg_point_height"; 202 203 enum SRS_UL_METER = "Meter"; 204 enum SRS_UL_FOOT = "Foot (International)"; /* or just "FOOT"? */ 205 enum SRS_UL_FOOT_CONV = "0.3048"; 206 enum SRS_UL_US_FOOT = "Foot_US"; /* or "US survey foot" from EPSG */ 207 enum SRS_UL_US_FOOT_CONV = "0.3048006096012192"; 208 enum SRS_UL_NAUTICAL_MILE = "Nautical Mile"; 209 enum SRS_UL_NAUTICAL_MILE_CONV = "1852.0"; 210 enum SRS_UL_LINK = "Link"; /* Based on US Foot */ 211 enum SRS_UL_LINK_CONV = "0.20116684023368047"; 212 enum SRS_UL_CHAIN = "Chain"; /* based on US Foot */ 213 enum SRS_UL_CHAIN_CONV = "20.116684023368047"; 214 enum SRS_UL_ROD = "Rod"; /* based on US Foot */ 215 enum SRS_UL_ROD_CONV = "5.02921005842012"; 216 enum SRS_UL_LINK_Clarke = "Link_Clarke"; 217 enum SRS_UL_LINK_Clarke_CONV = "0.2011661949"; 218 219 enum SRS_UL_KILOMETER = "Kilometer"; 220 enum SRS_UL_KILOMETER_CONV = "1000."; 221 enum SRS_UL_DECIMETER = "Decimeter"; 222 enum SRS_UL_DECIMETER_CONV = "0.1"; 223 enum SRS_UL_CENTIMETER = "Centimeter"; 224 enum SRS_UL_CENTIMETER_CONV = "0.01"; 225 enum SRS_UL_MILLIMETER = "Millimeter"; 226 enum SRS_UL_MILLIMETER_CONV = "0.001"; 227 enum SRS_UL_INTL_NAUT_MILE = "Nautical_Mile_International"; 228 enum SRS_UL_INTL_NAUT_MILE_CONV = "1852.0"; 229 enum SRS_UL_INTL_INCH = "Inch_International"; 230 enum SRS_UL_INTL_INCH_CONV = "0.0254"; 231 enum SRS_UL_INTL_FOOT = "Foot_International"; 232 enum SRS_UL_INTL_FOOT_CONV = "0.3048"; 233 enum SRS_UL_INTL_YARD = "Yard_International"; 234 enum SRS_UL_INTL_YARD_CONV = "0.9144"; 235 enum SRS_UL_INTL_STAT_MILE = "Statute_Mile_International"; 236 enum SRS_UL_INTL_STAT_MILE_CONV = "1609.344"; 237 enum SRS_UL_INTL_FATHOM = "Fathom_International"; 238 enum SRS_UL_INTL_FATHOM_CONV = "1.8288"; 239 enum SRS_UL_INTL_CHAIN = "Chain_International"; 240 enum SRS_UL_INTL_CHAIN_CONV = "20.1168"; 241 enum SRS_UL_INTL_LINK = "Link_International"; 242 enum SRS_UL_INTL_LINK_CONV = "0.201168"; 243 enum SRS_UL_US_INCH = "Inch_US_Surveyor"; 244 enum SRS_UL_US_INCH_CONV = "0.025400050800101603"; 245 enum SRS_UL_US_YARD = "Yard_US_Surveyor"; 246 enum SRS_UL_US_YARD_CONV = "0.914401828803658"; 247 enum SRS_UL_US_CHAIN = "Chain_US_Surveyor"; 248 enum SRS_UL_US_CHAIN_CONV = "20.11684023368047"; 249 enum SRS_UL_US_STAT_MILE = "Statute_Mile_US_Surveyor"; 250 enum SRS_UL_US_STAT_MILE_CONV = "1609.347218694437"; 251 enum SRS_UL_INDIAN_YARD = "Yard_Indian"; 252 enum SRS_UL_INDIAN_YARD_CONV = "0.91439523"; 253 enum SRS_UL_INDIAN_FOOT = "Foot_Indian"; 254 enum SRS_UL_INDIAN_FOOT_CONV = "0.30479841"; 255 enum SRS_UL_INDIAN_CHAIN = "Chain_Indian"; 256 enum SRS_UL_INDIAN_CHAIN_CONV = "20.11669506"; 257 258 enum SRS_UA_DEGREE = "degree"; 259 enum SRS_UA_DEGREE_CONV = "0.0174532925199433"; 260 enum SRS_UA_RADIAN = "radian"; 261 262 enum SRS_PM_GREENWICH = "Greenwich"; 263 264 enum SRS_DN_NAD27 = "North_American_Datum_1927"; 265 enum SRS_DN_NAD83 = "North_American_Datum_1983"; 266 enum SRS_DN_WGS72 = "WGS_1972"; 267 enum SRS_DN_WGS84 = "WGS_1984"; 268 269 enum SRS_WGS84_SEMIMAJOR = 6378137.0; 270 enum SRS_WGS84_INVFLATTENING = 298.257223563; 271 /* -------------------------------------------------------------------- */ 272 /* C Wrappers for C++ objects and methods. */ 273 /* -------------------------------------------------------------------- */ 274 alias void *OGRSpatialReferenceH; 275 alias void *OGRCoordinateTransformationH; 276 277 extern (System): 278 OGRSpatialReferenceH OSRNewSpatialReference(const(char) *) nothrow @nogc; 279 OGRSpatialReferenceH OSRCloneGeogCS(OGRSpatialReferenceH ) nothrow @nogc; 280 OGRSpatialReferenceH OSRClone(OGRSpatialReferenceH ) nothrow @nogc; 281 void OSRDestroySpatialReference(OGRSpatialReferenceH ) nothrow @nogc; 282 283 extern (C): 284 int OSRReference(OGRSpatialReferenceH ) nothrow @nogc; 285 int OSRDereference(OGRSpatialReferenceH ) nothrow @nogc; 286 void OSRRelease(OGRSpatialReferenceH ) nothrow @nogc; 287 288 OGRErr OSRValidate(OGRSpatialReferenceH ) nothrow @nogc; 289 OGRErr OSRFixupOrdering(OGRSpatialReferenceH ) nothrow @nogc; 290 OGRErr OSRFixup(OGRSpatialReferenceH ) nothrow @nogc; 291 OGRErr OSRStripCTParms(OGRSpatialReferenceH ) nothrow @nogc; 292 293 extern (System): 294 OGRErr OSRImportFromEPSG(OGRSpatialReferenceH , int ) nothrow @nogc; 295 OGRErr OSRImportFromEPSGA(OGRSpatialReferenceH , int ) nothrow @nogc; 296 extern (C): 297 OGRErr OSRImportFromWkt(OGRSpatialReferenceH , char **) nothrow @nogc; 298 OGRErr OSRImportFromProj4(OGRSpatialReferenceH , const(char) *) nothrow @nogc; 299 OGRErr OSRImportFromESRI(OGRSpatialReferenceH , char **) nothrow @nogc; 300 OGRErr OSRImportFromPCI(OGRSpatialReferenceH hSRS, char *, char *, double *) nothrow @nogc; 301 OGRErr OSRImportFromUSGS(OGRSpatialReferenceH , int , int , double *, int ) nothrow @nogc; 302 OGRErr OSRImportFromXML(OGRSpatialReferenceH , char *) nothrow @nogc; 303 OGRErr OSRImportFromDict(OGRSpatialReferenceH , char *, char *) nothrow @nogc; 304 OGRErr OSRImportFromPanorama(OGRSpatialReferenceH , int , int , int , double *) nothrow @nogc; 305 OGRErr OSRImportFromOzi(OGRSpatialReferenceH , const(char*)*) nothrow @nogc; 306 OGRErr OSRImportFromMICoordSys(OGRSpatialReferenceH , const(char) *) nothrow @nogc; 307 OGRErr OSRImportFromERM(OGRSpatialReferenceH , const(char) *, const(char) *, const(char) *) nothrow @nogc; 308 OGRErr OSRImportFromUrl(OGRSpatialReferenceH , char *) nothrow @nogc; 309 310 extern (System): 311 OGRErr OSRExportToWkt(OGRSpatialReferenceH , char **) nothrow @nogc; 312 OGRErr OSRExportToPrettyWkt(OGRSpatialReferenceH , char **, int ) nothrow @nogc; 313 OGRErr OSRExportToProj4(OGRSpatialReferenceH , char **) nothrow @nogc; 314 extern (C): 315 OGRErr OSRExportToPCI(OGRSpatialReferenceH , char **, char **, double **) nothrow @nogc; 316 OGRErr OSRExportToUSGS(OGRSpatialReferenceH , int *, int *, double **, int *) nothrow @nogc; 317 OGRErr OSRExportToXML(OGRSpatialReferenceH , char **, const(char) *) nothrow @nogc; 318 OGRErr OSRExportToPanorama(OGRSpatialReferenceH , int *, int *, int *, int *, double *) nothrow @nogc; 319 OGRErr OSRExportToMICoordSys(OGRSpatialReferenceH , char **) nothrow @nogc; 320 OGRErr OSRExportToERM(OGRSpatialReferenceH , char *, char *, char *) nothrow @nogc; 321 322 OGRErr OSRMorphToESRI(OGRSpatialReferenceH ) nothrow @nogc; 323 OGRErr OSRMorphFromESRI(OGRSpatialReferenceH ) nothrow @nogc; 324 325 extern (System): 326 OGRErr OSRSetAttrValue(OGRSpatialReferenceH hSRS, const(char) *pszNodePath, const(char) *pszNewNodeValue) nothrow @nogc; 327 char * OSRGetAttrValue(OGRSpatialReferenceH hSRS, const(char) *pszName, int iChild) nothrow @nogc; 328 329 extern (C): 330 OGRErr OSRSetAngularUnits(OGRSpatialReferenceH , const(char) *, double ) nothrow @nogc; 331 double OSRGetAngularUnits(OGRSpatialReferenceH , char **) nothrow @nogc; 332 OGRErr OSRSetLinearUnits(OGRSpatialReferenceH , const(char) *, double ) nothrow @nogc; 333 OGRErr OSRSetTargetLinearUnits(OGRSpatialReferenceH , const(char) *, const(char) *, double ) nothrow @nogc; 334 OGRErr OSRSetLinearUnitsAndUpdateParameters(OGRSpatialReferenceH , const(char) *, double ) nothrow @nogc; 335 double OSRGetLinearUnits(OGRSpatialReferenceH , char **) nothrow @nogc; 336 double OSRGetTargetLinearUnits(OGRSpatialReferenceH , char *, char **) nothrow @nogc; 337 338 double OSRGetPrimeMeridian(OGRSpatialReferenceH , char **) nothrow @nogc; 339 340 int OSRIsGeographic(OGRSpatialReferenceH ) nothrow @nogc; 341 int OSRIsLocal(OGRSpatialReferenceH ) nothrow @nogc; 342 int OSRIsProjected(OGRSpatialReferenceH ) nothrow @nogc; 343 int OSRIsCompound(OGRSpatialReferenceH ) nothrow @nogc; 344 int OSRIsGeocentric(OGRSpatialReferenceH ) nothrow @nogc; 345 int OSRIsVertical(OGRSpatialReferenceH ) nothrow @nogc; 346 int OSRIsSameGeogCS(OGRSpatialReferenceH , OGRSpatialReferenceH ) nothrow @nogc; 347 int OSRIsSameVertCS(OGRSpatialReferenceH , OGRSpatialReferenceH ) nothrow @nogc; 348 int OSRIsSame(OGRSpatialReferenceH , OGRSpatialReferenceH ) nothrow @nogc; 349 350 OGRErr OSRSetLocalCS(OGRSpatialReferenceH hSRS, const(char) *pszName) nothrow @nogc; 351 OGRErr OSRSetProjCS(OGRSpatialReferenceH hSRS, const(char) *pszName) nothrow @nogc; 352 OGRErr OSRSetGeocCS(OGRSpatialReferenceH hSRS, const(char) *pszName) nothrow @nogc; 353 OGRErr OSRSetWellKnownGeogCS(OGRSpatialReferenceH hSRS, const(char) *pszName) nothrow @nogc; 354 extern (System): 355 OGRErr OSRSetFromUserInput(OGRSpatialReferenceH hSRS, const(char) *) nothrow @nogc; 356 extern (C): 357 OGRErr OSRCopyGeogCSFrom(OGRSpatialReferenceH hSRS, OGRSpatialReferenceH hSrcSRS) nothrow @nogc; 358 OGRErr OSRSetTOWGS84(OGRSpatialReferenceH hSRS, double , double , double , double , double , double , double ) nothrow @nogc; 359 OGRErr OSRGetTOWGS84(OGRSpatialReferenceH hSRS, double *, int ) nothrow @nogc; 360 361 OGRErr OSRSetCompoundCS(OGRSpatialReferenceH hSRS, const(char) *pszName, OGRSpatialReferenceH hHorizSRS, OGRSpatialReferenceH hVertSRS) nothrow @nogc; 362 OGRErr OSRSetGeogCS(OGRSpatialReferenceH hSRS, const(char) *pszGeogName, const(char) *pszDatumName, const(char) *pszEllipsoidName, double dfSemiMajor, double dfInvFlattening, const(char) *pszPMName, double dfPMOffset, const(char) *pszUnits, double dfConvertToRadians) nothrow @nogc; 363 364 OGRErr OSRSetVertCS(OGRSpatialReferenceH hSRS, const(char) *pszVertCSName, const(char) *pszVertDatumName, int nVertDatumType) nothrow @nogc; 365 366 double OSRGetSemiMajor(OGRSpatialReferenceH , OGRErr *) nothrow @nogc; 367 double OSRGetSemiMinor(OGRSpatialReferenceH , OGRErr *) nothrow @nogc; 368 double OSRGetInvFlattening(OGRSpatialReferenceH , OGRErr *) nothrow @nogc; 369 370 OGRErr OSRSetAuthority(OGRSpatialReferenceH hSRS, const(char) *pszTargetKey, const(char) *pszAuthority, int nCode) nothrow @nogc; 371 char * OSRGetAuthorityCode(OGRSpatialReferenceH hSRS, const(char) *pszTargetKey) nothrow @nogc; 372 char * OSRGetAuthorityName(OGRSpatialReferenceH hSRS, const(char) *pszTargetKey) nothrow @nogc; 373 OGRErr OSRSetProjection(OGRSpatialReferenceH , const(char) *) nothrow @nogc; 374 OGRErr OSRSetProjParm(OGRSpatialReferenceH , const(char) *, double ) nothrow @nogc; 375 double OSRGetProjParm(OGRSpatialReferenceH hSRS, const(char) *pszParmName, double dfDefault, OGRErr *) nothrow @nogc; 376 OGRErr OSRSetNormProjParm(OGRSpatialReferenceH , const(char) *, double ) nothrow @nogc; 377 double OSRGetNormProjParm(OGRSpatialReferenceH hSRS, const(char) *pszParmName, double dfDefault, OGRErr *) nothrow @nogc; 378 379 OGRErr OSRSetUTM(OGRSpatialReferenceH hSRS, int nZone, int bNorth) nothrow @nogc; 380 int OSRGetUTMZone(OGRSpatialReferenceH hSRS, int *pbNorth) nothrow @nogc; 381 OGRErr OSRSetStatePlane(OGRSpatialReferenceH hSRS, int nZone, int bNAD83) nothrow @nogc; 382 OGRErr OSRSetStatePlaneWithUnits(OGRSpatialReferenceH hSRS, int nZone, int bNAD83, const(char) *pszOverrideUnitName, double dfOverrideUnit) nothrow @nogc; 383 OGRErr OSRAutoIdentifyEPSG(OGRSpatialReferenceH hSRS) nothrow @nogc; 384 385 int OSREPSGTreatsAsLatLong(OGRSpatialReferenceH hSRS) nothrow @nogc; 386 int OSREPSGTreatsAsNorthingEasting(OGRSpatialReferenceH hSRS) nothrow @nogc; 387 const(char) * OSRGetAxis(OGRSpatialReferenceH hSRS, const(char) *pszTargetKey, int iAxis, OGRAxisOrientation *peOrientation) nothrow @nogc; 388 OGRErr OSRSetAxes(OGRSpatialReferenceH hSRS, const(char) *pszTargetKey, const(char) *pszXAxisName, OGRAxisOrientation eXAxisOrientation, const(char) *pszYAxisName, OGRAxisOrientation eYAxisOrientation) nothrow @nogc; 389 /** Albers Conic Equal Area */ 390 OGRErr OSRSetACEA(OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 391 392 /** Azimuthal Equidistant */ 393 OGRErr OSRSetAE(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 394 395 /** Bonne */ 396 OGRErr OSRSetBonne(OGRSpatialReferenceH hSRS, double dfStandardParallel, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 397 398 /** Cylindrical Equal Area */ 399 OGRErr OSRSetCEA(OGRSpatialReferenceH hSRS, double dfStdP1, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 400 401 OGRErr OSRSetCS(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 402 403 /** Equidistant Conic */ 404 OGRErr OSRSetEC(OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 405 406 /** Eckert I-VI */ 407 OGRErr OSRSetEckert(OGRSpatialReferenceH hSRS, int nVariation, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 408 409 /** Eckert IV */ 410 OGRErr OSRSetEckertIV(OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 411 412 /** Eckert VI */ 413 OGRErr OSRSetEckertVI(OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 414 415 /** Equirectangular */ 416 OGRErr OSRSetEquirectangular(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 417 418 /** Equirectangular generalized form */ 419 OGRErr OSRSetEquirectangular2(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfPseudoStdParallel1, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 420 421 /** Gall Stereograpic */ 422 OGRErr OSRSetGS(OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 423 424 /** Goode Homolosine */ 425 OGRErr OSRSetGH(OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 426 427 /** Interrupted Goode Homolosine */ 428 OGRErr OSRSetIGH(OGRSpatialReferenceH hSRS) nothrow @nogc; 429 430 /** GEOS - Geostationary Satellite View */ 431 OGRErr OSRSetGEOS(OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfSatelliteHeight, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 432 433 /** Gauss Schreiber Transverse Mercator */ 434 OGRErr OSRSetGaussSchreiberTMercator(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 435 /** Gnomonic */ 436 OGRErr OSRSetGnomonic(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 437 438 /** Oblique Mercator (aka HOM (variant B) */ 439 OGRErr OSRSetOM(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfRectToSkew, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 440 441 /** Hotine Oblique Mercator using azimuth angle */ 442 OGRErr OSRSetHOM(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfRectToSkew, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 443 444 OGRErr OSRSetHOMAC(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfRectToSkew, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 445 446 /** Hotine Oblique Mercator using two points on centerline */ 447 OGRErr OSRSetHOM2PNO(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfLat1, double dfLong1, double dfLat2, double dfLong2, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 448 449 /** International Map of the World Polyconic */ 450 OGRErr OSRSetIWMPolyconic(OGRSpatialReferenceH hSRS, double dfLat1, double dfLat2, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 451 452 /** Krovak Oblique Conic Conformal */ 453 OGRErr OSRSetKrovak(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfAzimuth, double dfPseudoStdParallelLat, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 454 455 /** Lambert Azimuthal Equal-Area */ 456 OGRErr OSRSetLAEA(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 457 458 /** Lambert Conformal Conic */ 459 OGRErr OSRSetLCC(OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 460 461 /** Lambert Conformal Conic 1SP */ 462 OGRErr OSRSetLCC1SP(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 463 464 /** Lambert Conformal Conic (Belgium) */ 465 OGRErr OSRSetLCCB(OGRSpatialReferenceH hSRS, double dfStdP1, double dfStdP2, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 466 467 /** Miller Cylindrical */ 468 OGRErr OSRSetMC(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 469 470 /** Mercator */ 471 OGRErr OSRSetMercator(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 472 OGRErr OSRSetMercator2SP(OGRSpatialReferenceH hSRS, double dfStdP1, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 473 474 /** Mollweide */ 475 OGRErr OSRSetMollweide(OGRSpatialReferenceH hSRS, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 476 477 /** New Zealand Map Grid */ 478 OGRErr OSRSetNZMG(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 479 480 /** Oblique Stereographic */ 481 OGRErr OSRSetOS(OGRSpatialReferenceH hSRS, double dfOriginLat, double dfCMeridian, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 482 483 /** Orthographic */ 484 OGRErr OSRSetOrthographic(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 485 486 /** Polyconic */ 487 OGRErr OSRSetPolyconic(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 488 489 /** Polar Stereographic */ 490 OGRErr OSRSetPS(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 491 492 /** Robinson */ 493 OGRErr OSRSetRobinson(OGRSpatialReferenceH hSRS, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 494 495 /** Sinusoidal */ 496 OGRErr OSRSetSinusoidal(OGRSpatialReferenceH hSRS, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 497 498 /** Stereographic */ 499 OGRErr OSRSetStereographic(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 500 501 /** Swiss Oblique Cylindrical */ 502 OGRErr OSRSetSOC(OGRSpatialReferenceH hSRS, double dfLatitudeOfOrigin, double dfCentralMeridian, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 503 504 /** Transverse Mercator 505 * 506 * Special processing available for Transverse Mercator with GDAL >= 1.10 and PROJ >= 4.8 : 507 * see OGRSpatialReference::exportToProj4(). 508 */ 509 510 OGRErr OSRSetTM(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 511 512 /** Transverse Mercator variant */ 513 OGRErr OSRSetTMVariant(OGRSpatialReferenceH hSRS, const(char) *pszVariantName, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 514 515 /** Tunesia Mining Grid */ 516 OGRErr OSRSetTMG(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 517 518 /** Transverse Mercator (South Oriented) */ 519 OGRErr OSRSetTMSO(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong, double dfScale, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 520 521 OGRErr OSRSetTPED(OGRSpatialReferenceH hSRS, double dfLat1, double dfLong1, double dfLat2, double dfLong2, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 522 523 /** VanDerGrinten */ 524 OGRErr OSRSetVDG(OGRSpatialReferenceH hSRS, double dfCenterLong, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 525 526 /** Wagner I -- VII */ 527 OGRErr OSRSetWagner(OGRSpatialReferenceH hSRS, int nVariation, double dfCenterLat, double dfFalseEasting, double dfFalseNorthing) nothrow @nogc; 528 529 /** Quadrilateralized Spherical Cube */ 530 OGRErr OSRSetQSC(OGRSpatialReferenceH hSRS, double dfCenterLat, double dfCenterLong) nothrow @nogc; 531 532 /** Spherical, Cross-track, Height */ 533 OGRErr OSRSetSCH(OGRSpatialReferenceH hSRS, double dfPegLat, double dfPegLong, double dfPegHeading, double dfPegHgt) nothrow @nogc; 534 535 536 double OSRCalcInvFlattening(double dfSemiMajor, double dfSemiMinor) nothrow @nogc; 537 double OSRCalcSemiMinorFromInvFlattening(double dfSemiMajor, double dfInvFlattening) nothrow @nogc; 538 539 void OSRCleanup() nothrow @nogc; 540 541 /* -------------------------------------------------------------------- */ 542 /* OGRCoordinateTransform C API. */ 543 /* -------------------------------------------------------------------- */ 544 extern (System): 545 OGRCoordinateTransformationH OCTNewCoordinateTransformation(OGRSpatialReferenceH hSourceSRS, OGRSpatialReferenceH hTargetSRS) nothrow @nogc; 546 void OCTDestroyCoordinateTransformation(OGRCoordinateTransformationH ) nothrow @nogc; 547 548 int OCTTransform(OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z) nothrow @nogc; 549 550 int OCTTransformEx(OGRCoordinateTransformationH hCT, int nCount, double *x, double *y, double *z, int *pabSuccess) nothrow @nogc; 551 552 /* this is really private to OGR. */ 553 extern (C): 554 char * OCTProj4Normalize(char *pszProj4Src) nothrow @nogc; 555 556 void OCTCleanupProjMutex() nothrow @nogc; 557 558 /* -------------------------------------------------------------------- */ 559 /* Projection transform dictionary query. */ 560 /* -------------------------------------------------------------------- */ 561 562 char ** OPTGetProjectionMethods() nothrow @nogc; 563 char ** OPTGetParameterList(const(char) *pszProjectionMethod, char **ppszUserName) nothrow @nogc; 564 int OPTGetParameterInfo(const(char) *pszProjectionMethod, const(char) *pszParameterName, char **ppszUserName, char **ppszType, double *pdfDefaultValue) nothrow @nogc;