ffi-geos 2.3.1 → 2.5.0

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.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yml +2 -2
  3. data/.rbenv-vars +1 -0
  4. data/.rubocop-minitest.yml +40 -17
  5. data/.rubocop.yml +664 -120
  6. data/.rubocop_todo.yml +30 -19
  7. data/MIT-LICENSE +1 -1
  8. data/README.rdoc +2 -0
  9. data/ffi-geos.gemspec +2 -2
  10. data/lib/ffi-geos/coordinate_sequence.rb +2 -1
  11. data/lib/ffi-geos/geojson_reader.rb +35 -0
  12. data/lib/ffi-geos/geojson_writer.rb +49 -0
  13. data/lib/ffi-geos/geometry.rb +101 -1
  14. data/lib/ffi-geos/geometry_collection.rb +1 -1
  15. data/lib/ffi-geos/line_string.rb +1 -1
  16. data/lib/ffi-geos/point.rb +9 -0
  17. data/lib/ffi-geos/polygon.rb +1 -1
  18. data/lib/ffi-geos/prepared_geometry.rb +20 -0
  19. data/lib/ffi-geos/version.rb +1 -1
  20. data/lib/ffi-geos/wkb_writer.rb +12 -0
  21. data/lib/ffi-geos.rb +156 -3
  22. data/test/coordinate_sequence_tests.rb +22 -4
  23. data/test/geojson_reader_tests.rb +174 -0
  24. data/test/geojson_writer_tests.rb +103 -0
  25. data/test/geometry/area_tests.rb +18 -0
  26. data/test/geometry/boundary_tests.rb +36 -0
  27. data/test/geometry/buffer_tests.rb +116 -0
  28. data/test/geometry/build_area_tests.rb +20 -0
  29. data/test/geometry/centroid_tests.rb +37 -0
  30. data/test/geometry/clip_by_rect_tests.rb +56 -0
  31. data/test/geometry/clone_tests.rb +29 -0
  32. data/test/geometry/concave_hull_of_polygons_tests.rb +28 -0
  33. data/test/geometry/concave_hull_tests.rb +38 -0
  34. data/test/geometry/convex_hull_tests.rb +26 -0
  35. data/test/geometry/coord_seq_tests.rb +27 -0
  36. data/test/geometry/delaunay_triangulation_tests.rb +82 -0
  37. data/test/geometry/densify_tests.rb +95 -0
  38. data/test/geometry/difference_tests.rb +108 -0
  39. data/test/geometry/dimensions_tests.rb +46 -0
  40. data/test/geometry/distance_tests.rb +29 -0
  41. data/test/geometry/dump_points_tests.rb +60 -0
  42. data/test/geometry/dup_tests.rb +29 -0
  43. data/test/geometry/empty_tests.rb +23 -0
  44. data/test/geometry/envelope_tests.rb +26 -0
  45. data/test/geometry/equal_identical_tests.rb +78 -0
  46. data/test/geometry/equal_tests.rb +62 -0
  47. data/test/geometry/exterior_ring_tests.rb +27 -0
  48. data/test/geometry/extract_unique_points_tests.rb +41 -0
  49. data/test/geometry/frecet_distance_tests.rb +24 -0
  50. data/test/geometry/get_geometry_n_tests.rb +21 -0
  51. data/test/geometry/hausdorff_distance_tests.rb +46 -0
  52. data/test/geometry/hilbert_code_tests.rb +45 -0
  53. data/test/geometry/interior_ring_n_tests.rb +64 -0
  54. data/test/geometry/interior_rings_tests.rb +36 -0
  55. data/test/geometry/interpolate_tests.rb +49 -0
  56. data/test/geometry/intersection_tests.rb +49 -0
  57. data/test/geometry/largest_empty_circle_tests.rb +26 -0
  58. data/test/geometry/length_tests.rb +18 -0
  59. data/test/geometry/line_merge_directed_tests.rb +28 -0
  60. data/test/geometry/line_merge_tests.rb +25 -0
  61. data/test/geometry/line_string_enumerator_tests.rb +20 -0
  62. data/test/geometry/line_substring_tests.rb +76 -0
  63. data/test/geometry/make_valid_tests.rb +27 -0
  64. data/test/geometry/maximum_inscribed_circle_tests.rb +21 -0
  65. data/test/geometry/minimum_bounding_circle_tests.rb +23 -0
  66. data/test/geometry/minimum_clearance_tests.rb +58 -0
  67. data/test/geometry/minimum_rotated_rectangle_tests.rb +28 -0
  68. data/test/geometry/minimum_width_tests.rb +26 -0
  69. data/test/geometry/misc_tests.rb +24 -0
  70. data/test/geometry/nearest_points_tests.rb +46 -0
  71. data/test/geometry/node_tests.rb +22 -0
  72. data/test/geometry/normalize_tests.rb +34 -0
  73. data/test/geometry/num_coordinates_tests.rb +39 -0
  74. data/test/geometry/num_goemetries_tests.rb +35 -0
  75. data/test/geometry/num_interior_rings_tests.rb +28 -0
  76. data/test/geometry/orient_polygons_tests.rb +101 -0
  77. data/test/geometry/point_on_surface_tests.rb +37 -0
  78. data/test/geometry/polygon_hull_simplify_tests.rb +55 -0
  79. data/test/geometry/polygonize_tests.rb +173 -0
  80. data/test/geometry/precision_tests.rb +42 -0
  81. data/test/geometry/project_tests.rb +56 -0
  82. data/test/geometry/relate_tests.rb +73 -0
  83. data/test/geometry/relationships_tests.rb +138 -0
  84. data/test/geometry/reverse_tests.rb +44 -0
  85. data/test/geometry/ring_tests.rb +18 -0
  86. data/test/geometry/shared_path_tests.rb +31 -0
  87. data/test/geometry/simple_tests.rb +18 -0
  88. data/test/geometry/simplify_tests.rb +21 -0
  89. data/test/geometry/snap_tests.rb +20 -0
  90. data/test/geometry/srid_copy_policy_tests.rb +94 -0
  91. data/test/geometry/start_and_end_point_tests.rb +24 -0
  92. data/test/geometry/sym_difference_tests.rb +114 -0
  93. data/test/geometry/topology_preserve_simplify_tests.rb +21 -0
  94. data/test/geometry/union_tests.rb +216 -0
  95. data/test/geometry/valid_tests.rb +56 -0
  96. data/test/geometry/voronoi_diagram_tests.rb +62 -0
  97. data/test/geometry_collection_tests.rb +14 -2
  98. data/test/interrupt_tests.rb +1 -1
  99. data/test/line_string_tests.rb +24 -3
  100. data/test/misc_tests.rb +1 -1
  101. data/test/point/has_m_tests.rb +43 -0
  102. data/test/point/x_y_z_m_tests.rb +51 -0
  103. data/test/point_tests.rb +25 -3
  104. data/test/polygon_tests.rb +14 -1
  105. data/test/prepared_geometry_tests.rb +31 -0
  106. data/test/strtree_tests.rb +11 -18
  107. data/test/test_helper.rb +2 -0
  108. data/test/tools_tests.rb +7 -0
  109. data/test/utils_tests.rb +14 -3
  110. data/test/wkb_reader_tests.rb +1 -0
  111. data/test/wkb_writer_tests.rb +46 -5
  112. data/test/wkt_reader_tests.rb +2 -0
  113. data/test/wkt_writer_tests.rb +20 -2
  114. metadata +160 -7
  115. data/test/geometry_tests.rb +0 -2096
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi-geos
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - J Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-24 00:00:00.000000000 Z
11
+ date: 2024-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -33,6 +33,7 @@ extra_rdoc_files:
33
33
  files:
