Method: Proj::Crs#alter_id

Defined in:
lib/proj/crs.rb

#alter_id(auth_name, code) ⇒ Crs

Return a copy of the CRS with its identifier changed

Parameters:

  • auth_name (String)

    The new authority name of the CRS

  • code (String)

    The new code of the CRS

Returns:



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