Module: GeoScript::Geom
- Included in:
- Bounds, LineString, LinearRing, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
- Defined in:
- lib/geoscript/geom/geom.rb,
lib/geoscript/geom/point.rb,
lib/geoscript/geom/bounds.rb,
lib/geoscript/geom/io/wkb.rb,
lib/geoscript/geom/io/wkt.rb,
lib/geoscript/geom/io/json.rb,
lib/geoscript/geom/polygon.rb,
lib/geoscript/geom/linearring.rb,
lib/geoscript/geom/linestring.rb,
lib/geoscript/geom/multipoint.rb,
lib/geoscript/geom/multipolygon.rb,
lib/geoscript/geom/multilinestring.rb
Defined Under Namespace
Modules: IO
Classes: Bounds, LineString, LinearRing, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon
Constant Summary
collapse
- GEOM_FACTORY =
GeometryFactory.new
- PREP_FACTORY =
PreparedGeometryFactory.new
Class Method Summary
collapse
Class Method Details
.buffer(geom, distance, single_sided = false) ⇒ Object
26
27
28
29
30
|
# File 'lib/geoscript/geom/geom.rb', line 26
def self.buffer(geom, distance, single_sided = false)
buffer_params = BufferParameters.new
buffer_params.set_single_sided(single_sided)
BufferOp.buffer_op(geom, distance, buffer_params)
end
|
.enhance(geom) ⇒ Object
36
37
38
|
# File 'lib/geoscript/geom/geom.rb', line 36
def self.enhance(geom)
geom.bounds = Geom.get_bounds geom
end
|
.get_bounds(geom) ⇒ Object
32
33
34
|
# File 'lib/geoscript/geom/geom.rb', line 32
def self.get_bounds(geom)
Bounds.new geom.get_envelope_internal
end
|
.prepare(geom) ⇒ Object
18
19
20
|
# File 'lib/geoscript/geom/geom.rb', line 18
def self.prepare(geom)
PREP_FACTORY.create(geom)
end
|
.simplify(geom, tolerance) ⇒ Object
22
23
24
|
# File 'lib/geoscript/geom/geom.rb', line 22
def self.simplify(geom, tolerance)
DouglasPeuckerSimplifier.simplify(geom, tolerance)
end
|