34
34
  - ".github/workflows/main.yml"
35
35
  - ".gitignore"
36
+ - ".rbenv-vars"
36
37
  - ".rubocop-minitest.yml"
37
38
  - ".rubocop.yml"
38
39
  - ".rubocop_todo.yml"
@@ -46,6 +47,8 @@ files:
46
47
  - lib/ffi-geos.rb
47
48
  - lib/ffi-geos/buffer_params.rb
48
49
  - lib/ffi-geos/coordinate_sequence.rb
50
+ - lib/ffi-geos/geojson_reader.rb
51
+ - lib/ffi-geos/geojson_writer.rb
49
52
  - lib/ffi-geos/geometry.rb
50
53
  - lib/ffi-geos/geometry_collection.rb
51
54
  - lib/ffi-geos/interrupt.rb
@@ -68,13 +71,88 @@ files:
68
71
  - sonar-project.properties
69
72
  - test/.rubocop.yml
70
73
  - test/coordinate_sequence_tests.rb
74
+ - test/geojson_reader_tests.rb
75
+ - test/geojson_writer_tests.rb
76
+ - test/geometry/area_tests.rb
77
+ - test/geometry/boundary_tests.rb
78
+ - test/geometry/buffer_tests.rb
79
+ - test/geometry/build_area_tests.rb
80
+ - test/geometry/centroid_tests.rb
81
+ - test/geometry/clip_by_rect_tests.rb
82
+ - test/geometry/clone_tests.rb
83
+ - test/geometry/concave_hull_of_polygons_tests.rb
84
+ - test/geometry/concave_hull_tests.rb
85
+ - test/geometry/convex_hull_tests.rb
86
+ - test/geometry/coord_seq_tests.rb
87
+ - test/geometry/delaunay_triangulation_tests.rb
88
+ - test/geometry/densify_tests.rb
89
+ - test/geometry/difference_tests.rb
90
+ - test/geometry/dimensions_tests.rb
91
+ - test/geometry/distance_tests.rb
92
+ - test/geometry/dump_points_tests.rb
93
+ - test/geometry/dup_tests.rb
94
+ - test/geometry/empty_tests.rb
95
+ - test/geometry/envelope_tests.rb
96
+ - test/geometry/equal_identical_tests.rb
97
+ - test/geometry/equal_tests.rb
98
+ - test/geometry/exterior_ring_tests.rb
99
+ - test/geometry/extract_unique_points_tests.rb
100
+ - test/geometry/frecet_distance_tests.rb
101
+ - test/geometry/get_geometry_n_tests.rb
102
+ - test/geometry/hausdorff_distance_tests.rb
103
+ - test/geometry/hilbert_code_tests.rb
104
+ - test/geometry/interior_ring_n_tests.rb
105
+ - test/geometry/interior_rings_tests.rb
106
+ - test/geometry/interpolate_tests.rb
107
+ - test/geometry/intersection_tests.rb
108
+ - test/geometry/largest_empty_circle_tests.rb
109
+ - test/geometry/length_tests.rb
110
+ - test/geometry/line_merge_directed_tests.rb
111
+ - test/geometry/line_merge_tests.rb
112
+ - test/geometry/line_string_enumerator_tests.rb
113
+ - test/geometry/line_substring_tests.rb
114
+ - test/geometry/make_valid_tests.rb
115
+ - test/geometry/maximum_inscribed_circle_tests.rb
116
+ - test/geometry/minimum_bounding_circle_tests.rb
117
+ - test/geometry/minimum_clearance_tests.rb
118
+ - test/geometry/minimum_rotated_rectangle_tests.rb
119
+ - test/geometry/minimum_width_tests.rb
120
+ - test/geometry/misc_tests.rb
121
+ - test/geometry/nearest_points_tests.rb
122
+ - test/geometry/node_tests.rb
123
+ - test/geometry/normalize_tests.rb
124
+ - test/geometry/num_coordinates_tests.rb
125
+ - test/geometry/num_goemetries_tests.rb
126
+ - test/geometry/num_interior_rings_tests.rb
127
+ - test/geometry/orient_polygons_tests.rb
128
+ - test/geometry/point_on_surface_tests.rb
129
+ - test/geometry/polygon_hull_simplify_tests.rb
130
+ - test/geometry/polygonize_tests.rb
131
+ - test/geometry/precision_tests.rb
132
+ - test/geometry/project_tests.rb
133
+ - test/geometry/relate_tests.rb
134
+ - test/geometry/relationships_tests.rb
135
+ - test/geometry/reverse_tests.rb
136
+ - test/geometry/ring_tests.rb
137
+ - test/geometry/shared_path_tests.rb
138
+ - test/geometry/simple_tests.rb
139
+ - test/geometry/simplify_tests.rb
140
+ - test/geometry/snap_tests.rb
141
+ - test/geometry/srid_copy_policy_tests.rb
142
+ - test/geometry/start_and_end_point_tests.rb
143
+ - test/geometry/sym_difference_tests.rb
144
+ - test/geometry/topology_preserve_simplify_tests.rb
145
+ - test/geometry/union_tests.rb
146
+ - test/geometry/valid_tests.rb
147
+ - test/geometry/voronoi_diagram_tests.rb
71
148
  - test/geometry_collection_tests.rb
