MCPcopy Create free account
hub / github.com/LAStools/LAStools / get_GeographicTypeGeoKey

Method get_GeographicTypeGeoKey

src/geoprojectionconverter.cpp:3411–3456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3409}
3410
3411short GeoProjectionConverter::get_GeographicTypeGeoKey() const {
3412 if (num_geo_keys) {
3413 for (int i = 0; i < num_geo_keys; i++) {
3414 if (geo_keys[i].key_id == 2048) {
3415 return geo_keys[i].value_offset;
3416 }
3417 }
3418 }
3419 // if not in geo keys maybe GCS code was set
3420 if (gcs_code != -1) {
3421 return gcs_code;
3422 }
3423 switch (ellipsoid->id) {
3424 case GEO_ELLIPSOID_AIRY: // GCSE_Airy1830
3425 return 4001;
3426 case 2: // GCSE_AustralianNationalSpheroid
3427 return 4003;
3428 case GEO_ELLIPSOID_BESSEL_1841: // GCSE_Bessel1841
3429 return 4004;
3430 case GEO_ELLIPSOID_BESSEL_NAMIBIA: // GCSE_BesselNamibia
3431 return 4006;
3432 case GEO_ELLIPSOID_CLARKE1866: // GCS_NAD27
3433 return 4267;
3434 case GEO_ELLIPSOID_CLARKE1880: // GCSE_Clarke1880
3435 return 4034;
3436 case GEO_ELLIPSOID_GRS1980: // GCS_NAD83
3437 return 4269;
3438 case 12: // GCSE_Helmert1906
3439 return 4020;
3440 case GEO_ELLIPSOID_INTERNATIONAL: // GCSE_International1924
3441 return 4022;
3442 case GEO_ELLIPSOID_KRASSOWSKY: // GCSE_Krassowsky1940
3443 return 4024;
3444 case 16: // GCSE_AiryModified1849
3445 return 4002;
3446 case 17: // GCSE_Everest1830Modified
3447 return 4018;
3448 case GEO_ELLIPSOID_WGS72: // GCS_WGS_72
3449 return 4322;
3450 case GEO_ELLIPSOID_WGS84: // GCS_WGS_84
3451 return 4326;
3452 default:
3453 if (!disable_messages) LASMessage(LAS_SERIOUS_WARNING, "GeographicTypeGeoKey: look-up for ellipsoid with id %d not implemented", ellipsoid->id);
3454 }
3455 return 0;
3456}
3457
3458short GeoProjectionConverter::get_GeogGeodeticDatumGeoKey() const {
3459 if (num_geo_keys) {

Callers

nothing calls this directly

Calls 1

LASMessageFunction · 0.85

Tested by

no test coverage detected