proj4rb 4.1.0 → 5.0.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/CHANGELOG.md +98 -0
  3. data/Gemfile +4 -4
  4. data/README.md +53 -0
  5. data/lib/api/proj.rb +750 -0
  6. data/lib/api/proj_experimental.rb +7 -0
  7. data/lib/api/proj_ffi.rb +47 -0
  8. data/lib/api/proj_version.rb +26 -0
  9. data/lib/examples/axis_order_normalization.rb +13 -0
  10. data/lib/examples/batch_transformation.rb +25 -0
  11. data/lib/examples/context_logging.rb +26 -0
  12. data/lib/examples/crs_identification.rb +18 -0
  13. data/lib/examples/database_query.rb +27 -0
  14. data/lib/examples/geodetic_distance.rb +38 -0
  15. data/lib/examples/geodetic_to_projected.rb +18 -0
  16. data/lib/examples/operation_factory_context.rb +19 -0
  17. data/lib/examples/pipeline_operator.rb +21 -0
  18. data/lib/examples/promote_demote_3d.rb +23 -0
  19. data/lib/examples/serialization_formats.rb +17 -0
  20. data/lib/examples/transform_bounds.rb +18 -0
  21. data/lib/examples/transformation_with_area.rb +18 -0
  22. data/lib/proj/area.rb +74 -74
  23. data/lib/proj/axis_info.rb +44 -44
  24. data/lib/proj/bounds.rb +22 -0
  25. data/lib/proj/bounds3d.rb +45 -0
  26. data/lib/proj/context.rb +57 -23
  27. data/lib/proj/conversion.rb +94 -91
  28. data/lib/proj/coordinate.rb +304 -281
  29. data/lib/proj/coordinate_metadata.rb +38 -0
  30. data/lib/proj/coordinate_operation_mixin.rb +464 -381
  31. data/lib/proj/coordinate_system.rb +143 -137
  32. data/lib/proj/crs.rb +688 -672
  33. data/lib/proj/crs_info.rb +47 -47
  34. data/lib/proj/database.rb +310 -305
  35. data/lib/proj/datum.rb +32 -32
  36. data/lib/proj/datum_ensemble.rb +34 -34
  37. data/lib/proj/domain.rb +82 -0
  38. data/lib/proj/ellipsoid.rb +77 -77
  39. data/lib/proj/error.rb +7 -8
  40. data/lib/proj/file_api_callbacks.rb +165 -0
  41. data/lib/proj/grid.rb +121 -121
  42. data/lib/proj/grid_cache.rb +65 -64
  43. data/lib/proj/grid_info.rb +19 -19
  44. data/lib/proj/life_span.rb +21 -0
  45. data/lib/proj/network_api_callbacks.rb +86 -0
  46. data/lib/proj/operation.rb +66 -42
  47. data/lib/proj/operation_factory_context.rb +4 -2
  48. data/lib/proj/options.rb +41 -0
  49. data/lib/proj/parameter.rb +37 -37
  50. data/lib/proj/parameters.rb +106 -107
  51. data/lib/proj/pj_axis_description.rb +26 -0
  52. data/lib/proj/pj_object.rb +602 -670
  53. data/lib/proj/pj_objects.rb +45 -45
  54. data/lib/proj/pj_param_description.rb +28 -0
  55. data/lib/proj/prime_meridian.rb +65 -65
  56. data/lib/proj/projection.rb +1771 -698
  57. data/lib/proj/session.rb +2 -0
  58. data/lib/proj/transformation.rb +102 -102
  59. data/lib/proj/unit.rb +81 -108
  60. data/lib/proj.rb +10 -3
  61. data/lib/proj4.rb +5 -5
  62. data/proj4rb.gemspec +10 -5
  63. data/test/abstract_test.rb +7 -28
  64. data/test/context_test.rb +210 -172
  65. data/test/context_validation_test.rb +11 -0
  66. data/test/conversion_test.rb +376 -368
  67. data/test/coordinate_metadata_test.rb +34 -0
  68. data/test/coordinate_system_test.rb +162 -144
  69. data/test/coordinate_test.rb +289 -34
  70. data/test/crs_test.rb +1112 -1072
  71. data/test/database_test.rb +407 -359
  72. data/test/datum_ensemble_test.rb +64 -64
  73. data/test/datum_test.rb +61 -54
  74. data/test/domain_test.rb +72 -0
  75. data/test/ellipsoid_test.rb +80 -80
  76. data/test/examples_test.rb +149 -0
  77. data/test/file_api_example.rb +58 -0
  78. data/test/file_api_test.rb +74 -66
  79. data/test/grid_cache_test.rb +72 -72
  80. data/test/grid_test.rb +126 -141
  81. data/test/network_api_example.rb +48 -0
  82. data/test/network_api_test.rb +33 -45
  83. data/test/operation_factory_context_test.rb +225 -201
  84. data/test/operation_test.rb +40 -29
  85. data/test/options_test.rb +17 -0
  86. data/test/parameters_test.rb +86 -40
  87. data/test/pj_object_test.rb +221 -179
  88. data/test/prime_meridian_test.rb +75 -75
  89. data/test/proj_test.rb +58 -58
  90. data/test/projection_test.rb +680 -650
  91. data/test/session_test.rb +78 -77
  92. data/test/transformation_test.rb +238 -210
  93. data/test/unit_test.rb +114 -76
  94. metadata +45 -31
  95. data/ChangeLog +0 -89
  96. data/README.rdoc +0 -207
  97. data/lib/api/api.rb +0 -117
  98. data/lib/api/api_5_0.rb +0 -338
  99. data/lib/api/api_5_1.rb +0 -7
  100. data/lib/api/api_5_2.rb +0 -5
  101. data/lib/api/api_6_0.rb +0 -146
  102. data/lib/api/api_6_1.rb +0 -5
  103. data/lib/api/api_6_2.rb +0 -10
  104. data/lib/api/api_6_3.rb +0 -6
  105. data/lib/api/api_7_0.rb +0 -69
  106. data/lib/api/api_7_1.rb +0 -73
  107. data/lib/api/api_7_2.rb +0 -14
  108. data/lib/api/api_8_0.rb +0 -6
  109. data/lib/api/api_8_1.rb +0 -24
  110. data/lib/api/api_8_2.rb +0 -6
  111. data/lib/api/api_9_1.rb +0 -7
  112. data/lib/api/api_9_2.rb +0 -9
  113. data/lib/api/api_experimental.rb +0 -201
  114. data/lib/proj/file_api.rb +0 -166
  115. data/lib/proj/network_api.rb +0 -92
