Class: Geos::Point
Constant Summary
Constants included
from GeomTypes
GeomTypes::GEOS_GEOMETRYCOLLECTION, GeomTypes::GEOS_LINEARRING, GeomTypes::GEOS_LINESTRING, GeomTypes::GEOS_MULTILINESTRING, GeomTypes::GEOS_MULTIPOINT, GeomTypes::GEOS_MULTIPOLYGON, GeomTypes::GEOS_POINT, GeomTypes::GEOS_POLYGON
Instance Attribute Summary
Attributes inherited from Geometry
#ptr
Instance Method Summary
collapse
Methods inherited from Geometry
#boundary, #buffer, #centroid, #contains?, #convex_hull, #coord_seq, #covered_by?, #covers?, #crosses?, #delaunay_triangulation, #difference, #dimensions, #disjoint?, #distance, #empty?, #end_point, #envelope, #eql?, #eql_almost?, #eql_exact?, #extract_unique_points, #geom_type, #has_z?, #hausdorff_distance, #initialize, #initialize_copy, #interpolate, #interpolate_normalized, #intersection, #intersects?, #line_merge, #nearest_points, #node, #overlaps?, #point_on_surface, #polygonize, #polygonize_cut_edges, #polygonize_full, #project, #project_normalized, #relate, #relate_boundary_node_rule, #relate_pattern, release, #ring?, #shared_paths, #simple?, #simplify, #snap, #srid, #srid=, #start_point, #sym_difference, #to_prepared, #to_s, #topology_preserve_simplify, #touches?, #type_id, #unary_union, #union, #union_cascaded, #valid?, #valid_detail, #valid_reason, #within?
Methods included from Tools
#bool_result, #cast_geometry_ptr, #check_enum_value, #check_geometry, #pick_srid_according_to_policy, #pick_srid_from_geoms, #symbol_for_enum
Constructor Details
This class inherits a constructor from Geos::Geometry
Instance Method Details
#area ⇒ Object
44
45
46
|
# File 'lib/ffi-geos/point.rb', line 44
def area
0
end
|
#get_x ⇒ Object
Also known as:
x
6
7
8
9
10
|
# File 'lib/ffi-geos/point.rb', line 6
def get_x
double_ptr = FFI::MemoryPointer.new(:double)
FFIGeos.GEOSGeomGetX_r(Geos.current_handle, self.ptr, double_ptr)
double_ptr.read_double
end
|
#get_y ⇒ Object
Also known as:
y
19
20
21
22
23
|
# File 'lib/ffi-geos/point.rb', line 19
def get_y
double_ptr = FFI::MemoryPointer.new(:double)
FFIGeos.GEOSGeomGetY_r(Geos.current_handle, self.ptr, double_ptr)
double_ptr.read_double
end
|
#get_z ⇒ Object
Also known as:
z
32
33
34
35
36
|
# File 'lib/ffi-geos/point.rb', line 32
def get_z
double_ptr = FFI::MemoryPointer.new(:double)
FFIGeos.GEOSGeomGetZ_r(Geos.current_handle, self.ptr, double_ptr)
double_ptr.read_double
end
|
#length ⇒ Object
48
49
50
|
# File 'lib/ffi-geos/point.rb', line 48
def length
0
end
|
#normalize! ⇒ Object
Also known as:
normalize
60
61
62
|
# File 'lib/ffi-geos/point.rb', line 60
def normalize!
self
end
|
#num_coordinates ⇒ Object
56
57
58
|
# File 'lib/ffi-geos/point.rb', line 56
def num_coordinates
1
end
|
#num_geometries ⇒ Object
52
53
54
|
# File 'lib/ffi-geos/point.rb', line 52
def num_geometries
1
end
|