72
- - test/geometry_tests.rb
73
149
  - test/interrupt_tests.rb
74
150
  - test/line_string_tests.rb
75
151
  - test/linear_ring_tests.rb
76
152
  - test/misc_tests.rb
77
153
  - test/multi_line_string_tests.rb
154
+ - test/point/has_m_tests.rb
155
+ - test/point/x_y_z_m_tests.rb
78
156
  - test/point_tests.rb
79
157
  - test/polygon_tests.rb
80
158
  - test/prepared_geometry_tests.rb
@@ -86,7 +164,7 @@ files:
86
164
  - test/wkb_writer_tests.rb
87
165
  - test/wkt_reader_tests.rb
88
166
  - test/wkt_writer_tests.rb
89
- homepage: http://github.com/dark-panda/ffi-geos
167
+ homepage: https://github.com/dark-panda/ffi-geos
90
168
  licenses:
91
169
  - MIT
92
170
  metadata:
@@ -99,27 +177,102 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
177
  requirements:
100
178
  - - ">="
101
179
  - !ruby/object:Gem::Version
102
- version: '2.5'
180
+ version: '2.7'
103
181
  required_rubygems_version: !ruby/object:Gem::Requirement
104
182
  requirements:
105
183
  - - ">="
106
184
  - !ruby/object:Gem::Version
