Module: OGR::SpatialReferenceMixins::TypeChecks

Included in:
OGR::SpatialReference
Defined in:
lib/ogr/spatial_reference_mixins/type_checks.rb

Instance Method Summary collapse

Instance Method Details

#compound?Boolean

Returns True if the root node is a COMPD_CS node.

Returns:

  • (Boolean)

    True if the root node is a COMPD_CS node.



22
23
24
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 22

def compound?
  FFI::OGR::SRSAPI.OSRIsCompound(@c_pointer)
end

#geocentric?Boolean

Returns True if the root node is a GEOCCS node.

Returns:

  • (Boolean)

    True if the root node is a GEOCCS node.



27
28
29
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 27

def geocentric?
  FFI::OGR::SRSAPI.OSRIsGeocentric(@c_pointer)
end

#geog_cs_is_same?(other_spatial_ref) ⇒ Boolean

Returns True if the GEOGCS nodes of each SpatialReference match.

Parameters:

Returns:

  • (Boolean)

    True if the GEOGCS nodes of each SpatialReference match.



48
49
50
51
52
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 48

def geog_cs_is_same?(other_spatial_ref)
  spatial_ref_ptr = GDAL._pointer(OGR::SpatialReference, other_spatial_ref)

  FFI::OGR::SRSAPI.OSRIsSameGeogCS(@c_pointer, spatial_ref_ptr)
end

#geographic?Boolean

Returns True if the root node is a GEOGCS node.

Returns:

  • (Boolean)

    True if the root node is a GEOGCS node.



7
8
9
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 7

def geographic?
  FFI::OGR::SRSAPI.OSRIsGeographic(@c_pointer)
end

#local?Boolean

Returns True if the root node is a LOCAL_CS node.

Returns:

  • (Boolean)

    True if the root node is a LOCAL_CS node.



12
13
14
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 12

def local?
  FFI::OGR::SRSAPI.OSRIsLocal(@c_pointer)
end

#projected?Boolean

Returns True if it contains a PROJCS node.

Returns:

  • (Boolean)

    True if it contains a PROJCS node.



17
18
19
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 17

def projected?
  FFI::OGR::SRSAPI.OSRIsProjected(@c_pointer)
end

#same?(other_spatial_ref) ⇒ Boolean

Returns True if both SpatialReferences describe the same system.

Parameters:

Returns:

  • (Boolean)

    True if both SpatialReferences describe the same system.



39
40
41
42
43
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 39

def same?(other_spatial_ref)
  spatial_ref_ptr = GDAL._pointer(OGR::SpatialReference, other_spatial_ref)

  FFI::OGR::SRSAPI.OSRIsSame(@c_pointer, spatial_ref_ptr)
end

#vert_cs_is_same?(other_spatial_ref) ⇒ Boolean

Returns True if the VERT_CS nodes of each SpatialReference match.

Parameters:

Returns:

  • (Boolean)

    True if the VERT_CS nodes of each SpatialReference match.



57
58
59
60
61
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 57

def vert_cs_is_same?(other_spatial_ref)
  spatial_ref_ptr = GDAL._pointer(OGR::SpatialReference, other_spatial_ref)

  FFI::OGR::SRSAPI.OSRIsSameVertCS(@c_pointer, spatial_ref_ptr)
end

#vertical?Boolean

Returns True if it contains a VERT_CS node.

Returns:

  • (Boolean)

    True if it contains a VERT_CS node.



32
33
34
# File 'lib/ogr/spatial_reference_mixins/type_checks.rb', line 32

def vertical?
  FFI::OGR::SRSAPI.OSRIsVertical(@c_pointer)
end