Class: Geos::Point

Inherits:
Geometry show all
Defined in:
lib/ffi-geos/point.rb

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, #clip_by_rect, #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, #frechet_distance, #geom_type, #has_z?, #hausdorff_distance, #initialize, #initialize_copy, #interpolate, #interpolate_normalized, #intersection, #intersects?, #line_merge, #minimum_clearance, #minimum_clearance_line, #minimum_rotated_rectangle, #minimum_width, #nearest_points, #node, #overlaps?, #point_on_surface, #polygonize, #polygonize_cut_edges, #polygonize_full, #precision, #project, #project_normalized, #relate, #relate_boundary_node_rule, #relate_pattern, release, #reverse, #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, #voronoi_diagram, #with_precision, #within?

Methods included from Tools

#bool_result, #bool_to_int, #cast_geometry_ptr, #check_enum_value, #check_geometry, #extract_options!, #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

#areaObject



44
45
46
# File 'lib/ffi-geos/point.rb', line 44

def area
  0
end

#dump_points(cur_path = []) ⇒ Object



81
82
83
# File 'lib/ffi-geos/point.rb', line 81

def dump_points(cur_path = [])
  cur_path.push(self.dup)
end

#get_xObject 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_pointer, ptr, double_ptr)
  double_ptr.read_double
end

#get_yObject 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_pointer, ptr, double_ptr)
  double_ptr.read_double
end

#get_zObject 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_pointer, ptr, double_ptr)
  double_ptr.read_double
end

#lengthObject



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_coordinatesObject



56
57
58
# File 'lib/ffi-geos/point.rb', line 56

def num_coordinates
  1
end

#num_geometriesObject



52
53
54
# File 'lib/ffi-geos/point.rb', line 52

def num_geometries
  1
end