107
185
  version: '0'
108
186
  requirements: []
109
- rubygems_version: 3.2.32
187
+ rubygems_version: 3.5.11
110
188
  signing_key:
111
189
  specification_version: 4
112
190
  summary: An ffi wrapper for GEOS, a C++ port of the Java Topology Suite (JTS).
113
191
  test_files:
114
192
  - test/.rubocop.yml
115
193
  - test/coordinate_sequence_tests.rb
194
+ - test/geojson_reader_tests.rb
195
+ - test/geojson_writer_tests.rb
196
+ - test/geometry/area_tests.rb
197
+ - test/geometry/boundary_tests.rb
198
+ - test/geometry/buffer_tests.rb
199
+ - test/geometry/build_area_tests.rb
200
+ - test/geometry/centroid_tests.rb
201
+ - test/geometry/clip_by_rect_tests.rb
202
+ - test/geometry/clone_tests.rb
203
+ - test/geometry/concave_hull_of_polygons_tests.rb
204
+ - test/geometry/concave_hull_tests.rb
205
+ - test/geometry/convex_hull_tests.rb
206
+ - test/geometry/coord_seq_tests.rb
207
+ - test/geometry/delaunay_triangulation_tests.rb
208
+ - test/geometry/densify_tests.rb
209
+ - test/geometry/difference_tests.rb
210
+ - test/geometry/dimensions_tests.rb
211
+ - test/geometry/distance_tests.rb
212
+ - test/geometry/dump_points_tests.rb
213
+ - test/geometry/dup_tests.rb
214
+ - test/geometry/empty_tests.rb
215
+ - test/geometry/envelope_tests.rb
216
+ - test/geometry/equal_identical_tests.rb
217
+ - test/geometry/equal_tests.rb
218
+ - test/geometry/exterior_ring_tests.rb
219
+ - test/geometry/extract_unique_points_tests.rb
220
+ - test/geometry/frecet_distance_tests.rb
221
+ - test/geometry/get_geometry_n_tests.rb
222
+ - test/geometry/hausdorff_distance_tests.rb
223
+ - test/geometry/hilbert_code_tests.rb
224
+ - test/geometry/interior_ring_n_tests.rb
225
+ - test/geometry/interior_rings_tests.rb
226
+ - test/geometry/interpolate_tests.rb
227
+ - test/geometry/intersection_tests.rb
228
+ - test/geometry/largest_empty_circle_tests.rb
229
+ - test/geometry/length_tests.rb
230
+ - test/geometry/line_merge_directed_tests.rb
231
+ - test/geometry/line_merge_tests.rb
232
+ - test/geometry/line_string_enumerator_tests.rb
233
+ - test/geometry/line_substring_tests.rb
234
+ - test/geometry/make_valid_tests.rb
235
+ - test/geometry/maximum_inscribed_circle_tests.rb
236
+ - test/geometry/minimum_bounding_circle_tests.rb
237
+ - test/geometry/minimum_clearance_tests.rb
238
+ - test/geometry/minimum_rotated_rectangle_tests.rb
239
+ - test/geometry/minimum_width_tests.rb
240
+ - test/geometry/misc_tests.rb
241
+ - test/geometry/nearest_points_tests.rb
242
+ - test/geometry/node_tests.rb
243
+ - test/geometry/normalize_tests.rb
244
+ - test/geometry/num_coordinates_tests.rb
245
+ - test/geometry/num_goemetries_tests.rb
246
+ - test/geometry/num_interior_rings_tests.rb
247
+ - test/geometry/orient_polygons_tests.rb
248
+ - test/geometry/point_on_surface_tests.rb
249
+ - test/geometry/polygon_hull_simplify_tests.rb
250
+ - test/geometry/polygonize_tests.rb
251
+ - test/geometry/precision_tests.rb
252
+ - test/geometry/project_tests.rb
253
+ - test/geometry/relate_tests.rb
254
+ - test/geometry/relationships_tests.rb
255
+ - test/geometry/reverse_tests.rb
256
+ - test/geometry/ring_tests.rb
257
+ - test/geometry/shared_path_tests.rb
258
+ - test/geometry/simple_tests.rb
259
+ - test/geometry/simplify_tests.rb
260
+ - test/geometry/snap_tests.rb
261
+ - test/geometry/srid_copy_policy_tests.rb
262
+ - test/geometry/start_and_end_point_tests.rb
263
+ - test/geometry/sym_difference_tests.rb
264
+ - test/geometry/topology_preserve_simplify_tests.rb
265
+ - test/geometry/union_tests.rb
266
+ - test/geometry/valid_tests.rb
267
+ - test/geometry/voronoi_diagram_tests.rb
116
268
  - test/geometry_collection_tests.rb
117
- - test/geometry_tests.rb
118
269
  - test/interrupt_tests.rb
119
270
  - test/line_string_tests.rb
120
271
  - test/linear_ring_tests.rb
121
272
  - test/misc_tests.rb
122
273
  - test/multi_line_string_tests.rb
274
+ - test/point/has_m_tests.rb
275
+ - test/point/x_y_z_m_tests.rb
123
276
  - test/point_tests.rb
124
277
  - test/polygon_tests.rb
125
278
  - test/prepared_geometry_tests.rb