data/lib/api/proj.rb ADDED
@@ -0,0 +1,750 @@
1
+ # Generated by ruby-bindgen (1.0.0)
2
+
3
+ module Proj
4
+ module Api
5
+ attach_variable :PjRelease, :pj_release, :string
6
+ typedef :pointer, :PjArea
7
+
8
+ class P5Factors < FFI::Struct
9
+ layout :meridional_scale, :double,
10
+ :parallel_scale, :double,
11
+ :areal_scale, :double,
12
+ :angular_distortion, :double,
13
+ :meridian_parallel_angle, :double,
14
+ :meridian_convergence, :double,
15
+ :tissot_semimajor, :double,
16
+ :tissot_semiminor, :double,
17
+ :dx_dlam, :double,
18
+ :dx_dphi, :double,
19
+ :dy_dlam, :double,
20
+ :dy_dphi, :double
21
+ end
22
+
23
+ typedef :pointer, :PJconsts
24
+ callback :pj_list_proj_callback, [:pointer], :pointer
25
+
26
+ class PjList < FFI::Struct
27
+ layout :id, :string,
28
+ :proj, :pj_list_proj_callback,
29
+ :descr, :pointer
30
+ end
31
+
32
+ class PjEllps < FFI::Struct
33
+ layout :id, :string,
34
+ :major, :string,
35
+ :ell, :string,
36
+ :name, :string
37
+ end
38
+
39
+ class PjUnits < FFI::Struct
40
+ layout :id, :string,
41
+ :to_meter, :string,
42
+ :name, :string,
43
+ :factor, :double
44
+ end
45
+
46
+ class PjPrimeMeridians < FFI::Struct
47
+ layout :id, :string,
48
+ :defn, :string
49
+ end
50
+
51
+ class PjXyzt < FFI::Struct
52
+ layout :x, :double,
53
+ :y, :double,
54
+ :z, :double,
55
+ :t, :double
56
+ end
57
+
58
+ class PjUvwt < FFI::Struct
59
+ layout :u, :double,
60
+ :v, :double,
61
+ :w, :double,
62
+ :t, :double
63
+ end
64
+
65
+ class PjLpzt < FFI::Struct
66
+ layout :lam, :double,
67
+ :phi, :double,
68
+ :z, :double,
69
+ :t, :double
70
+ end
71
+
72
+ class PjOpk < FFI::Struct
73
+ layout :o, :double,
74
+ :p, :double,
75
+ :k, :double
76
+ end
77
+
78
+ class PjEnu < FFI::Struct
79
+ layout :e, :double,
80
+ :n, :double,
81
+ :u, :double
82
+ end
83
+
84
+ class PjGeod < FFI::Struct
85
+ layout :s, :double,
86
+ :a1, :double,
87
+ :a2, :double
88
+ end
89
+
90
+ class PjUv < FFI::Struct
91
+ layout :u, :double,
92
+ :v, :double
93
+ end
94
+
95
+ class PjXy < FFI::Struct
96
+ layout :x, :double,
97
+ :y, :double
98
+ end
99
+
100
+ class PjLp < FFI::Struct
101
+ layout :lam, :double,
102
+ :phi, :double
103
+ end
104
+
105
+ class PjXyz < FFI::Struct
106
+ layout :x, :double,
107
+ :y, :double,
108
+ :z, :double
109
+ end
110
+
111
+ class PjUvw < FFI::Struct
112
+ layout :u, :double,
113
+ :v, :double,
114
+ :w, :double
115
+ end
116
+
117
+ class PjLpz < FFI::Struct
118
+ layout :lam, :double,
119
+ :phi, :double,
120
+ :z, :double
121
+ end
122
+
123
+ class PjCoord < FFI::Union
124
+ layout :v, [:double, 4],
125
+ :xyzt, PjXyzt,
126
+ :uvwt, PjUvwt,
127
+ :lpzt, PjLpzt,
128
+ :geod, PjGeod,
129
+ :opk, PjOpk,
130
+ :enu, PjEnu,
131
+ :xyz, PjXyz,
132
+ :uvw, PjUvw,
133
+ :lpz, PjLpz,
134
+ :xy, PjXy,
135
+ :uv, PjUv,
136
+ :lp, PjLp
137
+ end
138
+
139
+ class PjProjInfo < FFI::Struct
140
+ layout :id, :string,
141
+ :description, :string,
142
+ :definition, :string,
143
+ :has_inverse, :int,
144
+ :accuracy, :double
145
+ end
146
+
147
+ class PjGridInfo < FFI::Struct
148
+ layout :gridname, [:char, 32],
149
+ :filename, [:char, 260],
150
+ :format, [:char, 8],
151
+ :lowerleft, PjLp,
152
+ :upperright, PjLp,
153
+ :n_lon, :int,
154
+ :n_lat, :int,
155
+ :cs_lon, :double,
156
+ :cs_lat, :double
157
+ end
158
+
159
+ class PjInitInfo < FFI::Struct
160
+ layout :name, [:char, 32],
161
+ :filename, [:char, 260],
162
+ :version, [:char, 32],
163
+ :origin, [:char, 32],
164
+ :lastupdate, [:char, 16]
165
+ end
166
+
167
+ PjLogLevel = enum(
168
+ :PJ_LOG_NONE, 0,
169
+ :PJ_LOG_ERROR, 1,
170
+ :PJ_LOG_DEBUG, 2,
171
+ :PJ_LOG_TRACE, 3,
172
+ :PJ_LOG_TELL, 4,
173
+ :PJ_LOG_DEBUG_MAJOR, 2,
174
+ :PJ_LOG_DEBUG_MINOR, 3
175
+ )
176
+
177
+ callback :pj_log_function, [:pointer, :int, :string], :void
178
+ typedef :pointer, :PjCtx
179
+ attach_function :proj_context_create, :proj_context_create, [], :pointer
180
+ attach_function :proj_context_destroy, :proj_context_destroy, [:pointer], :pointer
181
+ callback :proj_file_finder, [:pointer, :string, :pointer], :pointer
182
+ typedef :pointer, :ProjFileHandle
183
+
184
+ ProjOpenAccess = enum(
185
+ :PROJ_OPEN_ACCESS_READ_ONLY, 0,
186
+ :PROJ_OPEN_ACCESS_READ_UPDATE, 1,
187
+ :PROJ_OPEN_ACCESS_CREATE, 2
188
+ )
189
+
190
+ callback :proj_file_api_open_cbk_callback, [:pointer, :string, ProjOpenAccess, :pointer], :pointer
191
+ callback :proj_file_api_read_cbk_callback, [:pointer, :pointer, :pointer, :size_t, :pointer], :size_t
192
+ callback :proj_file_api_write_cbk_callback, [:pointer, :pointer, :pointer, :size_t, :pointer], :size_t
193
+ callback :proj_file_api_seek_cbk_callback, [:pointer, :pointer, :long_long, :int, :pointer], :int
194
+ callback :proj_file_api_tell_cbk_callback, [:pointer, :pointer, :pointer], :ulong_long
195
+ callback :proj_file_api_close_cbk_callback, [:pointer, :pointer, :pointer], :void
196
+ callback :proj_file_api_exists_cbk_callback, [:pointer, :string, :pointer], :int
197
+ callback :proj_file_api_mkdir_cbk_callback, [:pointer, :string, :pointer], :int
198
+ callback :proj_file_api_unlink_cbk_callback, [:pointer, :string, :pointer], :int
199
+ callback :proj_file_api_rename_cbk_callback, [:pointer, :string, :string, :pointer], :int
200
+
201
+ class ProjFileApi < FFI::Struct
202
+ layout :version, :int,
203
+ :open_cbk, :proj_file_api_open_cbk_callback,
204
+ :read_cbk, :proj_file_api_read_cbk_callback,
205
+ :write_cbk, :proj_file_api_write_cbk_callback,
206
+ :seek_cbk, :proj_file_api_seek_cbk_callback,
207
+ :tell_cbk, :proj_file_api_tell_cbk_callback,
208
+ :close_cbk, :proj_file_api_close_cbk_callback,
209
+ :exists_cbk, :proj_file_api_exists_cbk_callback,
210
+ :mkdir_cbk, :proj_file_api_mkdir_cbk_callback,
211
+ :unlink_cbk, :proj_file_api_unlink_cbk_callback,
212
+ :rename_cbk, :proj_file_api_rename_cbk_callback
213
+ end
214
+
215
+ typedef :pointer, :ProjNetworkHandle
216
+ callback :proj_network_open_cbk_type, [:pointer, :string, :ulong_long, :size_t, :pointer, :pointer, :size_t, :pointer, :pointer], :pointer
217
+ callback :proj_network_close_cbk_type, [:pointer, :pointer, :pointer], :void
218
+ callback :proj_network_get_header_value_cbk_type, [:pointer, :pointer, :string, :pointer], :pointer
219
+ callback :proj_network_read_range_type, [:pointer, :pointer, :ulong_long, :size_t, :pointer, :size_t, :pointer, :pointer], :size_t
220
+ attach_function :proj_create, :proj_create, [:pointer, :string], :pointer
221
+ attach_function :proj_create_argv, :proj_create_argv, [:pointer, :int, :pointer], :pointer
222
+ attach_function :proj_create_crs_to_crs, :proj_create_crs_to_crs, [:pointer, :string, :string, :pointer], :pointer
223
+ attach_function :proj_destroy, :proj_destroy, [:pointer], :pointer
224
+
225
+ PjDirection = enum(
226
+ :PJ_FWD, 1,
227
+ :PJ_IDENT, 0,
228
+ :PJ_INV, -1
229
+ )
230
+
231
+ attach_function :proj_angular_input, :proj_angular_input, [:pointer, PjDirection], :int
232
+ attach_function :proj_angular_output, :proj_angular_output, [:pointer, PjDirection], :int
233
+ attach_function :proj_trans, :proj_trans, [:pointer, PjDirection, PjCoord.by_value], PjCoord.by_value
234
+ attach_function :proj_trans_array, :proj_trans_array, [:pointer, PjDirection, :size_t, :pointer], :int
235
+ attach_function :proj_trans_generic, :proj_trans_generic, [:pointer, PjDirection, :pointer, :size_t, :size_t, :pointer, :size_t, :size_t, :pointer, :size_t, :size_t, :pointer, :size_t, :size_t], :size_t
236
+ attach_function :proj_coord, :proj_coord, [:double, :double, :double, :double], PjCoord.by_value
237
+ attach_function :proj_roundtrip, :proj_roundtrip, [:pointer, PjDirection, :int, PjCoord.by_ref], :double
238
+ attach_function :proj_lp_dist, :proj_lp_dist, [:pointer, PjCoord.by_value, PjCoord.by_value], :double
239
+ attach_function :proj_lpz_dist, :proj_lpz_dist, [:pointer, PjCoord.by_value, PjCoord.by_value], :double
240
+ attach_function :proj_xy_dist, :proj_xy_dist, [PjCoord.by_value, PjCoord.by_value], :double
241
+ attach_function :proj_xyz_dist, :proj_xyz_dist, [PjCoord.by_value, PjCoord.by_value], :double
242
+ attach_function :proj_geod, :proj_geod, [:pointer, PjCoord.by_value, PjCoord.by_value], PjCoord.by_value
243
+ attach_function :proj_context_errno, :proj_context_errno, [:pointer], :int
244
+ attach_function :proj_errno, :proj_errno, [:pointer], :int
245
+ attach_function :proj_errno_set, :proj_errno_set, [:pointer, :int], :int
246
+ attach_function :proj_errno_reset, :proj_errno_reset, [:pointer], :int
247
+ attach_function :proj_errno_restore, :proj_errno_restore, [:pointer, :int], :int
248
+ attach_function :proj_factors, :proj_factors, [:pointer, PjCoord.by_value], P5Factors.by_value
249
+ attach_function :proj_pj_info, :proj_pj_info, [:pointer], PjProjInfo.by_value
250
+ attach_function :proj_grid_info, :proj_grid_info, [:string], PjGridInfo.by_value
251
+ attach_function :proj_init_info, :proj_init_info, [:string], PjInitInfo.by_value
252
+ attach_function :proj_list_operations, :proj_list_operations, [], :pointer
253
+ attach_function :proj_list_ellps, :proj_list_ellps, [], :pointer
254
+ attach_function :proj_list_prime_meridians, :proj_list_prime_meridians, [], :pointer
255
+ attach_function :proj_torad, :proj_torad, [:double], :double
256
+ attach_function :proj_todeg, :proj_todeg, [:double], :double
257
+ attach_function :proj_dmstor, :proj_dmstor, [:string, :pointer], :double
258
+ typedef :pointer, :proj_string_list
259
+
260
+ PjGuessedWktDialect = enum(
261
+ :PJ_GUESSED_WKT2_2019, 0,
262
+ :PJ_GUESSED_WKT2_2018, 0,
263
+ :PJ_GUESSED_WKT2_2015, 1,
264
+ :PJ_GUESSED_WKT1_GDAL, 2,
265
+ :PJ_GUESSED_WKT1_ESRI, 3,
266
+ :PJ_GUESSED_NOT_WKT, 4
267
+ )
268
+
269
+ PjCategory = enum(
270
+ :PJ_CATEGORY_ELLIPSOID, 0,
271
+ :PJ_CATEGORY_PRIME_MERIDIAN, 1,
272
+ :PJ_CATEGORY_DATUM, 2,
273
+ :PJ_CATEGORY_CRS, 3,
274
+ :PJ_CATEGORY_COORDINATE_OPERATION, 4,
275
+ :PJ_CATEGORY_DATUM_ENSEMBLE, 5
276
+ )
277
+
278
+ PjType = enum(
279
+ :PJ_TYPE_UNKNOWN, 0,
280
+ :PJ_TYPE_ELLIPSOID, 1,
281
+ :PJ_TYPE_PRIME_MERIDIAN, 2,
282
+ :PJ_TYPE_GEODETIC_REFERENCE_FRAME, 3,
283
+ :PJ_TYPE_DYNAMIC_GEODETIC_REFERENCE_FRAME, 4,
284
+ :PJ_TYPE_VERTICAL_REFERENCE_FRAME, 5,
285
+ :PJ_TYPE_DYNAMIC_VERTICAL_REFERENCE_FRAME, 6,
286
+ :PJ_TYPE_DATUM_ENSEMBLE, 7,
287
+ :PJ_TYPE_CRS, 8,
288
+ :PJ_TYPE_GEODETIC_CRS, 9,
289
+ :PJ_TYPE_GEOCENTRIC_CRS, 10,
290
+ :PJ_TYPE_GEOGRAPHIC_CRS, 11,
291
+ :PJ_TYPE_GEOGRAPHIC_2D_CRS, 12,
292
+ :PJ_TYPE_GEOGRAPHIC_3D_CRS, 13,
293
+ :PJ_TYPE_VERTICAL_CRS, 14,
294
+ :PJ_TYPE_PROJECTED_CRS, 15,
295
+ :PJ_TYPE_COMPOUND_CRS, 16,
296
+ :PJ_TYPE_TEMPORAL_CRS, 17,
297
+ :PJ_TYPE_ENGINEERING_CRS, 18,
298
+ :PJ_TYPE_BOUND_CRS, 19,
299
+ :PJ_TYPE_OTHER_CRS, 20,
300
+ :PJ_TYPE_CONVERSION, 21,
301
+ :PJ_TYPE_TRANSFORMATION, 22,
302
+ :PJ_TYPE_CONCATENATED_OPERATION, 23,
303
+ :PJ_TYPE_OTHER_COORDINATE_OPERATION, 24,
304
+ :PJ_TYPE_TEMPORAL_DATUM, 25,
305
+ :PJ_TYPE_ENGINEERING_DATUM, 26,
306
+ :PJ_TYPE_PARAMETRIC_DATUM, 27,
307
+ :PJ_TYPE_DERIVED_PROJECTED_CRS, 28,
308
+ :PJ_TYPE_COORDINATE_METADATA, 29
309
+ )
310
+
311
+ PjComparisonCriterion = enum(
312
+ :PJ_COMP_STRICT, 0,
313
+ :PJ_COMP_EQUIVALENT, 1,
314
+ :PJ_COMP_EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS, 2
315
+ )
316
+
317
+ PjWktType = enum(
318
+ :PJ_WKT2_2015, 0,
319
+ :PJ_WKT2_2015_SIMPLIFIED, 1,
320
+ :PJ_WKT2_2019, 2,
321
+ :PJ_WKT2_2018, 2,
322
+ :PJ_WKT2_2019_SIMPLIFIED, 3,
323
+ :PJ_WKT2_2018_SIMPLIFIED, 3,
324
+ :PJ_WKT1_GDAL, 4,
325
+ :PJ_WKT1_ESRI, 5
326
+ )
327
+
328
+ ProjCrsExtentUse = enum(
329
+ :PJ_CRS_EXTENT_NONE, 0,
330
+ :PJ_CRS_EXTENT_BOTH, 1,
331
+ :PJ_CRS_EXTENT_INTERSECTION, 2,
332
+ :PJ_CRS_EXTENT_SMALLEST, 3
333
+ )
334
+
335
+ ProjGridAvailabilityUse = enum(
336
+ :PROJ_GRID_AVAILABILITY_USED_FOR_SORTING, 0,
337
+ :PROJ_GRID_AVAILABILITY_DISCARD_OPERATION_IF_MISSING_GRID, 1,
338
+ :PROJ_GRID_AVAILABILITY_IGNORED, 2,
339
+ :PROJ_GRID_AVAILABILITY_KNOWN_AVAILABLE, 3
340
+ )
341
+
342
+ PjProjStringType = enum(
343
+ :PJ_PROJ_5, 0,
344
+ :PJ_PROJ_4, 1
345
+ )
346
+
347
+ ProjSpatialCriterion = enum(
348
+ :PROJ_SPATIAL_CRITERION_STRICT_CONTAINMENT, 0,
349
+ :PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION, 1
350
+ )
351
+
352
+ ProjIntermediateCrsUse = enum(
353
+ :PROJ_INTERMEDIATE_CRS_USE_ALWAYS, 0,
354
+ :PROJ_INTERMEDIATE_CRS_USE_IF_NO_DIRECT_TRANSFORMATION, 1,
355
+ :PROJ_INTERMEDIATE_CRS_USE_NEVER, 2
356
+ )
357
+
358
+ PjCoordinateSystemType = enum(
359
+ :PJ_CS_TYPE_UNKNOWN, 0,
360
+ :PJ_CS_TYPE_CARTESIAN, 1,
361
+ :PJ_CS_TYPE_ELLIPSOIDAL, 2,
362
+ :PJ_CS_TYPE_VERTICAL, 3,
363
+ :PJ_CS_TYPE_SPHERICAL, 4,
364
+ :PJ_CS_TYPE_ORDINAL, 5,
365
+ :PJ_CS_TYPE_PARAMETRIC, 6,
366
+ :PJ_CS_TYPE_DATETIMETEMPORAL, 7,
367
+ :PJ_CS_TYPE_TEMPORALCOUNT, 8,
368
+ :PJ_CS_TYPE_TEMPORALMEASURE, 9
369
+ )
370
+
371
+ class ProjCrsInfo < FFI::Struct
372
+ layout :auth_name, :pointer,
373
+ :code, :pointer,
374
+ :name, :pointer,
375
+ :type, PjType,
376
+ :deprecated, :int,
377
+ :bbox_valid, :int,
378
+ :west_lon_degree, :double,
379
+ :south_lat_degree, :double,
380
+ :east_lon_degree, :double,
381
+ :north_lat_degree, :double,
382
+ :area_name, :pointer,
383
+ :projection_method_name, :pointer,
384
+ :celestial_body_name, :pointer
385
+ end
386
+
387
+ class ProjCrsListParameters < FFI::Struct
388
+ layout :types, :pointer,
389
+ :types_count, :size_t,
390
+ :crs_area_of_use_contains_bbox, :int,
391
+ :bbox_valid, :int,
392
+ :west_lon_degree, :double,
393
+ :south_lat_degree, :double,
394
+ :east_lon_degree, :double,
395
+ :north_lat_degree, :double,
396
+ :allow_deprecated, :int,
397
+ :celestial_body_name, :string
398
+ end
399
+
400
+ class ProjUnitInfo < FFI::Struct
401
+ layout :auth_name, :pointer,
402
+ :code, :pointer,
403
+ :name, :pointer,
404
+ :category, :pointer,
405
+ :conv_factor, :double,
406
+ :proj_short_name, :pointer,
407
+ :deprecated, :int
408
+ end
409
+
410
+ class ProjCelestialBodyInfo < FFI::Struct
411
+ layout :auth_name, :pointer,
412
+ :name, :pointer
413
+ end
414
+
415
+ typedef :pointer, :PjObjList
416
+ typedef :pointer, :PjInsertSession
417
+ typedef :pointer, :PjOperationFactoryContext
418
+
419
+ PjUnitType = enum(
420
+ :PJ_UT_ANGULAR, 0,
421
+ :PJ_UT_LINEAR, 1,
422
+ :PJ_UT_SCALE, 2,
423
+ :PJ_UT_TIME, 3,
424
+ :PJ_UT_PARAMETRIC, 4
425
+ )
426
+
427
+ class PjAxisDescription < FFI::Struct
428
+ layout :name, :pointer,
429
+ :abbreviation, :pointer,
430
+ :direction, :pointer,
431
+ :unit_name, :pointer,
432
+ :unit_conv_factor, :double,
433
+ :unit_type, PjUnitType
434
+ end
435
+
436
+ PjCartesianCs2dType = enum(
437
+ :PJ_CART2D_EASTING_NORTHING, 0,
438
+ :PJ_CART2D_NORTHING_EASTING, 1,
439
+ :PJ_CART2D_NORTH_POLE_EASTING_SOUTH_NORTHING_SOUTH, 2,
440
+ :PJ_CART2D_SOUTH_POLE_EASTING_NORTH_NORTHING_NORTH, 3,
441
+ :PJ_CART2D_WESTING_SOUTHING, 4
442
+ )
443
+
444
+ PjEllipsoidalCs2dType = enum(
445
+ :PJ_ELLPS2D_LONGITUDE_LATITUDE, 0,
446
+ :PJ_ELLPS2D_LATITUDE_LONGITUDE, 1
447
+ )
448
+
449
+ PjEllipsoidalCs3dType = enum(
450
+ :PJ_ELLPS3D_LONGITUDE_LATITUDE_HEIGHT, 0,
451
+ :PJ_ELLPS3D_LATITUDE_LONGITUDE_HEIGHT, 1
452
+ )
453
+
454
+ class PjParamDescription < FFI::Struct
455
+ layout :name, :string,
456
+ :auth_name, :string,
457
+ :code, :string,
458
+ :value, :double,
459
+ :unit_name, :string,
460
+ :unit_conv_factor, :double,
461
+ :unit_type, PjUnitType
462
+ end
463
+
464
+ if proj_version >= 50100
465
+ attach_function :proj_errno_string, :proj_errno_string, [:int], :string
466
+ attach_function :proj_log_level, :proj_log_level, [:pointer, PjLogLevel], PjLogLevel
467
+ attach_function :proj_log_func, :proj_log_func, [:pointer, :pointer, :pj_log_function], :void
468
+ end
469
+ if proj_version >= 60000
470
+ attach_function :proj_context_set_file_finder, :proj_context_set_file_finder, [:pointer, :proj_file_finder, :pointer], :void
471
+ attach_function :proj_context_set_search_paths, :proj_context_set_search_paths, [:pointer, :int, :pointer], :void
472
+ attach_function :proj_context_use_proj4_init_rules, :proj_context_use_proj4_init_rules, [:pointer, :int], :void
473
+ attach_function :proj_context_get_use_proj4_init_rules, :proj_context_get_use_proj4_init_rules, [:pointer, :int], :int
474
+ attach_function :proj_assign_context, :proj_assign_context, [:pointer, :pointer], :void
475
+ attach_function :proj_area_create, :proj_area_create, [], :pointer
476
+ attach_function :proj_area_set_bbox, :proj_area_set_bbox, [:pointer, :double, :double, :double, :double], :void
477
+ attach_function :proj_area_destroy, :proj_area_destroy, [:pointer], :void
478
+ attach_function :proj_string_list_destroy, :proj_string_list_destroy, [:pointer], :void
479
+ attach_function :proj_context_set_database_path, :proj_context_set_database_path, [:pointer, :string, :pointer, :pointer], :int
480
+ attach_function :proj_context_get_database_path, :proj_context_get_database_path, [:pointer], :string
481
+ attach_function :proj_context_get_database_metadata, :proj_context_get_database_metadata, [:pointer, :string], :string
482
+ attach_function :proj_context_guess_wkt_dialect, :proj_context_guess_wkt_dialect, [:pointer, :string], PjGuessedWktDialect
483
+ attach_function :proj_create_from_wkt, :proj_create_from_wkt, [:pointer, :string, :pointer, :pointer, :pointer], :pointer
484
+ attach_function :proj_create_from_database, :proj_create_from_database, [:pointer, :string, :string, PjCategory, :int, :pointer], :pointer
485
+ attach_function :proj_uom_get_info_from_database, :proj_uom_get_info_from_database, [:pointer, :string, :string, :pointer, :pointer, :pointer], :int
486
+ attach_function :proj_clone, :proj_clone, [:pointer, :pointer], :pointer
487
+ attach_function :proj_create_from_name, :proj_create_from_name, [:pointer, :string, :string, :pointer, :size_t, :int, :size_t, :pointer], :pointer
488
+ attach_function :proj_get_type, :proj_get_type, [:pointer], PjType
489
+ attach_function :proj_is_deprecated, :proj_is_deprecated, [:pointer], :int
490
+ attach_function :proj_get_non_deprecated, :proj_get_non_deprecated, [:pointer, :pointer], :pointer
491
+ attach_function :proj_is_equivalent_to, :proj_is_equivalent_to, [:pointer, :pointer, PjComparisonCriterion], :int
492
+ attach_function :proj_is_crs, :proj_is_crs, [:pointer], :bool
493
+ attach_function :proj_get_name, :proj_get_name, [:pointer], :string
494
+ attach_function :proj_get_id_auth_name, :proj_get_id_auth_name, [:pointer, :int], :string
495
+ attach_function :proj_get_id_code, :proj_get_id_code, [:pointer, :int], :string
496
+ attach_function :proj_get_area_of_use, :proj_get_area_of_use, [:pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :bool
497
+ attach_function :proj_as_wkt, :proj_as_wkt, [:pointer, :pointer, PjWktType, :pointer], :string
498
+ attach_function :proj_as_proj_string, :proj_as_proj_string, [:pointer, :pointer, PjProjStringType, :pointer], :string
499
+ attach_function :proj_get_source_crs, :proj_get_source_crs, [:pointer, :pointer], :pointer
500
+ attach_function :proj_get_target_crs, :proj_get_target_crs, [:pointer, :pointer], :pointer
501
+ attach_function :proj_identify, :proj_identify, [:pointer, :pointer, :string, :pointer, :pointer], :pointer
502
+ attach_function :proj_int_list_destroy, :proj_int_list_destroy, [:pointer], :void
503
+ attach_function :proj_get_authorities_from_database, :proj_get_authorities_from_database, [:pointer], :pointer
504
+ attach_function :proj_get_codes_from_database, :proj_get_codes_from_database, [:pointer, :string, PjType, :int], :pointer
505
+ attach_function :proj_get_crs_list_parameters_create, :proj_get_crs_list_parameters_create, [], ProjCrsListParameters.by_ref
506
+ attach_function :proj_get_crs_list_parameters_destroy, :proj_get_crs_list_parameters_destroy, [ProjCrsListParameters.by_ref], :void
507
+ attach_function :proj_get_crs_info_list_from_database, :proj_get_crs_info_list_from_database, [:pointer, :string, ProjCrsListParameters.by_ref, :pointer], :pointer
508
+ attach_function :proj_crs_info_list_destroy, :proj_crs_info_list_destroy, [:pointer], :void
509
+ attach_function :proj_create_operation_factory_context, :proj_create_operation_factory_context, [:pointer, :string], :pointer
510
+ attach_function :proj_operation_factory_context_destroy, :proj_operation_factory_context_destroy, [:pointer], :void
511
+ attach_function :proj_operation_factory_context_set_desired_accuracy, :proj_operation_factory_context_set_desired_accuracy, [:pointer, :pointer, :double], :void
512
+ attach_function :proj_operation_factory_context_set_area_of_interest, :proj_operation_factory_context_set_area_of_interest, [:pointer, :pointer, :double, :double, :double, :double], :void
513
+ attach_function :proj_operation_factory_context_set_crs_extent_use, :proj_operation_factory_context_set_crs_extent_use, [:pointer, :pointer, ProjCrsExtentUse], :void
514
+ attach_function :proj_operation_factory_context_set_spatial_criterion, :proj_operation_factory_context_set_spatial_criterion, [:pointer, :pointer, ProjSpatialCriterion], :void
515
+ attach_function :proj_operation_factory_context_set_grid_availability_use, :proj_operation_factory_context_set_grid_availability_use, [:pointer, :pointer, ProjGridAvailabilityUse], :void
516
+ attach_function :proj_operation_factory_context_set_use_proj_alternative_grid_names, :proj_operation_factory_context_set_use_proj_alternative_grid_names, [:pointer, :pointer, :int], :void
517
+ attach_function :proj_operation_factory_context_set_allow_use_intermediate_crs, :proj_operation_factory_context_set_allow_use_intermediate_crs, [:pointer, :pointer, ProjIntermediateCrsUse], :void
518
+ attach_function :proj_operation_factory_context_set_allowed_intermediate_crs, :proj_operation_factory_context_set_allowed_intermediate_crs, [:pointer, :pointer, :pointer], :void
519
+ attach_function :proj_create_operations, :proj_create_operations, [:pointer, :pointer, :pointer, :pointer], :pointer
520
+ attach_function :proj_list_get_count, :proj_list_get_count, [:pointer], :int
521
+ attach_function :proj_list_get, :proj_list_get, [:pointer, :pointer, :int], :pointer
522
+ attach_function :proj_list_destroy, :proj_list_destroy, [:pointer], :void
523
+ attach_function :proj_crs_get_geodetic_crs, :proj_crs_get_geodetic_crs, [:pointer, :pointer], :pointer
524
+ attach_function :proj_crs_get_horizontal_datum, :proj_crs_get_horizontal_datum, [:pointer, :pointer], :pointer
525
+ attach_function :proj_crs_get_sub_crs, :proj_crs_get_sub_crs, [:pointer, :pointer, :int], :pointer
526
+ attach_function :proj_crs_get_datum, :proj_crs_get_datum, [:pointer, :pointer], :pointer
527
+ attach_function :proj_crs_get_coordinate_system, :proj_crs_get_coordinate_system, [:pointer, :pointer], :pointer
528
+ attach_function :proj_cs_get_type, :proj_cs_get_type, [:pointer, :pointer], PjCoordinateSystemType
529
+ attach_function :proj_cs_get_axis_count, :proj_cs_get_axis_count, [:pointer, :pointer], :int
530
+ attach_function :proj_cs_get_axis_info, :proj_cs_get_axis_info, [:pointer, :pointer, :int, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :bool
531
+ attach_function :proj_get_ellipsoid, :proj_get_ellipsoid, [:pointer, :pointer], :pointer
532
+ attach_function :proj_ellipsoid_get_parameters, :proj_ellipsoid_get_parameters, [:pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int
533
+ attach_function :proj_get_prime_meridian, :proj_get_prime_meridian, [:pointer, :pointer], :pointer
534
+ attach_function :proj_prime_meridian_get_parameters, :proj_prime_meridian_get_parameters, [:pointer, :pointer, :pointer, :pointer, :pointer], :int
535
+ attach_function :proj_crs_get_coordoperation, :proj_crs_get_coordoperation, [:pointer, :pointer], :pointer
536
+ attach_function :proj_coordoperation_get_method_info, :proj_coordoperation_get_method_info, [:pointer, :pointer, :pointer, :pointer, :pointer], :int
537
+ attach_function :proj_coordoperation_is_instantiable, :proj_coordoperation_is_instantiable, [:pointer, :pointer], :int
538
+ attach_function :proj_coordoperation_has_ballpark_transformation, :proj_coordoperation_has_ballpark_transformation, [:pointer, :pointer], :int
539
+ attach_function :proj_coordoperation_get_param_count, :proj_coordoperation_get_param_count, [:pointer, :pointer], :int
540
+ attach_function :proj_coordoperation_get_param_index, :proj_coordoperation_get_param_index, [:pointer, :pointer, :string], :int
541
+ attach_function :proj_coordoperation_get_param, :proj_coordoperation_get_param, [:pointer, :pointer, :int, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int
542
+ attach_function :proj_coordoperation_get_grid_used_count, :proj_coordoperation_get_grid_used_count, [:pointer, :pointer], :int
543
+ attach_function :proj_coordoperation_get_grid_used, :proj_coordoperation_get_grid_used, [:pointer, :pointer, :int, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int
544
+ attach_function :proj_coordoperation_get_accuracy, :proj_coordoperation_get_accuracy, [:pointer, :pointer], :double
545
+ attach_function :proj_coordoperation_get_towgs84_values, :proj_coordoperation_get_towgs84_values, [:pointer, :pointer, :pointer, :int, :int], :int
546
+ attach_function :proj_create_cs, :proj_create_cs, [:pointer, PjCoordinateSystemType, :int, :pointer], :pointer
547
+ attach_function :proj_create_cartesian_2d_cs, :proj_create_cartesian_2D_cs, [:pointer, PjCartesianCs2dType, :string, :double], :pointer
548
+ attach_function :proj_create_ellipsoidal_2d_cs, :proj_create_ellipsoidal_2D_cs, [:pointer, PjEllipsoidalCs2dType, :string, :double], :pointer
549
+ attach_function :proj_query_geodetic_crs_from_datum, :proj_query_geodetic_crs_from_datum, [:pointer, :string, :string, :string, :string], :pointer
550
+ attach_function :proj_create_geographic_crs, :proj_create_geographic_crs, [:pointer, :string, :string, :string, :double, :double, :string, :double, :string, :double, :pointer], :pointer
551
+ attach_function :proj_create_geographic_crs_from_datum, :proj_create_geographic_crs_from_datum, [:pointer, :string, :pointer, :pointer], :pointer
552
+ attach_function :proj_create_geocentric_crs, :proj_create_geocentric_crs, [:pointer, :string, :string, :string, :double, :double, :string, :double, :string, :double, :string, :double], :pointer
553
+ attach_function :proj_create_geocentric_crs_from_datum, :proj_create_geocentric_crs_from_datum, [:pointer, :string, :pointer, :string, :double], :pointer
554
+ attach_function :proj_alter_name, :proj_alter_name, [:pointer, :pointer, :string], :pointer
555
+ attach_function :proj_alter_id, :proj_alter_id, [:pointer, :pointer, :string, :string], :pointer
556
+ attach_function :proj_crs_alter_geodetic_crs, :proj_crs_alter_geodetic_crs, [:pointer, :pointer, :pointer], :pointer
557
+ attach_function :proj_crs_alter_cs_angular_unit, :proj_crs_alter_cs_angular_unit, [:pointer, :pointer, :string, :double, :string, :string], :pointer
558
+ attach_function :proj_crs_alter_cs_linear_unit, :proj_crs_alter_cs_linear_unit, [:pointer, :pointer, :string, :double, :string, :string], :pointer
559
+ attach_function :proj_crs_alter_parameters_linear_unit, :proj_crs_alter_parameters_linear_unit, [:pointer, :pointer, :string, :double, :string, :string, :int], :pointer
560
+ attach_function :proj_create_engineering_crs, :proj_create_engineering_crs, [:pointer, :string], :pointer
561
+ attach_function :proj_create_vertical_crs, :proj_create_vertical_crs, [:pointer, :string, :string, :string, :double], :pointer
562
+ attach_function :proj_create_compound_crs, :proj_create_compound_crs, [:pointer, :string, :pointer, :pointer], :pointer
563
+ attach_function :proj_create_conversion, :proj_create_conversion, [:pointer, :string, :string, :string, :string, :string, :string, :int, :pointer], :pointer
564
+ attach_function :proj_create_transformation, :proj_create_transformation, [:pointer, :string, :string, :string, :pointer, :pointer, :pointer, :string, :string, :string, :int, :pointer, :double], :pointer
565
+ attach_function :proj_convert_conversion_to_other_method, :proj_convert_conversion_to_other_method, [:pointer, :pointer, :int, :string], :pointer
566
+ attach_function :proj_create_projected_crs, :proj_create_projected_crs, [:pointer, :string, :pointer, :pointer, :pointer], :pointer
567
+ attach_function :proj_crs_create_bound_crs, :proj_crs_create_bound_crs, [:pointer, :pointer, :pointer, :pointer], :pointer
568
+ attach_function :proj_crs_create_bound_crs_to_wgs84, :proj_crs_create_bound_crs_to_WGS84, [:pointer, :pointer, :pointer], :pointer
569
+ attach_function :proj_create_conversion_utm, :proj_create_conversion_utm, [:pointer, :int, :int], :pointer
570
+ attach_function :proj_create_conversion_transverse_mercator, :proj_create_conversion_transverse_mercator, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
571
+ attach_function :proj_create_conversion_gauss_schreiber_transverse_mercator, :proj_create_conversion_gauss_schreiber_transverse_mercator, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
572
+ attach_function :proj_create_conversion_transverse_mercator_south_oriented, :proj_create_conversion_transverse_mercator_south_oriented, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
573
+ attach_function :proj_create_conversion_two_point_equidistant, :proj_create_conversion_two_point_equidistant, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
574
+ attach_function :proj_create_conversion_tunisia_mapping_grid, :proj_create_conversion_tunisia_mapping_grid, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
575
+ attach_function :proj_create_conversion_albers_equal_area, :proj_create_conversion_albers_equal_area, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
576
+ attach_function :proj_create_conversion_lambert_conic_conformal_1sp, :proj_create_conversion_lambert_conic_conformal_1sp, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
577
+ attach_function :proj_create_conversion_lambert_conic_conformal_2sp, :proj_create_conversion_lambert_conic_conformal_2sp, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
578
+ attach_function :proj_create_conversion_lambert_conic_conformal_2sp_michigan, :proj_create_conversion_lambert_conic_conformal_2sp_michigan, [:pointer, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
579
+ attach_function :proj_create_conversion_lambert_conic_conformal_2sp_belgium, :proj_create_conversion_lambert_conic_conformal_2sp_belgium, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
580
+ attach_function :proj_create_conversion_azimuthal_equidistant, :proj_create_conversion_azimuthal_equidistant, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
581
+ attach_function :proj_create_conversion_guam_projection, :proj_create_conversion_guam_projection, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
582
+ attach_function :proj_create_conversion_bonne, :proj_create_conversion_bonne, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
583
+ attach_function :proj_create_conversion_lambert_cylindrical_equal_area_spherical, :proj_create_conversion_lambert_cylindrical_equal_area_spherical, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
584
+ attach_function :proj_create_conversion_lambert_cylindrical_equal_area, :proj_create_conversion_lambert_cylindrical_equal_area, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
585
+ attach_function :proj_create_conversion_cassini_soldner, :proj_create_conversion_cassini_soldner, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
586
+ attach_function :proj_create_conversion_equidistant_conic, :proj_create_conversion_equidistant_conic, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
587
+ attach_function :proj_create_conversion_eckert_i, :proj_create_conversion_eckert_i, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
588
+ attach_function :proj_create_conversion_eckert_ii, :proj_create_conversion_eckert_ii, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
589
+ attach_function :proj_create_conversion_eckert_iii, :proj_create_conversion_eckert_iii, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
590
+ attach_function :proj_create_conversion_eckert_iv, :proj_create_conversion_eckert_iv, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
591
+ attach_function :proj_create_conversion_eckert_v, :proj_create_conversion_eckert_v, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
592
+ attach_function :proj_create_conversion_eckert_vi, :proj_create_conversion_eckert_vi, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
593
+ attach_function :proj_create_conversion_equidistant_cylindrical, :proj_create_conversion_equidistant_cylindrical, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
594
+ attach_function :proj_create_conversion_equidistant_cylindrical_spherical, :proj_create_conversion_equidistant_cylindrical_spherical, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
595
+ attach_function :proj_create_conversion_gall, :proj_create_conversion_gall, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
596
+ attach_function :proj_create_conversion_goode_homolosine, :proj_create_conversion_goode_homolosine, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
597
+ attach_function :proj_create_conversion_interrupted_goode_homolosine, :proj_create_conversion_interrupted_goode_homolosine, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
598
+ attach_function :proj_create_conversion_geostationary_satellite_sweep_x, :proj_create_conversion_geostationary_satellite_sweep_x, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
599
+ attach_function :proj_create_conversion_geostationary_satellite_sweep_y, :proj_create_conversion_geostationary_satellite_sweep_y, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
600
+ attach_function :proj_create_conversion_gnomonic, :proj_create_conversion_gnomonic, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
601
+ attach_function :proj_create_conversion_hotine_oblique_mercator_variant_a, :proj_create_conversion_hotine_oblique_mercator_variant_a, [:pointer, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
602
+ attach_function :proj_create_conversion_hotine_oblique_mercator_variant_b, :proj_create_conversion_hotine_oblique_mercator_variant_b, [:pointer, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
603
+ attach_function :proj_create_conversion_hotine_oblique_mercator_two_point_natural_origin, :proj_create_conversion_hotine_oblique_mercator_two_point_natural_origin, [:pointer, :double, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
604
+ attach_function :proj_create_conversion_laborde_oblique_mercator, :proj_create_conversion_laborde_oblique_mercator, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
605
+ attach_function :proj_create_conversion_international_map_world_polyconic, :proj_create_conversion_international_map_world_polyconic, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
606
+ attach_function :proj_create_conversion_krovak_north_oriented, :proj_create_conversion_krovak_north_oriented, [:pointer, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
607
+ attach_function :proj_create_conversion_krovak, :proj_create_conversion_krovak, [:pointer, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
608
+ attach_function :proj_create_conversion_lambert_azimuthal_equal_area, :proj_create_conversion_lambert_azimuthal_equal_area, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
609
+ attach_function :proj_create_conversion_miller_cylindrical, :proj_create_conversion_miller_cylindrical, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
610
+ attach_function :proj_create_conversion_mercator_variant_a, :proj_create_conversion_mercator_variant_a, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
611
+ attach_function :proj_create_conversion_mercator_variant_b, :proj_create_conversion_mercator_variant_b, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
612
+ attach_function :proj_create_conversion_popular_visualisation_pseudo_mercator, :proj_create_conversion_popular_visualisation_pseudo_mercator, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
613
+ attach_function :proj_create_conversion_mollweide, :proj_create_conversion_mollweide, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
614
+ attach_function :proj_create_conversion_new_zealand_mapping_grid, :proj_create_conversion_new_zealand_mapping_grid, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
615
+ attach_function :proj_create_conversion_oblique_stereographic, :proj_create_conversion_oblique_stereographic, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
616
+ attach_function :proj_create_conversion_orthographic, :proj_create_conversion_orthographic, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
617
+ attach_function :proj_create_conversion_american_polyconic, :proj_create_conversion_american_polyconic, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
618
+ attach_function :proj_create_conversion_polar_stereographic_variant_a, :proj_create_conversion_polar_stereographic_variant_a, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
619
+ attach_function :proj_create_conversion_polar_stereographic_variant_b, :proj_create_conversion_polar_stereographic_variant_b, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
620
+ attach_function :proj_create_conversion_robinson, :proj_create_conversion_robinson, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
621
+ attach_function :proj_create_conversion_sinusoidal, :proj_create_conversion_sinusoidal, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
622
+ attach_function :proj_create_conversion_stereographic, :proj_create_conversion_stereographic, [:pointer, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
623
+ attach_function :proj_create_conversion_van_der_grinten, :proj_create_conversion_van_der_grinten, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
624
+ attach_function :proj_create_conversion_wagner_i, :proj_create_conversion_wagner_i, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
625
+ attach_function :proj_create_conversion_wagner_ii, :proj_create_conversion_wagner_ii, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
626
+ attach_function :proj_create_conversion_wagner_iii, :proj_create_conversion_wagner_iii, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
627
+ attach_function :proj_create_conversion_wagner_iv, :proj_create_conversion_wagner_iv, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
628
+ attach_function :proj_create_conversion_wagner_v, :proj_create_conversion_wagner_v, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
629
+ attach_function :proj_create_conversion_wagner_vi, :proj_create_conversion_wagner_vi, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
630
+ attach_function :proj_create_conversion_wagner_vii, :proj_create_conversion_wagner_vii, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
631
+ attach_function :proj_create_conversion_quadrilateralized_spherical_cube, :proj_create_conversion_quadrilateralized_spherical_cube, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
632
+ attach_function :proj_create_conversion_spherical_cross_track_height, :proj_create_conversion_spherical_cross_track_height, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
633
+ attach_function :proj_create_conversion_equal_earth, :proj_create_conversion_equal_earth, [:pointer, :double, :double, :double, :string, :double, :string, :double], :pointer
634
+ end
635
+ if proj_version >= 60100
636
+ attach_function :proj_normalize_for_visualization, :proj_normalize_for_visualization, [:pointer, :pointer], :pointer
637
+ end
638
+ if proj_version >= 60200
639
+ attach_function :proj_create_crs_to_crs_from_pj, :proj_create_crs_to_crs_from_pj, [:pointer, :pointer, :pointer, :pointer, :pointer], :pointer
640
+ attach_function :proj_cleanup, :proj_cleanup, [], :void
641
+ attach_function :proj_context_set_autoclose_database, :proj_context_set_autoclose_database, [:pointer, :int], :void
642
+ attach_function :proj_grid_get_info_from_database, :proj_grid_get_info_from_database, [:pointer, :string, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int
643
+ attach_function :proj_get_remarks, :proj_get_remarks, [:pointer], :string
644
+ attach_function :proj_get_scope, :proj_get_scope, [:pointer], :string
645
+ attach_function :proj_as_projjson, :proj_as_projjson, [:pointer, :pointer, :pointer], :string
646
+ attach_function :proj_operation_factory_context_set_discard_superseded, :proj_operation_factory_context_set_discard_superseded, [:pointer, :pointer, :int], :void
647
+ attach_function :proj_concatoperation_get_step_count, :proj_concatoperation_get_step_count, [:pointer, :pointer], :int
648
+ attach_function :proj_concatoperation_get_step, :proj_concatoperation_get_step, [:pointer, :pointer, :int], :pointer
649
+ end
650
+ if proj_version >= 60300
651
+ attach_function :proj_is_equivalent_to_with_ctx, :proj_is_equivalent_to_with_ctx, [:pointer, :pointer, :pointer, PjComparisonCriterion], :int
652
+ attach_function :proj_coordoperation_create_inverse, :proj_coordoperation_create_inverse, [:pointer, :pointer], :pointer
653
+ attach_function :proj_create_ellipsoidal_3d_cs, :proj_create_ellipsoidal_3D_cs, [:pointer, PjEllipsoidalCs3dType, :string, :double, :string, :double], :pointer
654
+ attach_function :proj_create_derived_geographic_crs, :proj_create_derived_geographic_crs, [:pointer, :string, :pointer, :pointer, :pointer], :pointer
655
+ attach_function :proj_is_derived_crs, :proj_is_derived_crs, [:pointer, :pointer], :int
656
+ attach_function :proj_crs_promote_to_3d, :proj_crs_promote_to_3D, [:pointer, :string, :pointer], :pointer
657
+ attach_function :proj_crs_create_projected_3d_crs_from_2d, :proj_crs_create_projected_3D_crs_from_2D, [:pointer, :string, :pointer, :pointer], :pointer
658
+ attach_function :proj_crs_demote_to_2d, :proj_crs_demote_to_2D, [:pointer, :string, :pointer], :pointer
659
+ attach_function :proj_create_vertical_crs_ex, :proj_create_vertical_crs_ex, [:pointer, :string, :string, :string, :string, :string, :double, :string, :string, :string, :pointer, :pointer], :pointer
660
+ attach_function :proj_crs_create_bound_vertical_crs, :proj_crs_create_bound_vertical_crs, [:pointer, :pointer, :pointer, :string], :pointer
661
+ attach_function :proj_create_conversion_vertical_perspective, :proj_create_conversion_vertical_perspective, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
662
+ attach_function :proj_create_conversion_pole_rotation_grib_convention, :proj_create_conversion_pole_rotation_grib_convention, [:pointer, :double, :double, :double, :string, :double], :pointer
663
+ end
664
+ if proj_version >= 70000
665
+ attach_function :proj_context_set_fileapi, :proj_context_set_fileapi, [:pointer, ProjFileApi.by_ref, :pointer], :int
666
+ attach_function :proj_context_set_sqlite3_vfs_name, :proj_context_set_sqlite3_vfs_name, [:pointer, :string], :void
667
+ attach_function :proj_context_set_network_callbacks, :proj_context_set_network_callbacks, [:pointer, :proj_network_open_cbk_type, :proj_network_close_cbk_type, :proj_network_get_header_value_cbk_type, :proj_network_read_range_type, :pointer], :int
668
+ attach_function :proj_context_set_enable_network, :proj_context_set_enable_network, [:pointer, :int], :int
669
+ attach_function :proj_context_is_network_enabled, :proj_context_is_network_enabled, [:pointer], :int
670
+ attach_function :proj_context_set_url_endpoint, :proj_context_set_url_endpoint, [:pointer, :string], :void
671
+ attach_function :proj_grid_cache_set_enable, :proj_grid_cache_set_enable, [:pointer, :int], :void
672
+ attach_function :proj_grid_cache_set_filename, :proj_grid_cache_set_filename, [:pointer, :string], :void
673
+ attach_function :proj_grid_cache_set_max_size, :proj_grid_cache_set_max_size, [:pointer, :int], :void
674
+ attach_function :proj_grid_cache_set_ttl, :proj_grid_cache_set_ttl, [:pointer, :int], :void
675
+ attach_function :proj_grid_cache_clear, :proj_grid_cache_clear, [:pointer], :void
676
+ attach_function :proj_is_download_needed, :proj_is_download_needed, [:pointer, :string, :int], :int
677
+ callback :proj_download_file_progress_cbk_callback, [:pointer, :double, :pointer], :int
678
+ attach_function :proj_download_file, :proj_download_file, [:pointer, :string, :int, :proj_download_file_progress_cbk_callback, :pointer], :int
679
+ end
680
+ if proj_version >= 70100
681
+ attach_function :proj_context_get_url_endpoint, :proj_context_get_url_endpoint, [:pointer], :string
682
+ attach_function :proj_context_get_user_writable_directory, :proj_context_get_user_writable_directory, [:pointer, :int], :string
683
+ attach_function :proj_degree_input, :proj_degree_input, [:pointer, PjDirection], :int
684
+ attach_function :proj_degree_output, :proj_degree_output, [:pointer, PjDirection], :int
685
+ attach_function :proj_get_units_from_database, :proj_get_units_from_database, [:pointer, :string, :string, :int, :pointer], :pointer
686
+ attach_function :proj_unit_list_destroy, :proj_unit_list_destroy, [:pointer], :void
687
+ attach_function :proj_operation_factory_context_set_allow_ballpark_transformations, :proj_operation_factory_context_set_allow_ballpark_transformations, [:pointer, :pointer, :int], :void
688
+ attach_function :proj_get_suggested_operation, :proj_get_suggested_operation, [:pointer, :pointer, PjDirection, PjCoord.by_value], :int
689
+ end
690
+ if proj_version >= 70200
691
+ attach_function :proj_context_clone, :proj_context_clone, [:pointer], :pointer
692
+ attach_function :proj_context_set_ca_bundle_path, :proj_context_set_ca_bundle_path, [:pointer, :string], :void
693
+ attach_function :proj_crs_get_datum_ensemble, :proj_crs_get_datum_ensemble, [:pointer, :pointer], :pointer
694
+ attach_function :proj_crs_get_datum_forced, :proj_crs_get_datum_forced, [:pointer, :pointer], :pointer
695
+ attach_function :proj_datum_ensemble_get_member_count, :proj_datum_ensemble_get_member_count, [:pointer, :pointer], :int
696
+ attach_function :proj_datum_ensemble_get_accuracy, :proj_datum_ensemble_get_accuracy, [:pointer, :pointer], :double
697
+ attach_function :proj_datum_ensemble_get_member, :proj_datum_ensemble_get_member, [:pointer, :pointer, :int], :pointer
698
+ attach_function :proj_dynamic_datum_get_frame_reference_epoch, :proj_dynamic_datum_get_frame_reference_epoch, [:pointer, :pointer], :double
699
+ end
700
+ if proj_version >= 80000
701
+ attach_function :proj_context_errno_string, :proj_context_errno_string, [:pointer, :int], :string
702
+ attach_function :proj_crs_is_derived, :proj_crs_is_derived, [:pointer, :pointer], :int
703
+ end
704
+ if proj_version >= 80100
705
+ attach_function :proj_context_get_database_structure, :proj_context_get_database_structure, [:pointer, :pointer], :pointer
706
+ attach_function :proj_get_geoid_models_from_database, :proj_get_geoid_models_from_database, [:pointer, :string, :string, :pointer], :pointer
707
+ attach_function :proj_get_celestial_body_list_from_database, :proj_get_celestial_body_list_from_database, [:pointer, :string, :pointer], :pointer
708
+ attach_function :proj_celestial_body_list_destroy, :proj_celestial_body_list_destroy, [:pointer], :void
709
+ attach_function :proj_insert_object_session_create, :proj_insert_object_session_create, [:pointer], :pointer
710
+ attach_function :proj_insert_object_session_destroy, :proj_insert_object_session_destroy, [:pointer, :pointer], :void
711
+ attach_function :proj_get_insert_statements, :proj_get_insert_statements, [:pointer, :pointer, :pointer, :string, :string, :int, :pointer, :pointer], :pointer
712
+ attach_function :proj_suggests_code_for, :proj_suggests_code_for, [:pointer, :pointer, :string, :int, :pointer], :pointer
713
+ attach_function :proj_string_destroy, :proj_string_destroy, [:pointer], :void
714
+ attach_function :proj_get_celestial_body_name, :proj_get_celestial_body_name, [:pointer, :pointer], :string
715
+ end
716
+ if proj_version >= 80200
717
+ attach_function :proj_trans_bounds, :proj_trans_bounds, [:pointer, :pointer, PjDirection, :double, :double, :double, :double, :pointer, :pointer, :pointer, :pointer, :int], :int
718
+ attach_function :proj_create_conversion_pole_rotation_netcdf_cf_convention, :proj_create_conversion_pole_rotation_netcdf_cf_convention, [:pointer, :double, :double, :double, :string, :double], :pointer
719
+ end
720
+ if proj_version >= 90100
721
+ attach_function :proj_area_set_name, :proj_area_set_name, [:pointer, :string], :void
722
+ attach_function :proj_trans_get_last_used_operation, :proj_trans_get_last_used_operation, [:pointer], :pointer
723
+ attach_function :proj_operation_factory_context_set_area_of_interest_name, :proj_operation_factory_context_set_area_of_interest_name, [:pointer, :pointer, :string], :void
724
+ end
725
+ if proj_version >= 90200
726
+ attach_function :proj_rtodms2, :proj_rtodms2, [:pointer, :size_t, :double, :int, :int], :pointer
727
+ attach_function :proj_get_domain_count, :proj_get_domain_count, [:pointer], :int
728
+ attach_function :proj_get_scope_ex, :proj_get_scope_ex, [:pointer, :int], :string
729
+ attach_function :proj_get_area_of_use_ex, :proj_get_area_of_use_ex, [:pointer, :pointer, :int, :pointer, :pointer, :pointer, :pointer, :pointer], :bool
730
+ attach_function :proj_coordinate_metadata_get_epoch, :proj_coordinate_metadata_get_epoch, [:pointer, :pointer], :double
731
+ attach_function :proj_create_conversion_tunisia_mining_grid, :proj_create_conversion_tunisia_mining_grid, [:pointer, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
732
+ end
733
+ if proj_version >= 90400
734
+ attach_function :proj_crs_has_point_motion_operation, :proj_crs_has_point_motion_operation, [:pointer, :pointer], :int
735
+ attach_function :proj_coordinate_metadata_create, :proj_coordinate_metadata_create, [:pointer, :pointer, :double], :pointer
736
+ attach_function :proj_create_conversion_lambert_conic_conformal_1sp_variant_b, :proj_create_conversion_lambert_conic_conformal_1sp_variant_b, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
737
+ end
738
+ if proj_version >= 90500
739
+ attach_function :proj_context_set_user_writable_directory, :proj_context_set_user_writable_directory, [:pointer, :string, :int], :void
740
+ attach_function :proj_coordoperation_requires_per_coordinate_input_time, :proj_coordoperation_requires_per_coordinate_input_time, [:pointer, :pointer], :int
741
+ attach_function :proj_create_conversion_local_orthographic, :proj_create_conversion_local_orthographic, [:pointer, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :pointer
742
+ end
743
+ if proj_version >= 90600
744
+ attach_function :proj_trans_bounds_3d, :proj_trans_bounds_3D, [:pointer, :pointer, PjDirection, :double, :double, :double, :double, :double, :double, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :int], :int
745
+ end
746
+ if proj_version >= 90700
747
+ attach_function :proj_geod_direct, :proj_geod_direct, [:pointer, PjCoord.by_value, :double, :double], PjCoord.by_value
748
+ end
749
+ end
750
+ end