ffi-geos 0.0.1.beta3 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +15 -3
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/ffi-geos.gemspec +3 -3
- data/lib/ffi-geos/geometry.rb +1 -1
- data/lib/ffi-geos/prepared_geometry.rb +6 -3
- data/test/prepared_geometry_tests.rb +6 -0
- metadata +8 -12
data/README.rdoc
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
= GEOS Ruby Bindings
|
2
|
+
= GEOS Ruby Bindings via FFI
|
3
3
|
|
4
4
|
== Requirements
|
5
5
|
|
@@ -12,8 +12,12 @@ Ruby versions known to work:
|
|
12
12
|
* Ruby MRI 1.8.7 and 1.9.2, x86_64, OSX 10.6.5+
|
13
13
|
* Ruby MRI 1.8.7 and 1.9.2, i386, linux
|
14
14
|
* Ruby MRI 1.8.7, x86_64, linux
|
15
|
-
|
16
|
-
|
15
|
+
|
16
|
+
Note that versions of JRuby prior to the as-of-yet (25 June 2011) unreleased
|
17
|
+
version 1.6.3 have problems in their ffi implementation when dealing with
|
18
|
+
AutoPointers that can lead to segfaults during garbage collection. Upcoming
|
19
|
+
versions of JRuby should have the problem licked. For details, check out
|
20
|
+
http://jira.codehaus.org/browse/JRUBY-5813.
|
17
21
|
|
18
22
|
== Features
|
19
23
|
|
@@ -135,3 +139,11 @@ Ruby bindings along with the following enhancements and additions:
|
|
135
139
|
=== Geos::Utils
|
136
140
|
|
137
141
|
* Geos::Utils.orientation_index
|
142
|
+
|
143
|
+
== Thanks
|
144
|
+
|
145
|
+
* Thanks to Daniel Azuma for the testing and JRuby help.
|
146
|
+
|
147
|
+
* Christopher Meiklejohn for the bug reporting and PreparedGeometry fix.
|
148
|
+
|
149
|
+
* Wayne Meissner for some help with some ffi issues.
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.1
|
1
|
+
0.0.1
|
data/ffi-geos.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ffi-geos}
|
8
|
-
s.version = "0.0.1
|
8
|
+
s.version = "0.0.1"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["J Smith"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-06-25}
|
13
13
|
s.description = %q{An ffi wrapper for GEOS, a C++ port of the Java Topology Suite (JTS).}
|
14
14
|
s.email = %q{dark.panda@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/ffi-geos/geometry.rb
CHANGED
@@ -3,15 +3,18 @@ module Geos
|
|
3
3
|
class PreparedGeometry
|
4
4
|
include Geos::Tools
|
5
5
|
|
6
|
-
attr_reader :ptr
|
6
|
+
attr_reader :ptr, :geometry
|
7
7
|
|
8
8
|
undef :clone, :dup
|
9
9
|
|
10
|
-
def initialize(
|
10
|
+
def initialize(geom, auto_free = true)
|
11
|
+
check_geometry(geom)
|
12
|
+
|
11
13
|
@ptr = FFI::AutoPointer.new(
|
12
|
-
ptr,
|
14
|
+
FFIGeos.GEOSPrepare_r(Geos.current_handle, geom.ptr),
|
13
15
|
auto_free ? self.class.method(:release) : self.class.method(:no_release)
|
14
16
|
)
|
17
|
+
@geometry = geom
|
15
18
|
|
16
19
|
if !auto_free
|
17
20
|
@ptr.autorelease = false
|
metadata
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffi-geos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 1
|
10
|
-
|
11
|
-
- 3
|
12
|
-
version: 0.0.1.beta3
|
10
|
+
version: 0.0.1
|
13
11
|
platform: ruby
|
14
12
|
authors:
|
15
13
|
- J Smith
|
@@ -17,7 +15,7 @@ autorequire:
|
|
17
15
|
bindir: bin
|
18
16
|
cert_chain: []
|
19
17
|
|
20
|
-
date: 2011-
|
18
|
+
date: 2011-06-25 00:00:00 Z
|
21
19
|
dependencies: []
|
22
20
|
|
23
21
|
description: An ffi wrapper for GEOS, a C++ port of the Java Topology Suite (JTS).
|
@@ -86,14 +84,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
85
|
none: false
|
88
86
|
requirements:
|
89
|
-
- - "
|
87
|
+
- - ">="
|
90
88
|
- !ruby/object:Gem::Version
|
91
|
-
hash:
|
89
|
+
hash: 3
|
92
90
|
segments:
|
93
|
-
-
|
94
|
-
|
95
|
-
- 1
|
96
|
-
version: 1.3.1
|
91
|
+
- 0
|
92
|
+
version: "0"
|
97
93
|
requirements: []
|
98
94
|
|
99
95
|
rubyforge_project:
|