Class: Proj::Crs
Overview
Represents a coordinate reference system.
Class Method Summary collapse
-
.create_bound(context, base_crs:, hub_crs:, transformation:) ⇒ Crs
Returns a BoundCRS.
-
.create_bound_to_wgs84(context, crs:, allow_intermediate_crs: "NEVER") ⇒ Crs
Returns a BoundCRS with a transformation to EPSG:4326 wrapping it.
-
.create_bound_vertical(context, vertical_crs:, hub_crs:, grid_name:) ⇒ Crs
Create a Bound Vertical CRS, with a transformation to a hub geographic 3D crs, such as EPSG:4979 or WGS84, using a grid.
-
.create_compound(context, name:, horizontal_crs:, vertical_crs:) ⇒ Crs
Create a CompoundCRS.
-
.create_derived_geographic(context, name: nil, base_geographic_crs:, conversion:, coordinate_system:) ⇒ Crs
Create a DerivedGeograhicCRS.
-
.create_engineering(context, name:) ⇒ Crs
Create a a EngineeringCRS.
-
.create_geocentric(context, name:, datum_name:, ellipsoid_name:, semi_major_meter:, inv_flattening:, prime_meridian_name:, prime_meridian_offset:, angular_units:, angular_units_conv:, linear_units:, linear_units_conv:) ⇒ Crs
Create a GeographicCRS.
-
.create_geocentric_from_datum(context, name:, datum:, linear_units:, linear_units_conv:) ⇒ Crs
Create a GeodeticCRS of geocentric type.
-
.create_geographic(context, name:, datum_name:, ellipsoid_name:, semi_major_meter:, inv_flattening:, prime_meridian_name:, prime_meridian_offset:, pm_angular_units:, pm_angular_units_conv:, coordinate_system:) ⇒ Crs
Create a GeographicCRS.
-
.create_geographic_from_datum(context, name:, datum:, coordinate_system:) ⇒ Crs
Create a GeographicCRS from a datum.
-
.create_projected(context, name: nil, geodetic_crs:, conversion:, coordinate_system:) ⇒ Crs
Create a ProjectedCRS.
-
.create_vertical(context, name:, datum_name:, linear_units:, linear_units_conv:) ⇒ Crs
Create a VerticalCRS.
-
.create_vertical_ex(context, name: nil, datum_name: nil, datum_auth_name: nil, datum_code: nil, linear_units: nil, linear_units_conv: 0, geoid_model_name: nil, geoid_model_auth_name: nil, geoid_model_code: nil, geoid_geog_crs: nil, accuracy: nil) ⇒ Crs
Create a VerticalCRS.
-
.query_geodetic_from_datum(context, auth_name: nil, datum_auth_name:, datum_code:, crs_type: nil) ⇒ PjObjects
Find GeodeticCRSes that use the specified datum.
Instance Method Summary collapse
-
#alter_cs_angular_unit(angular_units: nil, angular_units_conv: 0, unit_auth_name: nil, unit_code: nil) ⇒ Crs
Return a copy of the CRS with its angular units changed.
-
#alter_cs_linear_unit(linear_units: nil, linear_units_conv: 0, unit_auth_name: nil, unit_code: nil) ⇒ Crs
Return a copy of the CRS with its linear units changed.
-
#alter_geodetic_crs(new_geod_crs) ⇒ Crs
Return a copy of the CRS with its geodetic CRS changed.
-
#alter_id(auth_name, code) ⇒ Crs
Return a copy of the CRS with its identifier changed.
-
#alter_name(name) ⇒ Crs
Return a copy of the CRS with its name changed.
-
#alter_parameters_linear_unit(linear_units: nil, linear_units_conv: 0, unit_auth_name: nil, unit_code: nil, convert_to_new_unit:) ⇒ Crs
Return a copy of the CRS with its linear units changed.
-
#coordinate_operation ⇒ PjObject
Return the Conversion of a DerivedCRS (such as a ProjectedCRS), or the Transformation from the baseCRS to the hubCRS of a BoundCRS.
-
#coordinate_system ⇒ CoordinateSystem
Returns the coordinate system of a SingleCRS.
-
#datum ⇒ Datum
Returns the datum of a SingleCRS.
-
#datum_ensemble ⇒ DatumEnsemble
Returns the datum ensemble of a SingleCRS.
-
#datum_forced ⇒ Datum
Returns a datum for a SingleCRS.
-
#demote_to_2d(name: nil) ⇒ Crs
Create a 2D CRS from an this 3D CRS.
-
#derived? ⇒ Boolean
Returns whether a CRS is a Derived CRS.
-
#ellipsoid ⇒ PjObject
Returns the ellipsoid.
-
#geodetic_crs ⇒ Crs
Get the geodeticCRS / geographicCRS from a CRS.
-
#horizontal_datum ⇒ Crs
Get the horizontal datum from a CRS.
-
#identify(auth_name) ⇒ Array
Returns a list of matching reference CRS, and the percentage (0-100) of confidence in the match.
-
#initialize(value, context = nil) ⇒ Crs
constructor
To create a coordinate system, you can use CRS codes, well-known text (WKT) strings or old-style Proj4 strings (which are deprecated).
-
#prime_meridian ⇒ PjObject
Returns the prime meridian.
-
#projected_3d(name: nil, geog_3d_crs: nil) ⇒ Crs
Create a projected 3D CRS from this projected 2D CRS.
-
#promote_to_3d(name: nil) ⇒ Crs
Create a 3D CRS from this 2D CRS.
-
#sub_crs(index) ⇒ Crs
Get a CRS component from a CompoundCRS.
Methods inherited from PjObject
#accuracy, #angular_input?, #angular_output?, #area_of_use, #auth, #auth_name, #context, #context=, create, create_from_database, create_from_name, create_from_wkt, #definition, #degree_input?, #degree_output?, #deprecated?, #description, #equivalent_to?, #errno, #errorno, #factors, #geod_distance, #has_inverse?, #id, #id_code, #info, #initialize_copy, #lp_distance, #lpz_distance, #name, #non_deprecated, #proj_type, #remarks, #scope, #source_crs, #target_crs, #to_json, #to_proj_string, #to_ptr, #to_s, #to_wkt, #xy_distance, #xyz_distance
Constructor Details
#initialize(value, context = nil) ⇒ Crs
To create a coordinate system, you can use CRS codes, well-known text (WKT) strings or old-style Proj4 strings (which are deprecated).
Notice when using the old-style Proj4 string, the addition of the “+type=crs” value.
337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/proj/crs.rb', line 337 def initialize(value, context=nil) ptr = Api.proj_create(context || Context.current, value) if ptr.null? Error.check_object(self) end super(ptr, context) if Api.method_defined?(:proj_is_crs) && !Api.proj_is_crs(ptr) raise(Error, "Invalid crs definition. Proj created an instance of: #{self.proj_type}.") end end |
Class Method Details
.create_bound(context, base_crs:, hub_crs:, transformation:) ⇒ Crs
Returns a BoundCRS
34 35 36 37 38 39 40 41 42 |
# File 'lib/proj/crs.rb', line 34 def self.create_bound(context, base_crs:, hub_crs:, transformation:) pointer = Api.proj_crs_create_bound_crs(context, base_crs, hub_crs, transformation) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_bound_to_wgs84(context, crs:, allow_intermediate_crs: "NEVER") ⇒ Crs
Returns a BoundCRS with a transformation to EPSG:4326 wrapping it
* ALWAYS
* IF_NO_DIRECT_TRANSFORMATION
* NEVER
Default is NEVER
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/proj/crs.rb', line 57 def self.create_bound_to_wgs84(context, crs:, allow_intermediate_crs: "NEVER") = {"ALLOW_INTERMEDIATE_CRS": allow_intermediate_crs} = () pointer = Api.proj_crs_create_bound_crs_to_WGS84(context, crs, ) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_bound_vertical(context, vertical_crs:, hub_crs:, grid_name:) ⇒ Crs
Create a Bound Vertical CRS, with a transformation to a hub geographic 3D crs, such as EPSG:4979 or WGS84, using a grid
114 115 116 117 118 119 120 121 122 |
# File 'lib/proj/crs.rb', line 114 def self.create_bound_vertical(context, vertical_crs:, hub_crs:, grid_name:) pointer = Api.proj_crs_create_bound_vertical_crs(context, vertical_crs, hub_crs, grid_name) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_compound(context, name:, horizontal_crs:, vertical_crs:) ⇒ Crs
Create a CompoundCRS.
166 167 168 169 170 171 172 173 174 |
# File 'lib/proj/crs.rb', line 166 def self.create_compound(context, name:, horizontal_crs:, vertical_crs:) pointer = Api.proj_create_compound_crs(context, name, horizontal_crs, vertical_crs) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_derived_geographic(context, name: nil, base_geographic_crs:, conversion:, coordinate_system:) ⇒ Crs
Create a DerivedGeograhicCRS
273 274 275 276 277 278 279 280 281 |
# File 'lib/proj/crs.rb', line 273 def self.create_derived_geographic(context, name: nil, base_geographic_crs:, conversion:, coordinate_system:) pointer = Api.proj_create_derived_geographic_crs(context, name, base_geographic_crs, conversion, coordinate_system) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_engineering(context, name:) ⇒ Crs
Create a a EngineeringCRS
76 77 78 79 80 81 82 83 84 |
# File 'lib/proj/crs.rb', line 76 def self.create_engineering(context, name:) pointer = Api.proj_create_engineering_crs(context, name) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_geocentric(context, name:, datum_name:, ellipsoid_name:, semi_major_meter:, inv_flattening:, prime_meridian_name:, prime_meridian_offset:, angular_units:, angular_units_conv:, linear_units:, linear_units_conv:) ⇒ Crs
Create a GeographicCRS.
235 236 237 238 239 240 241 242 243 |
# File 'lib/proj/crs.rb', line 235 def self.create_geocentric(context, name:, datum_name:, ellipsoid_name:, semi_major_meter:, inv_flattening:, prime_meridian_name:, prime_meridian_offset:, angular_units:, angular_units_conv:, linear_units:, linear_units_conv:) pointer = Api.proj_create_geocentric_crs(context, name, datum_name, ellipsoid_name, semi_major_meter, inv_flattening, prime_meridian_name, prime_meridian_offset, angular_units, angular_units_conv, linear_units, linear_units_conv) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_geocentric_from_datum(context, name:, datum:, linear_units:, linear_units_conv:) ⇒ Crs
Create a GeodeticCRS of geocentric type
254 255 256 257 258 259 260 261 262 |
# File 'lib/proj/crs.rb', line 254 def self.create_geocentric_from_datum(context, name:, datum:, linear_units:, linear_units_conv:) pointer = Api.proj_create_geocentric_crs_from_datum(context, name, datum, linear_units, linear_units_conv) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_geographic(context, name:, datum_name:, ellipsoid_name:, semi_major_meter:, inv_flattening:, prime_meridian_name:, prime_meridian_offset:, pm_angular_units:, pm_angular_units_conv:, coordinate_system:) ⇒ Crs
Create a GeographicCRS.
191 192 193 194 195 196 197 198 199 |
# File 'lib/proj/crs.rb', line 191 def self.create_geographic(context, name:, datum_name:, ellipsoid_name:, semi_major_meter:, inv_flattening:, prime_meridian_name:, prime_meridian_offset:, pm_angular_units:, pm_angular_units_conv:, coordinate_system:) pointer = Api.proj_create_geographic_crs(context, name, datum_name, ellipsoid_name, semi_major_meter, inv_flattening, prime_meridian_name, prime_meridian_offset, pm_angular_units, pm_angular_units_conv, coordinate_system) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_geographic_from_datum(context, name:, datum:, coordinate_system:) ⇒ Crs
Create a GeographicCRS from a datum
209 210 211 212 213 214 215 216 217 |
# File 'lib/proj/crs.rb', line 209 def self.create_geographic_from_datum(context, name:, datum:, coordinate_system:) pointer = Api.proj_create_geographic_crs_from_datum(context, name, datum, coordinate_system) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_projected(context, name: nil, geodetic_crs:, conversion:, coordinate_system:) ⇒ Crs
Create a ProjectedCRS.
16 17 18 19 20 21 22 23 24 |
# File 'lib/proj/crs.rb', line 16 def self.create_projected(context, name: nil, geodetic_crs:, conversion:, coordinate_system:) pointer = Api.proj_create_projected_crs(context, name, geodetic_crs, conversion, coordinate_system) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_vertical(context, name:, datum_name:, linear_units:, linear_units_conv:) ⇒ Crs
Create a VerticalCRS. For additional functionality see Crs#create_vertical_ex
95 96 97 98 99 100 101 102 103 |
# File 'lib/proj/crs.rb', line 95 def self.create_vertical(context, name:, datum_name:, linear_units:, linear_units_conv:) pointer = Api.proj_create_vertical_crs(context, name, datum_name, linear_units, linear_units_conv) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.create_vertical_ex(context, name: nil, datum_name: nil, datum_auth_name: nil, datum_code: nil, linear_units: nil, linear_units_conv: 0, geoid_model_name: nil, geoid_model_auth_name: nil, geoid_model_code: nil, geoid_geog_crs: nil, accuracy: nil) ⇒ Crs
Create a VerticalCRS. This is an extended version of Crs#create_vertical that adds the capability of defining a geoid model.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/proj/crs.rb', line 141 def self.create_vertical_ex(context, name: nil, datum_name: nil, datum_auth_name: nil, datum_code: nil, linear_units: nil, linear_units_conv: 0, geoid_model_name: nil, geoid_model_auth_name: nil, geoid_model_code: nil, geoid_geog_crs: nil, accuracy: nil) = {"ACCURACY": accuracy.nil? ? nil : accuracy.to_s} = () pointer = Api.proj_create_vertical_crs_ex(context, name, datum_name, datum_auth_name, datum_code, linear_units, linear_units_conv, geoid_model_name, geoid_model_auth_name, geoid_model_code, geoid_geog_crs, ) if pointer.null? Error.check_context(context) end self.create_object(pointer, context) end |
.query_geodetic_from_datum(context, auth_name: nil, datum_auth_name:, datum_code:, crs_type: nil) ⇒ PjObjects
Find GeodeticCRSes that use the specified datum
295 296 297 298 299 300 301 302 303 |
# File 'lib/proj/crs.rb', line 295 def self.query_geodetic_from_datum(context, auth_name: nil, datum_auth_name:, datum_code:, crs_type: nil) pointer = Api.proj_query_geodetic_crs_from_datum(context, auth_name, datum_auth_name, datum_code, crs_type) if pointer.null? Error.check_context(context) end PjObjects.new(pointer, context) end |
Instance Method Details
#alter_cs_angular_unit(angular_units: nil, angular_units_conv: 0, unit_auth_name: nil, unit_code: nil) ⇒ Crs
Return a copy of the CRS with its angular units changed
559 560 561 562 563 564 565 566 567 |
# File 'lib/proj/crs.rb', line 559 def alter_cs_angular_unit(angular_units: nil, angular_units_conv: 0, unit_auth_name: nil, unit_code: nil) ptr = Api.proj_crs_alter_cs_angular_unit(self.context, self, angular_units, angular_units_conv, unit_auth_name, unit_code) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |
#alter_cs_linear_unit(linear_units: nil, linear_units_conv: 0, unit_auth_name: nil, unit_code: nil) ⇒ Crs
Return a copy of the CRS with its linear units changed. The CRS must be or contain a ProjectedCRS, VerticalCRS or a GeocentricCRS.
578 579 580 581 582 583 584 585 586 |
# File 'lib/proj/crs.rb', line 578 def alter_cs_linear_unit(linear_units: nil, linear_units_conv: 0, unit_auth_name: nil, unit_code: nil) ptr = Api.proj_crs_alter_cs_linear_unit(self.context, self, linear_units, linear_units_conv, unit_auth_name, unit_code) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |
#alter_geodetic_crs(new_geod_crs) ⇒ Crs
Return a copy of the CRS with its geodetic CRS changed.
* If the CRS is a GeodeticCRS then a clone of new_geod_crs is returned.
* If the CRS is a ProjectedCRS, then it replaces the base CRS with new_geod_crs.
* If the CRS is a CompoundCRS, then it replaces the GeodeticCRS part of the horizontal
CRS with new_geod_crs.
* In other cases, it returns a clone of obj.
541 542 543 544 545 546 547 548 549 |
# File 'lib/proj/crs.rb', line 541 def alter_geodetic_crs(new_geod_crs) ptr = Api.proj_crs_alter_geodetic_crs(self.context, self, new_geod_crs) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |
#alter_id(auth_name, code) ⇒ Crs
Return a copy of the CRS with its identifier changed
521 522 523 524 525 526 527 528 529 |
# File 'lib/proj/crs.rb', line 521 def alter_id(auth_name, code) ptr = Api.proj_alter_id(self.context, self, auth_name, code) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |
#alter_name(name) ⇒ Crs
Return a copy of the CRS with its name changed
505 506 507 508 509 510 511 512 513 |
# File 'lib/proj/crs.rb', line 505 def alter_name(name) ptr = Api.proj_alter_name(self.context, self, name) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |
#alter_parameters_linear_unit(linear_units: nil, linear_units_conv: 0, unit_auth_name: nil, unit_code: nil, convert_to_new_unit:) ⇒ Crs
Return a copy of the CRS with its linear units changed. The CRS must be or contain a ProjectedCRS, VerticalCRS or a GeocentricCRS.
601 602 603 604 605 606 607 608 609 610 611 |
# File 'lib/proj/crs.rb', line 601 def alter_parameters_linear_unit(linear_units: nil, linear_units_conv: 0, unit_auth_name: nil, unit_code: nil, convert_to_new_unit:) ptr = Api.proj_crs_alter_parameters_linear_unit(self.context, self, linear_units, linear_units_conv, unit_auth_name, unit_code, convert_to_new_unit ? 1 : 0) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |
#coordinate_operation ⇒ PjObject
Return the Conversion of a DerivedCRS (such as a ProjectedCRS), or the Transformation from the baseCRS to the hubCRS of a BoundCRS.
456 457 458 459 460 461 462 |
# File 'lib/proj/crs.rb', line 456 def coordinate_operation ptr = Api.proj_crs_get_coordoperation(self.context, self) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, self.context) end |
#coordinate_system ⇒ CoordinateSystem
Returns the coordinate system of a SingleCRS.
429 430 431 432 |
# File 'lib/proj/crs.rb', line 429 def coordinate_system pointer = Api.proj_crs_get_coordinate_system(self.context, self) CoordinateSystem.new(pointer, self.context) end |
#datum ⇒ Datum
Returns the datum of a SingleCRS.
384 385 386 387 388 389 390 391 392 |
# File 'lib/proj/crs.rb', line 384 def datum ptr = Api.proj_crs_get_datum(self.context, self) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, self.context) end |
#datum_ensemble ⇒ DatumEnsemble
Returns the datum ensemble of a SingleCRS.
421 422 423 424 |
# File 'lib/proj/crs.rb', line 421 def datum_ensemble pointer = Api.proj_crs_get_datum_ensemble(self.context, self) self.class.create_object(pointer, self.context) end |
#datum_forced ⇒ Datum
Returns a datum for a SingleCRS. If the SingleCRS has a datum, then this datum is returned. Otherwise, the SingleCRS has a datum ensemble, and this datum ensemble is returned as a regular datum instead of a datum ensemble.
401 402 403 404 |
# File 'lib/proj/crs.rb', line 401 def datum_forced pointer = Api.proj_crs_get_datum_forced(self.context, self) self.class.create_object(pointer, self.context) end |
#demote_to_2d(name: nil) ⇒ Crs
Create a 2D CRS from an this 3D CRS.
634 635 636 637 638 639 640 641 642 |
# File 'lib/proj/crs.rb', line 634 def demote_to_2d(name: nil) ptr = Api.proj_crs_demote_to_2D(self.context, name, self) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |
#derived? ⇒ Boolean
Returns whether a CRS is a Derived CRS
447 448 449 450 |
# File 'lib/proj/crs.rb', line 447 def derived? result = Api.proj_crs_is_derived(self.context, self) result == 1 ? true : false end |
#ellipsoid ⇒ PjObject
Returns the ellipsoid
439 440 441 442 |
# File 'lib/proj/crs.rb', line 439 def ellipsoid pointer = Api.proj_get_ellipsoid(self.context, self) self.class.create_object(pointer, self.context) end |
#geodetic_crs ⇒ Crs
Get the geodeticCRS / geographicCRS from a CRS.
362 363 364 365 |
# File 'lib/proj/crs.rb', line 362 def geodetic_crs pointer = Api.proj_crs_get_geodetic_crs(self.context, self) self.class.create_object(pointer, self.context) end |
#horizontal_datum ⇒ Crs
Get the horizontal datum from a CRS.
411 412 413 414 |
# File 'lib/proj/crs.rb', line 411 def horizontal_datum pointer = Api.proj_crs_get_horizontal_datum(self.context, self) self.class.create_object(pointer, self.context) end |
#identify(auth_name) ⇒ Array
Returns a list of matching reference CRS, and the percentage (0-100) of confidence in the match.
479 480 481 482 483 484 485 486 487 488 489 490 |
# File 'lib/proj/crs.rb', line 479 def identify(auth_name) confidences_out_ptr = FFI::MemoryPointer.new(:pointer) pointer = Api.proj_identify(self.context, self, auth_name, nil, confidences_out_ptr) objects = PjObjects.new(pointer, self.context) # Get confidences and free the list confidences_ptr = confidences_out_ptr.read_pointer confidences = confidences_ptr.read_array_of_type(:int, :read_int, objects.count) Api.proj_int_list_destroy(confidences_ptr) return objects, confidences end |
#prime_meridian ⇒ PjObject
Returns the prime meridian
469 470 471 472 |
# File 'lib/proj/crs.rb', line 469 def prime_meridian pointer = Api.proj_get_prime_meridian(self.context, self) self.class.create_object(pointer, self.context) end |
#projected_3d(name: nil, geog_3d_crs: nil) ⇒ Crs
Create a projected 3D CRS from this projected 2D CRS.
This CRS’s name is replaced by the name parameter and its base geographic CRS is replaced by geog_3D_crs. The vertical axis of geog_3D_crs (ellipsoidal height) will be added as the 3rd axis of the resulting projected 3D CRS.
Normally, the passed geog_3D_crs should be the 3D counterpart of the original 2D base geographic CRS of projected_2D_crs, but such no check is done.
It is also possible to invoke this function with a nil geog_3D_crs. In this case the existing base geographic of this CRS will be automatically promoted to 3D by assuming a 3rd axis being an ellipsoidal height, oriented upwards, and with metre units. This is equivalent to using Crs#promote_to_3d
662 663 664 665 666 667 668 669 670 |
# File 'lib/proj/crs.rb', line 662 def projected_3d(name: nil, geog_3d_crs: nil) ptr = Api.proj_crs_create_projected_3D_crs_from_2D(self.context, name, self, geog_3d_crs) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |
#promote_to_3d(name: nil) ⇒ Crs
Create a 3D CRS from this 2D CRS. The new axis will be ellipsoidal height, oriented upwards, and with metre units.
619 620 621 622 623 624 625 626 627 |
# File 'lib/proj/crs.rb', line 619 def promote_to_3d(name: nil) ptr = Api.proj_crs_promote_to_3D(self.context, name, self) if ptr.null? Error.check_object(self) end self.class.create_object(ptr, context) end |