Skip to content

Commit

Permalink
Documentation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dark-panda committed Sep 9, 2015
1 parent da67fca commit 06b0f74
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
12 changes: 8 additions & 4 deletions README.rdoc
Expand Up @@ -75,11 +75,15 @@ Ruby bindings along with the following enhancements and additions:
convenience methods and geometry conversion and manipulation methods.

* *NEW IN ffi-geos 1.0.0* -- all errors thrown by ffi-geos are now instances of
`Geos::Error` or subclasses thereof. `Geos::Error` itself is a descendant
of `RuntimeError` as is the case with the native Geos extension. This means
that code like `rescue RuntimeError` should still work but you can now
Geos::Error or subclasses thereof. Geos::Error itself is a descendant
of RuntimeError as is the case with the native Geos extension. This means
that code like rescue RuntimeError should still work but you can now
further capture more precise error types by capturing errors like
`Geos::Error`, `Geos::ParseError`, etc.
Geos::Error, Geos::ParseError, etc.

* *NEW IN ffi-geos 1.0.0* -- new methods for Geom::Geometry#voronoi_diagram,
Geos::MultiLineString#closed? and Geos::Geometry#clip_by_rect when using
GEOS 3.5.0+.

== Thanks

Expand Down
4 changes: 3 additions & 1 deletion lib/ffi-geos/geometry.rb
Expand Up @@ -208,7 +208,7 @@ def point_on_surface
alias :representative_point :point_on_surface

if FFIGeos.respond_to?(:GEOSClipByRect_r)
# Available in GEOS 3.5.0+
# Available in GEOS 3.5.0+.
def clip_by_rect(xmin, ymin, xmax, ymax)
cast_geometry_ptr(FFIGeos.GEOSClipByRect_r(Geos.current_handle, self.ptr, xmin, ymin, xmax, ymax))
end
Expand Down Expand Up @@ -593,6 +593,8 @@ def delaunay_triangulation(*args)
end

if FFIGeos.respond_to?(:GEOSVoronoiDiagram_r)
# Available in GEOS 3.5.0+
#
# :call-seq:
# voronoi_diagram(options = {})
# voronoi_diagram(tolerance, options = {})
Expand Down
1 change: 1 addition & 0 deletions lib/ffi-geos/multi_line_string.rb
Expand Up @@ -3,6 +3,7 @@
module Geos
class MultiLineString < GeometryCollection
if FFIGeos.respond_to?(:GEOSisClosed_r) && Geos::GEOS_VERSION >= '3.5.0'
# Available in GEOS 3.5.0+.
def closed?
bool_result(FFIGeos.GEOSisClosed_r(Geos.current_handle, self.ptr))
end
Expand Down

0 comments on commit 06b0f74

Please sign in to comment.