11module Proj
22 module Api
3- PROJ_VERSION_MAJOR = 9
4- PROJ_VERSION_MINOR = 6
5- PROJ_VERSION_PATCH = 2
6- # libclang cannot evaluate macro expressions, so ruby-bindgen cannot emit this computed constant.
7- # Must be added manually after each regeneration.
8- PROJ_VERSION_NUMBER = PROJ_VERSION_MAJOR * 10000 + PROJ_VERSION_MINOR * 100 + PROJ_VERSION_PATCH
9- PJ_DEFAULT_CTX = 0
10- PROJ_ERR_INVALID_OP = 1024
11- PROJ_ERR_COORD_TRANSFM = 2048
12- PROJ_ERR_OTHER = 4096
133 attach_variable :PjRelease , :pj_release , :string
144 typedef :pointer , :PjArea
155
@@ -144,17 +134,6 @@ class PjCoord < FFI::Union
144134 :lp , PjLp
145135 end
146136
147- class PjInfo < FFI ::Struct
148- layout :major , :int ,
149- :minor , :int ,
150- :patch , :int ,
151- :release , :string ,
152- :version , :string ,
153- :searchpath , :string ,
154- :paths , :pointer ,
155- :path_count , :ulong
156- end
157-
158137 class PjProjInfo < FFI ::Struct
159138 layout :id , :string ,
160139 :description , :string ,
@@ -265,7 +244,6 @@ class ProjFileApi < FFI::Struct
265244 attach_function :proj_errno_reset , :proj_errno_reset , [ :pointer ] , :int
266245 attach_function :proj_errno_restore , :proj_errno_restore , [ :pointer , :int ] , :int
267246 attach_function :proj_factors , :proj_factors , [ :pointer , PjCoord . by_value ] , P5Factors . by_value
268- attach_function :proj_info , :proj_info , [ ] , PjInfo . by_value
269247 attach_function :proj_pj_info , :proj_pj_info , [ :pointer ] , PjProjInfo . by_value
270248 attach_function :proj_grid_info , :proj_grid_info , [ :string ] , PjGridInfo . by_value
271249 attach_function :proj_init_info , :proj_init_info , [ :string ] , PjInitInfo . by_value
@@ -491,12 +469,12 @@ class PjParamDescription < FFI::Struct
491469 attach_function :proj_create_cs , :proj_create_cs , [ :pointer , PjCoordinateSystemType , :int , :pointer ] , :pointer
492470 attach_function :proj_create_conversion , :proj_create_conversion , [ :pointer , :string , :string , :string , :string , :string , :string , :int , :pointer ] , :pointer
493471 attach_function :proj_create_transformation , :proj_create_transformation , [ :pointer , :string , :string , :string , :pointer , :pointer , :pointer , :string , :string , :string , :int , :pointer , :double ] , :pointer
494- if PROJ_VERSION_NUMBER >= 50100
472+ if proj_version >= 50100
495473 attach_function :proj_errno_string , :proj_errno_string , [ :int ] , :string
496474 attach_function :proj_log_level , :proj_log_level , [ :pointer , PjLogLevel ] , PjLogLevel
497475 attach_function :proj_log_func , :proj_log_func , [ :pointer , :pointer , :pj_log_function ] , :void
498476 end
499- if PROJ_VERSION_NUMBER >= 60000
477+ if proj_version >= 60000
500478 attach_function :proj_context_set_file_finder , :proj_context_set_file_finder , [ :pointer , :proj_file_finder , :pointer ] , :void
501479 attach_function :proj_context_set_search_paths , :proj_context_set_search_paths , [ :pointer , :int , :pointer ] , :void
502480 attach_function :proj_context_use_proj4_init_rules , :proj_context_use_proj4_init_rules , [ :pointer , :int ] , :void
@@ -656,10 +634,10 @@ class PjParamDescription < FFI::Struct
656634 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
657635 attach_function :proj_create_conversion_equal_earth , :proj_create_conversion_equal_earth , [ :pointer , :double , :double , :double , :string , :double , :string , :double ] , :pointer
658636 end
659- if PROJ_VERSION_NUMBER >= 60100
637+ if proj_version >= 60100
660638 attach_function :proj_normalize_for_visualization , :proj_normalize_for_visualization , [ :pointer , :pointer ] , :pointer
661639 end
662- if PROJ_VERSION_NUMBER >= 60200
640+ if proj_version >= 60200
663641 attach_function :proj_create_crs_to_crs_from_pj , :proj_create_crs_to_crs_from_pj , [ :pointer , :pointer , :pointer , :pointer , :pointer ] , :pointer
664642 attach_function :proj_cleanup , :proj_cleanup , [ ] , :void
665643 attach_function :proj_context_set_autoclose_database , :proj_context_set_autoclose_database , [ :pointer , :int ] , :void
@@ -671,7 +649,7 @@ class PjParamDescription < FFI::Struct
671649 attach_function :proj_concatoperation_get_step_count , :proj_concatoperation_get_step_count , [ :pointer , :pointer ] , :int
672650 attach_function :proj_concatoperation_get_step , :proj_concatoperation_get_step , [ :pointer , :pointer , :int ] , :pointer
673651 end
674- if PROJ_VERSION_NUMBER >= 60300
652+ if proj_version >= 60300
675653 attach_function :proj_is_equivalent_to_with_ctx , :proj_is_equivalent_to_with_ctx , [ :pointer , :pointer , :pointer , PjComparisonCriterion ] , :int
676654 attach_function :proj_coordoperation_create_inverse , :proj_coordoperation_create_inverse , [ :pointer , :pointer ] , :pointer
677655 attach_function :proj_create_ellipsoidal_3d_cs , :proj_create_ellipsoidal_3D_cs , [ :pointer , PjEllipsoidalCs3dType , :string , :double , :string , :double ] , :pointer
@@ -685,7 +663,7 @@ class PjParamDescription < FFI::Struct
685663 attach_function :proj_create_conversion_vertical_perspective , :proj_create_conversion_vertical_perspective , [ :pointer , :double , :double , :double , :double , :double , :double , :string , :double , :string , :double ] , :pointer
686664 attach_function :proj_create_conversion_pole_rotation_grib_convention , :proj_create_conversion_pole_rotation_grib_convention , [ :pointer , :double , :double , :double , :string , :double ] , :pointer
687665 end
688- if PROJ_VERSION_NUMBER >= 70000
666+ if proj_version >= 70000
689667 attach_function :proj_context_set_fileapi , :proj_context_set_fileapi , [ :pointer , ProjFileApi . by_ref , :pointer ] , :int
690668 attach_function :proj_context_set_sqlite3_vfs_name , :proj_context_set_sqlite3_vfs_name , [ :pointer , :string ] , :void
691669 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
@@ -701,7 +679,7 @@ class PjParamDescription < FFI::Struct
701679 callback :proj_download_file_progress_cbk_callback , [ :pointer , :double , :pointer ] , :int
702680 attach_function :proj_download_file , :proj_download_file , [ :pointer , :string , :int , :proj_download_file_progress_cbk_callback , :pointer ] , :int
703681 end
704- if PROJ_VERSION_NUMBER >= 70100
682+ if proj_version >= 70100
705683 attach_function :proj_context_get_url_endpoint , :proj_context_get_url_endpoint , [ :pointer ] , :string
706684 attach_function :proj_context_get_user_writable_directory , :proj_context_get_user_writable_directory , [ :pointer , :int ] , :string
707685 attach_function :proj_degree_input , :proj_degree_input , [ :pointer , PjDirection ] , :int
@@ -711,7 +689,7 @@ class PjParamDescription < FFI::Struct
711689 attach_function :proj_operation_factory_context_set_allow_ballpark_transformations , :proj_operation_factory_context_set_allow_ballpark_transformations , [ :pointer , :pointer , :int ] , :void
712690 attach_function :proj_get_suggested_operation , :proj_get_suggested_operation , [ :pointer , :pointer , PjDirection , PjCoord . by_value ] , :int
713691 end
714- if PROJ_VERSION_NUMBER >= 70200
692+ if proj_version >= 70200
715693 attach_function :proj_context_clone , :proj_context_clone , [ :pointer ] , :pointer
716694 attach_function :proj_context_set_ca_bundle_path , :proj_context_set_ca_bundle_path , [ :pointer , :string ] , :void
717695 attach_function :proj_crs_get_datum_ensemble , :proj_crs_get_datum_ensemble , [ :pointer , :pointer ] , :pointer
@@ -721,11 +699,11 @@ class PjParamDescription < FFI::Struct
721699 attach_function :proj_datum_ensemble_get_member , :proj_datum_ensemble_get_member , [ :pointer , :pointer , :int ] , :pointer
722700 attach_function :proj_dynamic_datum_get_frame_reference_epoch , :proj_dynamic_datum_get_frame_reference_epoch , [ :pointer , :pointer ] , :double
723701 end
724- if PROJ_VERSION_NUMBER >= 80000
702+ if proj_version >= 80000
725703 attach_function :proj_context_errno_string , :proj_context_errno_string , [ :pointer , :int ] , :string
726704 attach_function :proj_crs_is_derived , :proj_crs_is_derived , [ :pointer , :pointer ] , :int
727705 end
728- if PROJ_VERSION_NUMBER >= 80100
706+ if proj_version >= 80100
729707 attach_function :proj_context_get_database_structure , :proj_context_get_database_structure , [ :pointer , :pointer ] , :pointer
730708 attach_function :proj_get_geoid_models_from_database , :proj_get_geoid_models_from_database , [ :pointer , :string , :string , :pointer ] , :pointer
731709 attach_function :proj_get_celestial_body_list_from_database , :proj_get_celestial_body_list_from_database , [ :pointer , :string , :pointer ] , :pointer
@@ -735,32 +713,32 @@ class PjParamDescription < FFI::Struct
735713 attach_function :proj_get_insert_statements , :proj_get_insert_statements , [ :pointer , :pointer , :pointer , :string , :string , :int , :pointer , :pointer ] , :pointer
736714 attach_function :proj_get_celestial_body_name , :proj_get_celestial_body_name , [ :pointer , :pointer ] , :string
737715 end
738- if PROJ_VERSION_NUMBER >= 80200
716+ if proj_version >= 80200
739717 attach_function :proj_trans_bounds , :proj_trans_bounds , [ :pointer , :pointer , PjDirection , :double , :double , :double , :double , :pointer , :pointer , :pointer , :pointer , :int ] , :int
740718 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
741719 end
742- if PROJ_VERSION_NUMBER >= 90100
720+ if proj_version >= 90100
743721 attach_function :proj_area_set_name , :proj_area_set_name , [ :pointer , :string ] , :void
744722 attach_function :proj_trans_get_last_used_operation , :proj_trans_get_last_used_operation , [ :pointer ] , :pointer
745723 attach_function :proj_operation_factory_context_set_area_of_interest_name , :proj_operation_factory_context_set_area_of_interest_name , [ :pointer , :pointer , :string ] , :void
746724 end
747- if PROJ_VERSION_NUMBER >= 90200
725+ if proj_version >= 90200
748726 attach_function :proj_get_domain_count , :proj_get_domain_count , [ :pointer ] , :int
749727 attach_function :proj_get_scope_ex , :proj_get_scope_ex , [ :pointer , :int ] , :string
750728 attach_function :proj_coordinate_metadata_get_epoch , :proj_coordinate_metadata_get_epoch , [ :pointer , :pointer ] , :double
751729 attach_function :proj_create_conversion_tunisia_mining_grid , :proj_create_conversion_tunisia_mining_grid , [ :pointer , :double , :double , :double , :double , :string , :double , :string , :double ] , :pointer
752730 end
753- if PROJ_VERSION_NUMBER >= 90400
731+ if proj_version >= 90400
754732 attach_function :proj_crs_has_point_motion_operation , :proj_crs_has_point_motion_operation , [ :pointer , :pointer ] , :int
755733 attach_function :proj_coordinate_metadata_create , :proj_coordinate_metadata_create , [ :pointer , :pointer , :double ] , :pointer
756734 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
757735 end
758- if PROJ_VERSION_NUMBER >= 90500
736+ if proj_version >= 90500
759737 attach_function :proj_context_set_user_writable_directory , :proj_context_set_user_writable_directory , [ :pointer , :string , :int ] , :void
760738 attach_function :proj_coordoperation_requires_per_coordinate_input_time , :proj_coordoperation_requires_per_coordinate_input_time , [ :pointer , :pointer ] , :int
761739 attach_function :proj_create_conversion_local_orthographic , :proj_create_conversion_local_orthographic , [ :pointer , :double , :double , :double , :double , :double , :double , :string , :double , :string , :double ] , :pointer
762740 end
763- if PROJ_VERSION_NUMBER >= 90600
741+ if proj_version >= 90600
764742 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
765743 end
766744 end
0 commit comments