proj4rb 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +26 -15
- data/README.rdoc +82 -44
- data/Rakefile +27 -27
- data/lib/api/api.rb +96 -118
- data/lib/api/api_5_0.rb +331 -300
- data/lib/api/api_5_1.rb +6 -6
- data/lib/api/api_5_2.rb +4 -4
- data/lib/api/api_6_0.rb +116 -14
- data/lib/api/api_6_1.rb +4 -4
- data/lib/api/api_6_2.rb +9 -6
- data/lib/api/api_6_3.rb +6 -0
- data/lib/api/api_7_0.rb +68 -0
- data/lib/api/api_7_1.rb +73 -0
- data/lib/api/api_7_2.rb +14 -0
- data/lib/api/api_8_0.rb +6 -0
- data/lib/api/api_8_1.rb +24 -0
- data/lib/api/api_8_2.rb +6 -0
- data/lib/api/api_9_1.rb +7 -0
- data/lib/api/api_9_2.rb +9 -0
- data/lib/api/api_experimental.rb +196 -0
- data/lib/proj/area.rb +73 -32
- data/lib/proj/axis_info.rb +44 -0
- data/lib/proj/bounds.rb +13 -0
- data/lib/proj/context.rb +174 -28
- data/lib/proj/conversion.rb +92 -0
- data/lib/proj/coordinate.rb +281 -197
- data/lib/proj/coordinate_operation_mixin.rb +381 -0
- data/lib/proj/coordinate_system.rb +137 -0
- data/lib/proj/crs.rb +672 -204
- data/lib/proj/crs_info.rb +47 -0
- data/lib/proj/database.rb +305 -0
- data/lib/proj/datum.rb +32 -0
- data/lib/proj/datum_ensemble.rb +34 -0
- data/lib/proj/ellipsoid.rb +77 -41
- data/lib/proj/error.rb +62 -9
- data/lib/proj/file_api.rb +166 -0
- data/lib/proj/grid.rb +121 -0
- data/lib/proj/grid_cache.rb +64 -0
- data/lib/proj/grid_info.rb +19 -0
- data/lib/proj/network_api.rb +92 -0
- data/lib/proj/operation.rb +42 -42
- data/lib/proj/operation_factory_context.rb +136 -0
- data/lib/proj/parameter.rb +38 -0
- data/lib/proj/parameters.rb +106 -0
- data/lib/proj/pj_object.rb +670 -80
- data/lib/proj/pj_objects.rb +44 -0
- data/lib/proj/prime_meridian.rb +65 -39
- data/lib/proj/projection.rb +698 -207
- data/lib/proj/session.rb +46 -0
- data/lib/proj/strings.rb +32 -0
- data/lib/proj/transformation.rb +101 -60
- data/lib/proj/unit.rb +108 -53
- data/lib/proj.rb +110 -9
- data/proj4rb.gemspec +5 -5
- data/test/abstract_test.rb +23 -1
- data/test/context_test.rb +172 -82
- data/test/conversion_test.rb +368 -0
- data/test/coordinate_system_test.rb +144 -0
- data/test/crs_test.rb +770 -71
- data/test/database_test.rb +360 -0
- data/test/datum_ensemble_test.rb +65 -0
- data/test/datum_test.rb +55 -0
- data/test/ellipsoid_test.rb +64 -18
- data/test/file_api_test.rb +66 -0
- data/test/grid_cache_test.rb +72 -0
- data/test/grid_test.rb +141 -0
- data/test/network_api_test.rb +45 -0
- data/test/operation_factory_context_test.rb +201 -0
- data/test/parameters_test.rb +40 -0
- data/test/pj_object_test.rb +179 -0
- data/test/prime_meridian_test.rb +76 -0
- data/test/proj_test.rb +46 -4
- data/test/projection_test.rb +646 -222
- data/test/session_test.rb +78 -0
- data/test/transformation_test.rb +149 -7
- data/test/unit_test.rb +57 -28
- metadata +51 -13
- data/lib/api/api_4_9.rb +0 -31
- data/lib/proj/config.rb +0 -70
- data/lib/proj/point.rb +0 -72
- data/test/prime_meridians_test.rb +0 -33
data/lib/api/api_5_2.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
module Proj
|
2
|
-
module Api
|
3
|
-
attach_function :proj_errno_string, [:int], :string
|
4
|
-
end
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
attach_function :proj_errno_string, [:int], :string
|
4
|
+
end
|
5
5
|
end
|
data/lib/api/api_6_0.rb
CHANGED
@@ -1,30 +1,114 @@
|
|
1
1
|
module Proj
|
2
2
|
module Api
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
# Comparison criteria
|
4
|
+
PJ_COMPARISON_CRITERION = enum(:PJ_COMP_STRICT, # All properties are identical
|
5
|
+
:PJ_COMP_EQUIVALENT, # The objects are equivalent for the purpose of coordinate operations. They can differ by the name of their objects, identifiers, other metadata. Parameters may be expressed in different units, provided that the value is (with some tolerance) the same once expressed in a common unit.
|
6
|
+
:PJ_COMP_EQUIVALENT_EXCEPT_AXIS_ORDER_GEOGCRS) # Same as EQUIVALENT, relaxed with an exception that the axis order of the base CRS of a DerivedCRS/ProjectedCRS or the axis order of a GeographicCRS is ignored. Only to be used with DerivedCRS/ProjectedCRS/GeographicCRS
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
#Guessed WKT "dialect"
|
9
|
+
PJ_GUESSED_WKT_DIALECT = enum(:PJ_GUESSED_WKT2_2019,
|
10
|
+
:PJ_GUESSED_WKT2_2018,
|
11
|
+
:PJ_GUESSED_WKT2_2015,
|
12
|
+
:PJ_GUESSED_WKT1_GDAL,
|
13
|
+
:PJ_GUESSED_WKT1_ESRI,
|
14
|
+
:PJ_GUESSED_NOT_WKT)
|
10
15
|
|
11
16
|
# Base methods
|
17
|
+
attach_function :proj_clone, [:PJ_CONTEXT, :PJ], :PJ
|
12
18
|
attach_function :proj_get_name, [:PJ], :string
|
13
19
|
attach_function :proj_get_id_auth_name, [:PJ, :int], :string
|
14
20
|
attach_function :proj_get_id_code, [:PJ, :int], :string
|
15
|
-
attach_function :
|
16
|
-
attach_function :
|
21
|
+
attach_function :proj_get_remarks, [:PJ], :string
|
22
|
+
attach_function :proj_get_scope, [:PJ], :string
|
23
|
+
attach_function :proj_get_type, [:PJ], PJ_TYPE
|
17
24
|
attach_function :proj_is_crs, [:PJ], :bool
|
25
|
+
attach_function :proj_is_equivalent_to, [:PJ, :PJ, PJ_COMPARISON_CRITERION], :int
|
26
|
+
attach_function :proj_is_deprecated, [:PJ], :int
|
27
|
+
attach_function :proj_get_source_crs, [:PJ_CONTEXT, :PJ], :PJ
|
28
|
+
attach_function :proj_get_target_crs, [:PJ_CONTEXT, :PJ], :PJ
|
29
|
+
|
30
|
+
# Area
|
31
|
+
attach_function :proj_area_create, [], :PJ_AREA
|
32
|
+
attach_function :proj_area_set_bbox, [:PJ_AREA, :double, :double, :double, :double], :void
|
18
33
|
attach_function :proj_get_area_of_use, [:PJ_CONTEXT, :PJ, :pointer, :pointer, :pointer, :pointer, :pointer], :bool
|
34
|
+
attach_function :proj_area_destroy, [:PJ_AREA], :void
|
19
35
|
|
20
36
|
# Export to various formats
|
21
|
-
attach_function :proj_as_wkt, [:PJ_CONTEXT, :PJ,
|
22
|
-
attach_function :proj_as_proj_string, [:PJ_CONTEXT, :PJ,
|
37
|
+
attach_function :proj_as_wkt, [:PJ_CONTEXT, :PJ, PJ_WKT_TYPE, :pointer], :string
|
38
|
+
attach_function :proj_as_proj_string, [:PJ_CONTEXT, :PJ, PJ_PROJ_STRING_TYPE, :pointer], :string
|
39
|
+
|
40
|
+
# String List
|
41
|
+
typedef :pointer, :PROJ_STRING_LIST
|
42
|
+
attach_function :proj_string_list_destroy, [:PROJ_STRING_LIST], :void
|
43
|
+
|
44
|
+
# ----- Object List
|
45
|
+
typedef :pointer, :PJ_OBJ_LIST
|
46
|
+
|
47
|
+
attach_function :proj_create_from_name, [:PJ_CONTEXT, :string, :string, :pointer, :size_t, :int, :size_t, :string], :PJ_OBJ_LIST
|
48
|
+
attach_function :proj_get_non_deprecated, [:PJ_CONTEXT, :PJ], :PJ_OBJ_LIST
|
49
|
+
attach_function :proj_identify, [:PJ_CONTEXT, :PJ, :string, :pointer, :pointer], :PJ_OBJ_LIST
|
50
|
+
attach_function :proj_list_get_count, [:PJ_OBJ_LIST], :int
|
51
|
+
attach_function :proj_list_get, [:PJ_CONTEXT, :PJ_OBJ_LIST, :int], :PJ
|
52
|
+
attach_function :proj_list_destroy, [:PJ_OBJ_LIST], :void
|
53
|
+
|
54
|
+
callback :proj_file_finder, [:PJ_CONTEXT, :string, :pointer], :pointer
|
55
|
+
attach_function :proj_context_set_file_finder, [:PJ_CONTEXT, :proj_file_finder, :pointer], :void
|
56
|
+
attach_function :proj_context_set_search_paths, [:PJ_CONTEXT, :int, :pointer], :void
|
57
|
+
|
58
|
+
attach_function :proj_list_angular_units, [], :pointer #PJ_UNITS
|
23
59
|
|
24
|
-
#
|
60
|
+
# Contains description of a CRS
|
61
|
+
class PROJ_CRS_INFO < FFI::Struct
|
62
|
+
fields = [:auth_name, :string, # Authority name
|
63
|
+
:code, :string, # Object code
|
64
|
+
:name, :string, # Object name
|
65
|
+
:type, PJ_TYPE, # Object type
|
66
|
+
:deprecated, :int, # Whether the object is deprecated
|
67
|
+
:bbox_valid, :int, # Whether bbox values in degrees are valid
|
68
|
+
:west_lon_degree, :double, # Western-most longitude of the area of use, in degrees.
|
69
|
+
:south_lat_degree, :double, # Southern-most latitude of the area of use, in degrees.
|
70
|
+
:east_lon_degree, :double, # Eastern-most longitude of the area of use, in degrees.
|
71
|
+
:north_lat_degree, :double, # Northern-most latitude of the area of use, in degrees.
|
72
|
+
:area_name, :string, # Name of the area of use
|
73
|
+
:projection_method_name, :string] # Name of the projection method for a projected CRS. Might be NULL even for projected CRS in some cases.
|
74
|
+
|
75
|
+
if Api::PROJ_VERSION >= Gem::Version.new('8.1.0')
|
76
|
+
fields += [:celestial_body_name, :string] # Name of the celestial body of the CRS (e.g. "Earth")
|
77
|
+
end
|
78
|
+
layout(*fields)
|
79
|
+
end
|
80
|
+
|
81
|
+
attach_function :proj_crs_info_list_destroy, [:pointer], :void
|
82
|
+
|
83
|
+
# Structure describing optional parameters for proj_get_crs_list
|
84
|
+
class PROJ_CRS_LIST_PARAMETERS < FFI::Struct
|
85
|
+
fields = [:types, :pointer, # Array of allowed object types. Should be nil if all types are allowed
|
86
|
+
:types_count, :size_t, # Size of types. Should be 0 if all types are allowed
|
87
|
+
:crs_area_of_use_contains_bbox, :int, # If TRUE and bbox_valid == TRUE, then only CRS whose area of use entirely contains the specified bounding box will be returned. If FALSE and bbox_valid == TRUE, then only CRS whose area of use intersects the specified bounding box will be returned
|
88
|
+
:bbox_valid, :int, # To set to TRUE so that west_lon_degree, south_lat_degree, east_lon_degree and north_lat_degree fields are taken into account
|
89
|
+
:west_lon_degree, :double, # Western-most longitude of the area of use, in degrees.
|
90
|
+
:south_lat_degree, :double, # Southern-most latitude of the area of use, in degrees.
|
91
|
+
:east_lon_degree, :double, # Eastern-most longitude of the area of use, in degrees.
|
92
|
+
:north_lat_degree, :double,# Northern-most latitude of the area of use, in degrees.
|
93
|
+
:allow_deprecated, :int] # Whether deprecated objects are allowed. Default to False
|
94
|
+
|
95
|
+
if Api::PROJ_VERSION >= Gem::Version.new('8.1.0')
|
96
|
+
fields += [:celestial_body_name, :pointer] #Name of the celestial body of the CRS (e.g. "Earth")
|
97
|
+
end
|
98
|
+
layout(*fields)
|
99
|
+
end
|
100
|
+
|
101
|
+
attach_function :proj_get_crs_list_parameters_create, [], :pointer
|
102
|
+
attach_function :proj_get_crs_list_parameters_destroy, [:pointer], :void
|
103
|
+
|
104
|
+
# Database functions
|
25
105
|
attach_function :proj_context_set_database_path, [:PJ_CONTEXT, :string, :pointer, :pointer], :int
|
26
106
|
attach_function :proj_context_get_database_path, [:PJ_CONTEXT], :string
|
27
107
|
attach_function :proj_context_get_database_metadata, [:PJ_CONTEXT, :string], :string
|
108
|
+
attach_function :proj_get_authorities_from_database, [:PJ_CONTEXT], :PROJ_STRING_LIST
|
109
|
+
attach_function :proj_get_codes_from_database, [:PJ_CONTEXT, :string, PJ_TYPE, :int], :PROJ_STRING_LIST
|
110
|
+
attach_function :proj_get_crs_info_list_from_database, [:PJ_CONTEXT, :string, PROJ_CRS_LIST_PARAMETERS, :pointer], PROJ_CRS_INFO
|
111
|
+
attach_function :proj_uom_get_info_from_database, [:PJ_CONTEXT, :string, :string, :pointer, :pointer, :pointer], :int
|
28
112
|
|
29
113
|
# CRS methods
|
30
114
|
attach_function :proj_crs_get_geodetic_crs, [:PJ_CONTEXT, :PJ], :PJ
|
@@ -32,11 +116,29 @@ module Proj
|
|
32
116
|
attach_function :proj_crs_get_sub_crs, [:PJ_CONTEXT, :PJ, :int], :PJ
|
33
117
|
attach_function :proj_crs_get_datum, [:PJ_CONTEXT, :PJ], :PJ
|
34
118
|
attach_function :proj_crs_get_coordinate_system, [:PJ_CONTEXT, :PJ], :PJ
|
35
|
-
attach_function :proj_cs_get_type, [:PJ_CONTEXT, :PJ],
|
119
|
+
attach_function :proj_cs_get_type, [:PJ_CONTEXT, :PJ], PJ_COORDINATE_SYSTEM_TYPE
|
36
120
|
attach_function :proj_cs_get_axis_count, [:PJ_CONTEXT, :PJ], :int
|
37
121
|
attach_function :proj_cs_get_axis_info, [:PJ_CONTEXT, :PJ, :int, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :bool
|
38
|
-
attach_function :proj_get_prime_meridian, [:PJ_CONTEXT, :PJ], :PJ
|
39
|
-
attach_function :proj_get_ellipsoid, [:PJ_CONTEXT, :PJ], :PJ
|
40
122
|
attach_function :proj_crs_get_coordoperation, [:PJ_CONTEXT, :PJ], :PJ
|
123
|
+
attach_function :proj_coordoperation_get_accuracy, [:PJ_CONTEXT, :PJ], :double
|
124
|
+
attach_function :proj_coordoperation_get_method_info, [:PJ_CONTEXT, :PJ, :pointer, :pointer, :pointer], :int
|
125
|
+
attach_function :proj_coordoperation_get_towgs84_values, [:PJ_CONTEXT, :PJ, :pointer, :int, :int], :int
|
126
|
+
attach_function :proj_concatoperation_get_step_count, [:PJ_CONTEXT, :PJ], :int
|
127
|
+
attach_function :proj_concatoperation_get_step, [:PJ_CONTEXT, :PJ, :int], :PJ
|
128
|
+
|
129
|
+
attach_function :proj_get_ellipsoid, [:PJ_CONTEXT, :PJ], :PJ
|
130
|
+
attach_function :proj_ellipsoid_get_parameters, [:PJ_CONTEXT, :PJ, :pointer, :pointer, :pointer, :pointer], :int
|
131
|
+
|
132
|
+
attach_function :proj_get_prime_meridian, [:PJ_CONTEXT, :PJ], :PJ
|
133
|
+
attach_function :proj_prime_meridian_get_parameters, [:PJ_CONTEXT, :PJ, :pointer, :pointer, :pointer], :int
|
134
|
+
|
135
|
+
# ISO-19111
|
136
|
+
attach_function :proj_create_from_wkt, [:PJ_CONTEXT, :string, :pointer, :PROJ_STRING_LIST, :PROJ_STRING_LIST], :PJ
|
137
|
+
attach_function :proj_create_from_database, [:PJ_CONTEXT, :string, :string, PJ_CATEGORY, :int, :pointer], :PJ
|
138
|
+
attach_function :proj_context_guess_wkt_dialect, [:PJ_CONTEXT, :string], PJ_GUESSED_WKT_DIALECT
|
139
|
+
|
140
|
+
# Undocumented apis
|
141
|
+
attach_function :proj_context_use_proj4_init_rules, [:PJ_CONTEXT, :int], :void
|
142
|
+
attach_function :proj_context_get_use_proj4_init_rules, [:PJ_CONTEXT, :int], :int
|
41
143
|
end
|
42
144
|
end
|
data/lib/api/api_6_1.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
module Proj
|
2
|
-
module Api
|
3
|
-
attach_function :proj_normalize_for_visualization, [:PJ_CONTEXT, :PJ], :PJ
|
4
|
-
end
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
attach_function :proj_normalize_for_visualization, [:PJ_CONTEXT, :PJ], :PJ
|
4
|
+
end
|
5
5
|
end
|
data/lib/api/api_6_2.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
module Proj
|
2
|
-
module Api
|
3
|
-
attach_function :
|
4
|
-
attach_function :
|
5
|
-
attach_function :
|
6
|
-
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
attach_function :proj_cleanup, [], :void
|
4
|
+
attach_function :proj_as_projjson, [:PJ_CONTEXT, :PJ, :pointer], :string
|
5
|
+
attach_function :proj_create_crs_to_crs_from_pj, [:PJ_CONTEXT, :PJ, :PJ, :PJ_AREA, :pointer], :PJ
|
6
|
+
attach_function :proj_grid_get_info_from_database, [:PJ_CONTEXT, :string, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int
|
7
|
+
attach_function :proj_context_set_autoclose_database, [:PJ_CONTEXT, :int], :void
|
8
|
+
attach_function :proj_operation_factory_context_set_discard_superseded, [:PJ_CONTEXT, :pointer, :int], :void
|
9
|
+
end
|
7
10
|
end
|
data/lib/api/api_6_3.rb
ADDED
data/lib/api/api_7_0.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
# ---- File API ----------
|
4
|
+
typedef :pointer, :PROJ_FILE_HANDLE
|
5
|
+
typedef :pointer, :USER_DATA
|
6
|
+
|
7
|
+
PROJ_OPEN_ACCESS = enum(:PROJ_OPEN_ACCESS_READ_ONLY, # Read-only access. Equivalent to "rb"
|
8
|
+
:PROJ_OPEN_ACCESS_READ_UPDATE, # Read-update access. File should be created if not existing. Equivalent to "r+b
|
9
|
+
:PROJ_OPEN_ACCESS_CREATE) # Create access. File should be truncated to 0-byte if already existing. Equivalent to "w+b"
|
10
|
+
|
11
|
+
# File API callbacks
|
12
|
+
callback :open_file_cbk, [:PJ_CONTEXT, :string, PROJ_OPEN_ACCESS, :USER_DATA], :PROJ_FILE_HANDLE
|
13
|
+
callback :read_file_cbk, [:PJ_CONTEXT, :PROJ_FILE_HANDLE, :pointer, :size_t, :USER_DATA], :size_t
|
14
|
+
callback :write_file_cbk, [:PJ_CONTEXT, :PROJ_FILE_HANDLE, :pointer, :size_t, :USER_DATA], :size_t
|
15
|
+
callback :seek_file_cbk, [:PJ_CONTEXT, :PROJ_FILE_HANDLE, :long_long, :int, :USER_DATA], :int
|
16
|
+
callback :tell_file_cbk, [:PJ_CONTEXT, :PROJ_FILE_HANDLE, :USER_DATA], :long_long
|
17
|
+
callback :close_file_cbk, [:PJ_CONTEXT, :PROJ_FILE_HANDLE, :USER_DATA], :void
|
18
|
+
callback :exists_file_cbk, [:PJ_CONTEXT, :string, :USER_DATA], :int
|
19
|
+
callback :mkdir_file_cbk, [:PJ_CONTEXT, :string, :USER_DATA], :int
|
20
|
+
callback :unlink_file_cbk, [:PJ_CONTEXT, :string, :USER_DATA], :int
|
21
|
+
callback :rename_file_cbk, [:PJ_CONTEXT, :string, :string, :USER_DATA], :int
|
22
|
+
|
23
|
+
# Progress callback. The passed percentage is in the range [0, 1]. The progress callback must return
|
24
|
+
# TRUE if the download should be continued.
|
25
|
+
callback :progress_file_cbk, [:PJ_CONTEXT, :double, :USER_DATA], :int
|
26
|
+
|
27
|
+
class PROJ_FILE_API < FFI::Struct
|
28
|
+
layout :version, :int, # Version of this structure. Should be set to 1 currently.
|
29
|
+
:open_cbk, :open_file_cbk,
|
30
|
+
:read_cbk, :read_file_cbk,
|
31
|
+
:write_cbk, :write_file_cbk,
|
32
|
+
:seek_cbk, :seek_file_cbk,
|
33
|
+
:tell_cbk, :tell_file_cbk,
|
34
|
+
:close_cbk, :close_file_cbk,
|
35
|
+
:exists_cbk, :exists_file_cbk,
|
36
|
+
:mkdir_cbk, :mkdir_file_cbk,
|
37
|
+
:unlink_cbk, :unlink_file_cbk,
|
38
|
+
:rename_cbk, :rename_file_cbk
|
39
|
+
end
|
40
|
+
attach_function :proj_context_set_fileapi, [:PJ_CONTEXT, PROJ_FILE_API, :USER_DATA], :int
|
41
|
+
attach_function :proj_is_download_needed, [:PJ_CONTEXT, :string, :int], :int
|
42
|
+
attach_function :proj_download_file, [:PJ_CONTEXT, :string, :int, :progress_file_cbk, :USER_DATA], :int
|
43
|
+
|
44
|
+
# --------- Network API ------------
|
45
|
+
typedef :pointer, :PROJ_NETWORK_HANDLE
|
46
|
+
callback :open_network_cbk, [:PJ_CONTEXT, :string, :ulong_long, :size_t, :pointer, :pointer, :size_t, :string, :USER_DATA], :PROJ_NETWORK_HANDLE
|
47
|
+
callback :close_network_cbk, [:PJ_CONTEXT, :PROJ_NETWORK_HANDLE, :USER_DATA], :void
|
48
|
+
callback :header_value_cbk, [:PJ_CONTEXT, :PROJ_NETWORK_HANDLE, :pointer, :USER_DATA], :pointer
|
49
|
+
callback :read_range_cbk, [:PJ_CONTEXT, :PROJ_NETWORK_HANDLE, :ulong_long, :size_t, :pointer, :size_t, :string, :USER_DATA], :size_t
|
50
|
+
attach_function :proj_context_set_network_callbacks, [:PJ_CONTEXT, :open_network_cbk, :close_network_cbk, :header_value_cbk, :read_range_cbk, :pointer], :int
|
51
|
+
|
52
|
+
attach_function :proj_context_is_network_enabled, [:PJ_CONTEXT], :int
|
53
|
+
attach_function :proj_context_set_enable_network, [:PJ_CONTEXT, :int], :int
|
54
|
+
attach_function :proj_context_set_url_endpoint, [:PJ_CONTEXT, :string], :void
|
55
|
+
|
56
|
+
# --------- Cache ------------
|
57
|
+
attach_function :proj_grid_cache_set_enable, [:PJ_CONTEXT, :int], :void
|
58
|
+
attach_function :proj_grid_cache_set_filename, [:PJ_CONTEXT, :string], :void
|
59
|
+
attach_function :proj_grid_cache_set_max_size, [:PJ_CONTEXT, :int], :void
|
60
|
+
attach_function :proj_grid_cache_set_ttl, [:PJ_CONTEXT, :int], :void
|
61
|
+
attach_function :proj_grid_cache_clear, [:PJ_CONTEXT], :void
|
62
|
+
|
63
|
+
# -------- Other ----------
|
64
|
+
attach_function :proj_assign_context, [:PJ, :PJ_CONTEXT], :void
|
65
|
+
attach_function :proj_degree_input, [:PJ, PJ_DIRECTION], :int
|
66
|
+
attach_function :proj_degree_output, [:PJ, PJ_DIRECTION], :int
|
67
|
+
end
|
68
|
+
end
|
data/lib/api/api_7_1.rb
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
# ----- Int List
|
4
|
+
attach_function :proj_int_list_destroy, [:pointer], :void
|
5
|
+
|
6
|
+
# ---- Units ------
|
7
|
+
class PROJ_UNIT_INFO < FFI::Struct
|
8
|
+
layout :auth_name, :string,
|
9
|
+
:code, :string,
|
10
|
+
:name, :string,
|
11
|
+
:category, :string,
|
12
|
+
:conv_factor, :double,
|
13
|
+
:proj_short_name, :string,
|
14
|
+
:deprecated, :int
|
15
|
+
end
|
16
|
+
|
17
|
+
attach_function :proj_get_units_from_database, [:PJ_CONTEXT, :string, :string, :int, :pointer], :pointer #Array of pointers to PROJ_UNIT_INFO
|
18
|
+
attach_function :proj_unit_list_destroy, [:pointer], :void
|
19
|
+
|
20
|
+
# ---- Operation Factories ------
|
21
|
+
# Specifies how source and target CRS extent should be used to restrict candidate
|
22
|
+
# operations (only taken into account if no explicit area of interest is specified.
|
23
|
+
enum :PROJ_CRS_EXTENT_USE, [:PJ_CRS_EXTENT_NONE, # Ignore CRS extent
|
24
|
+
:PJ_CRS_EXTENT_BOTH, # Test extent against both CRS extent.
|
25
|
+
:PJ_CRS_EXTENT_INTERSECTION, # Test extent against the intersection of both CRS extents
|
26
|
+
:PJ_CRS_EXTENT_SMALLEST] # Test against the smallest of both CRS extent
|
27
|
+
|
28
|
+
|
29
|
+
# Spatial criterion to restrict candidate operations
|
30
|
+
enum :PROJ_SPATIAL_CRITERION, [:PROJ_SPATIAL_CRITERION_STRICT_CONTAINMENT, # The area of validity of transforms should strictly contain the area of interest
|
31
|
+
:PROJ_SPATIAL_CRITERION_PARTIAL_INTERSECTION] # The area of validity of transforms should at least intersect the area of interest
|
32
|
+
|
33
|
+
# Describe how grid availability is used
|
34
|
+
enum :PROJ_GRID_AVAILABILITY_USE, [:PROJ_GRID_AVAILABILITY_USE, # Grid availability is only used for sorting results. Operations where some grids are missing will be sorted last
|
35
|
+
:PROJ_GRID_AVAILABILITY_DISCARD_OPERATION_IF_MISSING_GRID, # Completely discard an operation if a required grid is missing
|
36
|
+
:PROJ_GRID_AVAILABILITY_IGNORED, # Ignore grid availability at all. Results will be presented as if all grids were available
|
37
|
+
:PROJ_GRID_AVAILABILITY_KNOWN_AVAILABLE] # Results will be presented as if grids known to PROJ (that is registered in the grid_alternatives table of its database) were available. Used typically when networking is enabled.
|
38
|
+
|
39
|
+
# Describe if and how intermediate CRS should be used
|
40
|
+
enum :PROJ_INTERMEDIATE_CRS_USE, [:PROJ_INTERMEDIATE_CRS_USE_ALWAYS, # Always search for intermediate CRS
|
41
|
+
:PROJ_INTERMEDIATE_CRS_USE_IF_NO_DIRECT_TRANSFORMATION, # Only attempt looking for intermediate CRS if there is no direct transformation available
|
42
|
+
:PROJ_INTERMEDIATE_CRS_USE_NEVER] # Do not attempt looking for intermediate CRS
|
43
|
+
|
44
|
+
attach_function :proj_create_operation_factory_context, [:PJ_CONTEXT, :string], :PJ_OBJ_LIST
|
45
|
+
attach_function :proj_operation_factory_context_destroy, [:pointer], :void
|
46
|
+
attach_function :proj_create_operations, [:PJ_CONTEXT, :PJ, :PJ, :pointer], :pointer
|
47
|
+
attach_function :proj_operation_factory_context_set_allow_ballpark_transformations, [:PJ_CONTEXT, :pointer, :int], :void
|
48
|
+
attach_function :proj_operation_factory_context_set_desired_accuracy, [:PJ_CONTEXT, :pointer, :double], :void
|
49
|
+
attach_function :proj_operation_factory_context_set_area_of_interest, [:PJ_CONTEXT, :pointer, :double, :double, :double, :double], :void
|
50
|
+
attach_function :proj_operation_factory_context_set_crs_extent_use, [:PJ_CONTEXT, :pointer, :PROJ_CRS_EXTENT_USE], :void
|
51
|
+
attach_function :proj_operation_factory_context_set_spatial_criterion, [:PJ_CONTEXT, :pointer, :PROJ_SPATIAL_CRITERION], :void
|
52
|
+
attach_function :proj_operation_factory_context_set_grid_availability_use, [:PJ_CONTEXT, :pointer, :PROJ_GRID_AVAILABILITY_USE], :void
|
53
|
+
attach_function :proj_operation_factory_context_set_use_proj_alternative_grid_names, [:PJ_CONTEXT, :pointer, :int], :void
|
54
|
+
attach_function :proj_operation_factory_context_set_allow_use_intermediate_crs, [:PJ_CONTEXT, :pointer, :PROJ_INTERMEDIATE_CRS_USE], :void
|
55
|
+
attach_function :proj_operation_factory_context_set_allowed_intermediate_crs, [:PJ_CONTEXT, :pointer, :pointer], :void
|
56
|
+
|
57
|
+
# Operations
|
58
|
+
attach_function :proj_coordoperation_has_ballpark_transformation, [:PJ_CONTEXT, :PJ], :int
|
59
|
+
attach_function :proj_get_suggested_operation, [:PJ_CONTEXT, :PJ_OBJ_LIST, PJ_DIRECTION, PJ_COORD], :int
|
60
|
+
attach_function :proj_coordoperation_get_param_count, [:PJ_CONTEXT, :PJ], :int
|
61
|
+
attach_function :proj_coordoperation_get_param_index, [:PJ_CONTEXT, :PJ, :string], :int
|
62
|
+
attach_function :proj_coordoperation_get_param, [:PJ_CONTEXT, :PJ, :int, :pointer, :pointer, :pointer,
|
63
|
+
:pointer, :pointer, :pointer, :pointer,:pointer, :pointer, :pointer], :int
|
64
|
+
attach_function :proj_coordoperation_is_instantiable, [:PJ_CONTEXT, :PJ], :int
|
65
|
+
attach_function :proj_coordoperation_get_grid_used_count, [:PJ_CONTEXT, :PJ], :int
|
66
|
+
attach_function :proj_coordoperation_get_grid_used, [:PJ_CONTEXT, :PJ, :int,
|
67
|
+
:pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int
|
68
|
+
|
69
|
+
# Network
|
70
|
+
attach_function :proj_context_get_url_endpoint, [:PJ_CONTEXT], :string
|
71
|
+
attach_function :proj_context_get_user_writable_directory, [:PJ_CONTEXT, :int], :string
|
72
|
+
end
|
73
|
+
end
|
data/lib/api/api_7_2.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
attach_function :proj_context_clone, [:PJ_CONTEXT], :PJ_CONTEXT
|
4
|
+
attach_function :proj_context_set_ca_bundle_path, [:PJ_CONTEXT, :string], :void
|
5
|
+
|
6
|
+
# Datum ensembles
|
7
|
+
attach_function :proj_crs_get_datum_ensemble, [:PJ_CONTEXT, :PJ], :PJ
|
8
|
+
attach_function :proj_crs_get_datum_forced, [:PJ_CONTEXT, :PJ], :PJ
|
9
|
+
attach_function :proj_datum_ensemble_get_member_count, [:PJ_CONTEXT, :PJ], :int
|
10
|
+
attach_function :proj_datum_ensemble_get_accuracy, [:PJ_CONTEXT, :PJ], :double
|
11
|
+
attach_function :proj_datum_ensemble_get_member, [:PJ_CONTEXT, :PJ, :int], :PJ
|
12
|
+
attach_function :proj_dynamic_datum_get_frame_reference_epoch, [:PJ_CONTEXT, :PJ], :double
|
13
|
+
end
|
14
|
+
end
|
data/lib/api/api_8_0.rb
ADDED
data/lib/api/api_8_1.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
# Stores a description of a celestial body.
|
4
|
+
class ProjCelestialBodyInfo < FFI::Struct
|
5
|
+
layout :auth_name, :string,
|
6
|
+
:name, :string
|
7
|
+
end
|
8
|
+
|
9
|
+
attach_function :proj_context_get_database_structure, [:PJ_CONTEXT, :pointer], :PROJ_STRING_LIST
|
10
|
+
attach_function :proj_get_geoid_models_from_database, [:PJ_CONTEXT, :string, :string, :pointer], :PROJ_STRING_LIST
|
11
|
+
attach_function :proj_suggests_code_for, [:PJ_CONTEXT, :PJ, :string, :int, :pointer], :pointer
|
12
|
+
attach_function :proj_string_destroy, [:pointer], :void
|
13
|
+
|
14
|
+
attach_function :proj_get_celestial_body_list_from_database, [:PJ_CONTEXT, :string, :pointer], :pointer
|
15
|
+
attach_function :proj_get_celestial_body_name, [:PJ_CONTEXT, :PJ], :string
|
16
|
+
attach_function :proj_celestial_body_list_destroy, [:pointer], :void
|
17
|
+
|
18
|
+
typedef :pointer, :PJ_INSERT_SESSION
|
19
|
+
attach_function :proj_insert_object_session_create, [:PJ_CONTEXT], :PJ_INSERT_SESSION
|
20
|
+
attach_function :proj_insert_object_session_destroy, [:PJ_CONTEXT, :PJ_INSERT_SESSION], :void
|
21
|
+
attach_function :proj_get_insert_statements, [:PJ_CONTEXT, :PJ_INSERT_SESSION, :PJ, :string, :string, :int,
|
22
|
+
:pointer , :pointer], :PROJ_STRING_LIST
|
23
|
+
end
|
24
|
+
end
|
data/lib/api/api_8_2.rb
ADDED
data/lib/api/api_9_1.rb
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
attach_function :proj_trans_get_last_used_operation, [:PJ], :PJ
|
4
|
+
attach_function :proj_operation_factory_context_set_area_of_interest_name, [:PJ_CONTEXT, :pointer, :string], :void
|
5
|
+
attach_function :proj_area_set_name, [:PJ_AREA, :string], :void
|
6
|
+
end
|
7
|
+
end
|
data/lib/api/api_9_2.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
attach_function :proj_rtodms2, [:pointer, :size_t, :double, :int, :int], :string
|
4
|
+
attach_function :proj_get_area_of_use_ex, [:PJ_CONTEXT, :PJ, :int, :pointer, :pointer, :pointer, :pointer, :pointer], :bool
|
5
|
+
attach_function :proj_get_domain_count, [:PJ], :int
|
6
|
+
attach_function :proj_get_scope_ex, [:PJ, :int], :string
|
7
|
+
attach_function :proj_coordinate_metadata_get_epoch, [:PJ_CONTEXT, :PJ], :double
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,196 @@
|
|
1
|
+
module Proj
|
2
|
+
module Api
|
3
|
+
if Api::PROJ_VERSION >= Gem::Version.new('6.0.0')
|
4
|
+
PJ_UNIT_TYPE = enum(:PJ_UT_ANGULAR,
|
5
|
+
:PJ_UT_LINEAR,
|
6
|
+
:PJ_UT_SCALE,
|
7
|
+
:PJ_UT_TIME)
|
8
|
+
|
9
|
+
PJ_CARTESIAN_CS_2D_TYPE = enum(:PJ_CART2D_EASTING_NORTHING,
|
10
|
+
:PJ_CART2D_NORTHING_EASTING,
|
11
|
+
:PJ_CART2D_NORTH_POLE_EASTING_SOUTH_NORTHING_SOUTH,
|
12
|
+
:PJ_CART2D_SOUTH_POLE_EASTING_NORTH_NORTHING_NORTH,
|
13
|
+
:PJ_CART2D_WESTING_SOUTHING)
|
14
|
+
|
15
|
+
PJ_ELLIPSOIDAL_CS_2D_TYPE = enum(:PJ_ELLPS2D_LONGITUDE_LATITUDE,
|
16
|
+
:PJ_ELLPS2D_LATITUDE_LONGITUDE)
|
17
|
+
|
18
|
+
class PJ_AXIS_DESCRIPTION < FFI::Struct
|
19
|
+
layout :name, :pointer,
|
20
|
+
:abbreviation, :pointer,
|
21
|
+
:direction, :pointer,
|
22
|
+
:unit_name, :pointer,
|
23
|
+
:unit_conv_factor, :double,
|
24
|
+
:unit_type, PJ_UNIT_TYPE
|
25
|
+
|
26
|
+
def self.create(name:, abbreviation:, direction:, unit_name:, unit_conv_factor:, unit_type:)
|
27
|
+
result = PJ_AXIS_DESCRIPTION.new
|
28
|
+
result[:name] = FFI::MemoryPointer.from_string(name)
|
29
|
+
result[:abbreviation] = FFI::MemoryPointer.from_string(abbreviation)
|
30
|
+
result[:direction] = FFI::MemoryPointer.from_string(direction)
|
31
|
+
result[:unit_name] = FFI::MemoryPointer.from_string(unit_name)
|
32
|
+
result[:unit_conv_factor] = unit_conv_factor
|
33
|
+
result[:unit_type] = unit_type
|
34
|
+
result
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
class PJ_PARAM_DESCRIPTION < FFI::Struct
|
39
|
+
layout :name, :pointer,
|
40
|
+
:auth_name, :pointer,
|
41
|
+
:code, :pointer,
|
42
|
+
:value, :double,
|
43
|
+
:unit_name, :pointer,
|
44
|
+
:unit_conv_factor, :double,
|
45
|
+
:unit_type, PJ_UNIT_TYPE
|
46
|
+
|
47
|
+
def self.create(name:, auth_name: nil, code: nil, value:, unit_name: nil, unit_conv_factor:, unit_type:)
|
48
|
+
result = PJ_PARAM_DESCRIPTION.new
|
49
|
+
result[:name] = FFI::MemoryPointer.from_string(name)
|
50
|
+
result[:auth_name] = auth_name ? FFI::MemoryPointer.from_string(auth_name) : nil
|
51
|
+
result[:code] = code ? FFI::MemoryPointer.from_string(code) : nil
|
52
|
+
result[:value] = value
|
53
|
+
result[:unit_name] = unit_name ? FFI::MemoryPointer.from_string(unit_name) : nil
|
54
|
+
result[:unit_conv_factor] = unit_conv_factor
|
55
|
+
result[:unit_type] = unit_type
|
56
|
+
result
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Create coordinate systems
|
61
|
+
attach_function :proj_create_cs, [:PJ_CONTEXT, PJ_COORDINATE_SYSTEM_TYPE, :int, :pointer], :PJ
|
62
|
+
attach_function :proj_create_cartesian_2D_cs, [:PJ_CONTEXT, PJ_CARTESIAN_CS_2D_TYPE, :string, :double], :PJ
|
63
|
+
attach_function :proj_create_ellipsoidal_2D_cs, [:PJ_CONTEXT, PJ_ELLIPSOIDAL_CS_2D_TYPE, :string, :double], :PJ
|
64
|
+
|
65
|
+
# Create CRSes
|
66
|
+
attach_function :proj_create_geographic_crs, [:PJ_CONTEXT, :string, :string, :string, :double, :double, :string, :double, :string, :double, :PJ], :PJ
|
67
|
+
attach_function :proj_create_geocentric_crs, [:PJ_CONTEXT, :string, :string, :string, :double, :double, :string, :double, :string, :double, :string, :double], :PJ
|
68
|
+
attach_function :proj_crs_alter_geodetic_crs, [:PJ_CONTEXT, :PJ, :PJ], :PJ
|
69
|
+
attach_function :proj_crs_alter_cs_angular_unit, [:PJ_CONTEXT, :PJ, :string, :double, :string, :string], :PJ
|
70
|
+
attach_function :proj_crs_alter_cs_linear_unit, [:PJ_CONTEXT, :PJ, :string, :double, :string, :string], :PJ
|
71
|
+
attach_function :proj_crs_alter_parameters_linear_unit, [:PJ_CONTEXT, :PJ, :string, :double, :string, :string, :int], :PJ
|
72
|
+
attach_function :proj_create_engineering_crs, [:PJ_CONTEXT, :string], :PJ
|
73
|
+
attach_function :proj_create_vertical_crs, [:PJ_CONTEXT, :string, :string, :string, :double], :PJ
|
74
|
+
attach_function :proj_create_compound_crs, [:PJ_CONTEXT, :string, :PJ, :PJ], :PJ
|
75
|
+
attach_function :proj_create_projected_crs, [:PJ_CONTEXT, :string, :PJ, :PJ, :PJ], :PJ
|
76
|
+
attach_function :proj_crs_create_bound_crs, [:PJ_CONTEXT, :PJ, :PJ, :PJ], :PJ
|
77
|
+
attach_function :proj_crs_create_bound_crs_to_WGS84, [:PJ_CONTEXT, :PJ, :pointer], :PJ
|
78
|
+
|
79
|
+
# Modify CRS
|
80
|
+
attach_function :proj_alter_name, [:PJ_CONTEXT, :PJ, :string], :PJ
|
81
|
+
attach_function :proj_alter_id, [:PJ_CONTEXT, :PJ, :string, :string], :PJ
|
82
|
+
|
83
|
+
# Transformation
|
84
|
+
attach_function :proj_create_transformation, [:PJ_CONTEXT, :string, :string, :string, :PJ, :PJ, :PJ, :string, :string, :string, :int, :pointer, :double], :PJ
|
85
|
+
|
86
|
+
# Conversion
|
87
|
+
attach_function :proj_create_conversion, [:PJ_CONTEXT, :string, :string, :string, :string, :string, :string, :int, :pointer], :PJ
|
88
|
+
attach_function :proj_convert_conversion_to_other_method, [:PJ_CONTEXT, :PJ, :int, :string], :PJ
|
89
|
+
|
90
|
+
# Projections
|
91
|
+
attach_function :proj_create_conversion_utm, [:PJ_CONTEXT, :int, :int], :PJ
|
92
|
+
attach_function :proj_create_conversion_transverse_mercator, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
93
|
+
attach_function :proj_create_conversion_gauss_schreiber_transverse_mercator, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
94
|
+
attach_function :proj_create_conversion_transverse_mercator_south_oriented, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
95
|
+
attach_function :proj_create_conversion_two_point_equidistant, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
96
|
+
attach_function :proj_create_conversion_albers_equal_area, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
97
|
+
attach_function :proj_create_conversion_lambert_conic_conformal_1sp, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
98
|
+
attach_function :proj_create_conversion_lambert_conic_conformal_2sp, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
99
|
+
attach_function :proj_create_conversion_lambert_conic_conformal_2sp_michigan, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
100
|
+
attach_function :proj_create_conversion_lambert_conic_conformal_2sp_belgium, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
101
|
+
attach_function :proj_create_conversion_azimuthal_equidistant, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
102
|
+
attach_function :proj_create_conversion_guam_projection, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
103
|
+
attach_function :proj_create_conversion_bonne, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
104
|
+
attach_function :proj_create_conversion_lambert_cylindrical_equal_area_spherical, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
105
|
+
attach_function :proj_create_conversion_lambert_cylindrical_equal_area, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
106
|
+
attach_function :proj_create_conversion_cassini_soldner, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
107
|
+
attach_function :proj_create_conversion_equidistant_conic, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
108
|
+
attach_function :proj_create_conversion_eckert_i, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
109
|
+
attach_function :proj_create_conversion_eckert_ii, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
110
|
+
attach_function :proj_create_conversion_eckert_iii, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
111
|
+
attach_function :proj_create_conversion_eckert_iv, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
112
|
+
attach_function :proj_create_conversion_eckert_v, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
113
|
+
attach_function :proj_create_conversion_eckert_vi, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
114
|
+
attach_function :proj_create_conversion_equidistant_cylindrical, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
115
|
+
attach_function :proj_create_conversion_equidistant_cylindrical_spherical, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
116
|
+
attach_function :proj_create_conversion_gall, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
117
|
+
attach_function :proj_create_conversion_goode_homolosine, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
118
|
+
attach_function :proj_create_conversion_interrupted_goode_homolosine, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
119
|
+
attach_function :proj_create_conversion_geostationary_satellite_sweep_x, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
120
|
+
attach_function :proj_create_conversion_geostationary_satellite_sweep_y, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
121
|
+
attach_function :proj_create_conversion_gnomonic, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
122
|
+
attach_function :proj_create_conversion_hotine_oblique_mercator_variant_a, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
123
|
+
attach_function :proj_create_conversion_hotine_oblique_mercator_variant_b, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
124
|
+
attach_function :proj_create_conversion_hotine_oblique_mercator_two_point_natural_origin, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
125
|
+
attach_function :proj_create_conversion_laborde_oblique_mercator, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
126
|
+
attach_function :proj_create_conversion_international_map_world_polyconic, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
127
|
+
attach_function :proj_create_conversion_krovak_north_oriented, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
128
|
+
attach_function :proj_create_conversion_krovak, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
129
|
+
attach_function :proj_create_conversion_lambert_azimuthal_equal_area, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
130
|
+
attach_function :proj_create_conversion_miller_cylindrical, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
131
|
+
attach_function :proj_create_conversion_mercator_variant_a, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
132
|
+
attach_function :proj_create_conversion_mercator_variant_b, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
133
|
+
attach_function :proj_create_conversion_popular_visualisation_pseudo_mercator, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
134
|
+
attach_function :proj_create_conversion_mollweide, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
135
|
+
attach_function :proj_create_conversion_new_zealand_mapping_grid, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
136
|
+
attach_function :proj_create_conversion_oblique_stereographic, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
137
|
+
attach_function :proj_create_conversion_orthographic, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
138
|
+
attach_function :proj_create_conversion_american_polyconic, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
139
|
+
attach_function :proj_create_conversion_polar_stereographic_variant_a, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
140
|
+
attach_function :proj_create_conversion_polar_stereographic_variant_b, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
141
|
+
attach_function :proj_create_conversion_robinson, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
142
|
+
attach_function :proj_create_conversion_sinusoidal, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
143
|
+
attach_function :proj_create_conversion_stereographic, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
144
|
+
attach_function :proj_create_conversion_van_der_grinten, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
145
|
+
attach_function :proj_create_conversion_wagner_i, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
146
|
+
attach_function :proj_create_conversion_wagner_ii, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
147
|
+
attach_function :proj_create_conversion_wagner_iii, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
148
|
+
attach_function :proj_create_conversion_wagner_iv, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
149
|
+
attach_function :proj_create_conversion_wagner_v, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
150
|
+
attach_function :proj_create_conversion_wagner_vi, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
151
|
+
attach_function :proj_create_conversion_wagner_vii, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
152
|
+
attach_function :proj_create_conversion_quadrilateralized_spherical_cube, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
153
|
+
attach_function :proj_create_conversion_spherical_cross_track_height, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
154
|
+
attach_function :proj_create_conversion_equal_earth, [:PJ_CONTEXT, :double, :double, :double, :string, :double, :string, :double], :PJ
|
155
|
+
attach_function :proj_query_geodetic_crs_from_datum, [:PJ_CONTEXT, :string, :string, :string, :string], :PJ_OBJ_LIST
|
156
|
+
end
|
157
|
+
|
158
|
+
if Api::PROJ_VERSION >= Gem::Version.new('6.3.0')
|
159
|
+
PJ_ELLIPSOIDAL_CS_3D_TYPE = enum(:PJ_ELLPS3D_LONGITUDE_LATITUDE_HEIGHT,
|
160
|
+
:PJ_ELLPS3D_LATITUDE_LONGITUDE_HEIGHT)
|
161
|
+
|
162
|
+
# Coordinate System
|
163
|
+
attach_function :proj_create_ellipsoidal_3D_cs, [:PJ_CONTEXT, PJ_ELLIPSOIDAL_CS_3D_TYPE, :string, :double, :string, :double], :PJ
|
164
|
+
|
165
|
+
# CRS
|
166
|
+
attach_function :proj_create_derived_geographic_crs, [:PJ_CONTEXT, :string, :PJ, :PJ, :PJ], :PJ
|
167
|
+
attach_function :proj_is_derived_crs, [:PJ_CONTEXT, :PJ], :int
|
168
|
+
attach_function :proj_crs_promote_to_3D, [:PJ_CONTEXT, :string, :PJ], :PJ
|
169
|
+
attach_function :proj_crs_create_projected_3D_crs_from_2D, [:PJ_CONTEXT, :string, :PJ, :PJ], :PJ
|
170
|
+
attach_function :proj_crs_demote_to_2D, [:PJ_CONTEXT, :string, :PJ], :PJ
|
171
|
+
attach_function :proj_create_vertical_crs_ex, [:PJ_CONTEXT, :string, :string, :string, :string, :string, :double, :string, :string, :string, :PJ, :pointer], :PJ
|
172
|
+
attach_function :proj_crs_create_bound_vertical_crs, [:PJ_CONTEXT, :PJ, :PJ, :string], :PJ
|
173
|
+
|
174
|
+
# Projections
|
175
|
+
attach_function :proj_create_conversion_vertical_perspective, [:PJ_CONTEXT, :double, :double, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
176
|
+
attach_function :proj_create_conversion_pole_rotation_grib_convention, [:PJ_CONTEXT, :double, :double, :double, :string, :double], :PJ
|
177
|
+
end
|
178
|
+
|
179
|
+
if Api::PROJ_VERSION >= Gem::Version.new('7.2.0')
|
180
|
+
# CRS
|
181
|
+
attach_function :proj_create_geographic_crs_from_datum, [:PJ_CONTEXT, :string, :PJ, :PJ], :PJ
|
182
|
+
attach_function :proj_create_geocentric_crs_from_datum, [:PJ_CONTEXT, :string, :PJ, :string, :double], :PJ
|
183
|
+
end
|
184
|
+
|
185
|
+
if Api::PROJ_VERSION >= Gem::Version.new('8.2.0')
|
186
|
+
# Projection
|
187
|
+
attach_function :proj_create_conversion_pole_rotation_netcdf_cf_convention, [:PJ_CONTEXT, :double, :double, :double, :string, :double], :PJ
|
188
|
+
end
|
189
|
+
|
190
|
+
if Api::PROJ_VERSION >= Gem::Version.new('9.2.0')
|
191
|
+
# Projection
|
192
|
+
attach_function :proj_create_conversion_tunisia_mining_grid, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
193
|
+
attach_function :proj_create_conversion_tunisia_mapping_grid, [:PJ_CONTEXT, :double, :double, :double, :double, :string, :double, :string, :double], :PJ
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|