proj4rb 4.1.1 → 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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +98 -0
- data/Gemfile +4 -4
- data/README.md +53 -0
- data/lib/api/proj.rb +750 -0
- data/lib/api/proj_experimental.rb +7 -0
- data/lib/api/proj_ffi.rb +47 -0
- data/lib/api/proj_version.rb +26 -0
- data/lib/examples/axis_order_normalization.rb +13 -0
- data/lib/examples/batch_transformation.rb +25 -0
- data/lib/examples/context_logging.rb +26 -0
- data/lib/examples/crs_identification.rb +18 -0
- data/lib/examples/database_query.rb +27 -0
- data/lib/examples/geodetic_distance.rb +38 -0
- data/lib/examples/geodetic_to_projected.rb +18 -0
- data/lib/examples/operation_factory_context.rb +19 -0
- data/lib/examples/pipeline_operator.rb +21 -0
- data/lib/examples/promote_demote_3d.rb +23 -0
- data/lib/examples/serialization_formats.rb +17 -0
- data/lib/examples/transform_bounds.rb +18 -0
- data/lib/examples/transformation_with_area.rb +18 -0
- data/lib/proj/area.rb +74 -74
- data/lib/proj/axis_info.rb +44 -44
- data/lib/proj/bounds.rb +22 -0
- data/lib/proj/bounds3d.rb +45 -0
- data/lib/proj/context.rb +57 -23
- data/lib/proj/conversion.rb +94 -91
- data/lib/proj/coordinate.rb +304 -281
- data/lib/proj/coordinate_metadata.rb +38 -38
- data/lib/proj/coordinate_operation_mixin.rb +464 -381
- data/lib/proj/coordinate_system.rb +143 -137
- data/lib/proj/crs.rb +688 -680
- data/lib/proj/crs_info.rb +47 -47
- data/lib/proj/database.rb +310 -305
- data/lib/proj/datum.rb +32 -32
- data/lib/proj/datum_ensemble.rb +34 -34
- data/lib/proj/domain.rb +82 -0
- data/lib/proj/ellipsoid.rb +77 -77
- data/lib/proj/error.rb +7 -8
- data/lib/proj/file_api_callbacks.rb +165 -0
- data/lib/proj/grid.rb +121 -121
- data/lib/proj/grid_cache.rb +65 -64
- data/lib/proj/grid_info.rb +19 -19
- data/lib/proj/life_span.rb +21 -0
- data/lib/proj/network_api_callbacks.rb +86 -0
- data/lib/proj/operation.rb +66 -42
- data/lib/proj/operation_factory_context.rb +4 -2
- data/lib/proj/options.rb +41 -0
- data/lib/proj/parameter.rb +37 -37
- data/lib/proj/parameters.rb +106 -107
- data/lib/proj/pj_axis_description.rb +26 -0
- data/lib/proj/pj_object.rb +602 -672
- data/lib/proj/pj_objects.rb +45 -45
- data/lib/proj/pj_param_description.rb +28 -0
- data/lib/proj/prime_meridian.rb +65 -65
- data/lib/proj/projection.rb +54 -25
- data/lib/proj/session.rb +2 -0
- data/lib/proj/transformation.rb +102 -102
- data/lib/proj/unit.rb +81 -108
- data/lib/proj.rb +10 -3
- data/lib/proj4.rb +5 -5
- data/proj4rb.gemspec +10 -5
- data/test/abstract_test.rb +7 -5
- data/test/context_test.rb +210 -172
- data/test/context_validation_test.rb +11 -0
- data/test/conversion_test.rb +376 -368
- data/test/coordinate_metadata_test.rb +34 -0
- data/test/coordinate_system_test.rb +162 -144
- data/test/coordinate_test.rb +289 -34
- data/test/crs_test.rb +1112 -1082
- data/test/database_test.rb +407 -391
- data/test/datum_ensemble_test.rb +64 -64
- data/test/datum_test.rb +61 -54
- data/test/domain_test.rb +72 -0
- data/test/ellipsoid_test.rb +80 -80
- data/test/examples_test.rb +149 -0
- data/test/file_api_example.rb +58 -0
- data/test/file_api_test.rb +74 -66
- data/test/grid_cache_test.rb +72 -72
- data/test/grid_test.rb +126 -141
- data/test/network_api_example.rb +48 -0
- data/test/network_api_test.rb +33 -45
- data/test/operation_factory_context_test.rb +225 -205
- data/test/operation_test.rb +40 -29
- data/test/options_test.rb +17 -0
- data/test/parameters_test.rb +86 -40
- data/test/pj_object_test.rb +221 -187
- data/test/prime_meridian_test.rb +75 -75
- data/test/proj_test.rb +58 -58
- data/test/projection_test.rb +680 -650
- data/test/session_test.rb +78 -77
- data/test/transformation_test.rb +238 -210
- data/test/unit_test.rb +114 -76
- metadata +44 -32
- data/ChangeLog +0 -94
- data/README.rdoc +0 -189
- data/lib/api/api.rb +0 -117
- data/lib/api/api_5_0.rb +0 -338
- data/lib/api/api_5_1.rb +0 -7
- data/lib/api/api_5_2.rb +0 -5
- data/lib/api/api_6_0.rb +0 -146
- data/lib/api/api_6_1.rb +0 -5
- data/lib/api/api_6_2.rb +0 -10
- data/lib/api/api_6_3.rb +0 -6
- data/lib/api/api_7_0.rb +0 -69
- data/lib/api/api_7_1.rb +0 -73
- data/lib/api/api_7_2.rb +0 -14
- data/lib/api/api_8_0.rb +0 -6
- data/lib/api/api_8_1.rb +0 -24
- data/lib/api/api_8_2.rb +0 -6
- data/lib/api/api_9_1.rb +0 -7
- data/lib/api/api_9_2.rb +0 -9
- data/lib/api/api_9_4.rb +0 -6
- data/lib/api/api_experimental.rb +0 -201
- data/lib/proj/file_api.rb +0 -166
- data/lib/proj/network_api.rb +0 -92
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9f3ec7d85f489dc9b519de25df692d58e30428b4e464a7c1f8f2df8028ee0ab
|
|
4
|
+
data.tar.gz: f4d5d5556a0d40e4226a5c81cee261978da49de5da85a2112f828ab2dbfa9608
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 656035d12c0ea84e95e771f6129701e70181e665c7c83a2ba4fee18ab39e77d821c6ff0e41e5149d9193fc9cfaf82f112c09b10abebe1a6929f1515b7e14d235
|
|
7
|
+
data.tar.gz: fa045be9e342f828ff2e6b8e245d13ed0b6eb9cbbcaaf60c64b0dbfe11bc38841f6bd8862f8c946013cb8649150a7772e1f32900eaefa2df8e670d1072a06f20
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 5.0.0 - March 29, 2026
|
|
4
|
+
* Switch to auto-generated FFI bindings via [ruby-bindgen](https://github.com/cfis/ruby-bindgen)
|
|
5
|
+
* Add support for PROJ 9.4 API `proj_crs_has_point_motion_operation`
|
|
6
|
+
* Add support for PROJ 9.5 APIs: `proj_context_set_user_writable_directory`, `proj_coordoperation_requires_per_coordinate_input_time`, and `proj_create_conversion_local_orthographic`
|
|
7
|
+
* Add support for PROJ 9.6 APIs: `proj_trans_bounds_3D`
|
|
8
|
+
* Add support for PROJ 9.7 APIs: `proj_geod_direct`
|
|
9
|
+
* Add `Domain` class to support multiple usage domains per object (PROJ 9.2+ via `proj_get_domain_count`, `proj_get_scope_ex`, `proj_get_area_of_use_ex`; falls back to legacy APIs on older versions)
|
|
10
|
+
* Add 3D bounds support (`Bounds3d` + `transform_bounds_3d`) for PROJ 9.6 `proj_trans_bounds_3D`
|
|
11
|
+
* Fix manual wrapper argument order for `proj_create_conversion_lambert_conic_conformal_1sp_variant_b` (9.4)
|
|
12
|
+
* Fix `Parameter#to_description` passing parameter name instead of unit name
|
|
13
|
+
* Fix pointer lifetime issues in `Parameters#types=`, `PjAxisDescription`, and `PjParamDescription`
|
|
14
|
+
* Fix GC lifetime bugs: option string pointers, `CoordinateSystem.create` axis descriptions, and missing `require 'uri'`
|
|
15
|
+
* Fix context/state lifetime issues in `OperationFactoryContext` and `Context#set_log_function`
|
|
16
|
+
* Expand regression tests for lifecycle safety and new PROJ 9.4/9.5/9.6 wrappers
|
|
17
|
+
* `Unit.built_in` now returns all unit types (91 units) instead of only linear units (24 units)
|
|
18
|
+
* Internal: struct and enum types use Ruby naming conventions (e.g., `PjCoord` instead of `PJ_COORD`)
|
|
19
|
+
* Remove deprecated `Context#database_path` and `Context#database_path=` (use `context.database.path` instead)
|
|
20
|
+
* Internal: method names use Ruby naming conventions (e.g., `proj_create_ellipsoidal_2d_cs` instead of `proj_create_ellipsoidal_2D_cs`)
|
|
21
|
+
* Update to FFI 1.17.4 to fix bug on Mac ARM64
|
|
22
|
+
|
|
23
|
+
## 4.1.1 - January 30, 2024
|
|
24
|
+
* Update tests for Proj 9.3
|
|
25
|
+
* Initial support for CoordinateMetadata in Proj 9.4 (not released yet)
|
|
26
|
+
|
|
27
|
+
## 4.1.0 - March 12, 2023
|
|
28
|
+
* Fix YARD warnings
|
|
29
|
+
* Fix YARD types to match RBS types
|
|
30
|
+
* Don't use type as attribute or method name to avoid conflicts with RBS
|
|
31
|
+
|
|
32
|
+
## 4.0.0 - March 12, 2023
|
|
33
|
+
* Support Proj 9
|
|
34
|
+
* Add support for missing APIs - the gem now provides almost 100% coverage
|
|
35
|
+
* Add support for Proj experimental APIs including the creation of projection conversions
|
|
36
|
+
* Add/updated support for a number of ISO 19111 classes, including PrimeMeridian, Ellipsoid, Datum, DatumEnsemble, CoordinateOperation and Parameters
|
|
37
|
+
* Greatly improved documentation (https://rubydoc.info/github/cfis/proj4rb)
|
|
38
|
+
* Remove old Proj 4.9 support
|
|
39
|
+
* Note this release does have some API changes. These include the removal of Proj 4.9 Point and Coordinate classes, changes to the PrimeMeridian class and changes to the Ellipsoid class. These changes should not impact most users.
|
|
40
|
+
|
|
41
|
+
## 3.0.0 - September 26, 2021
|
|
42
|
+
* Support Proj 8 which removes the old Proj API (Charlie Savage)
|
|
43
|
+
* Support newer versions of FFI which remove support for returning strings from callbacks (Charlie Savage)
|
|
44
|
+
|
|
45
|
+
## 2.2.2 - January 10, 2020
|
|
46
|
+
* Move proj_context_set_autoclose_database to api 6.2 (Jan Klimke)
|
|
47
|
+
* Improve search path generation code (Charlie Savage)
|
|
48
|
+
|
|
49
|
+
## 2.2.1 - January 8, 2020
|
|
50
|
+
* Move proj_as_projjson from version 6.0 to 6.2 api (Charlie Savage)
|
|
51
|
+
* Improve search path generation code (Charlie Savage)
|
|
52
|
+
|
|
53
|
+
## 2.2.0 - January 7, 2020
|
|
54
|
+
* Fix broken gem - was not including all api files (Jan Klimke)
|
|
55
|
+
* Add paths on MacOS when using Brew (Jan Klimke)
|
|
56
|
+
* Various code cleanups (Charlie Savage)
|
|
57
|
+
|
|
58
|
+
## 2.1.0 - January 5, 2020
|
|
59
|
+
* Set Ruby 2.4.1 to be the minimum allowed version (Samuel Williams)
|
|
60
|
+
* Fix incorrect use of context, reduce warnings when running tests (Samuel Williams)
|
|
61
|
+
* Fix `bundle exec rake test` (Samuel Williams)
|
|
62
|
+
* Add 2.4.1 to the travis test matrix (Samuel Williams)
|
|
63
|
+
|
|
64
|
+
## 2.0.0 - December 30, 2019
|
|
65
|
+
* Full rewrite to support API changes in Proj versions 5 and 6 (Charlie Savage)
|
|
66
|
+
* As part of rewrite switch bindings to use FFI versus a C extension (Charlie Savage)
|
|
67
|
+
* Split Ruby code into multiple files based on classes (Charlie Savage)
|
|
68
|
+
* Add in a bunch of new classes including Context, Crs, Coordinate, Ellipsoid, Prime Meridian and Transform (Charlie Savage)
|
|
69
|
+
* Deprecate Projection and Point - these will stop working with Proj 7 since they use an older deprecated API (Charlie Savage)
|
|
70
|
+
|
|
71
|
+
## 1.0.0 - December 14, 2014
|
|
72
|
+
* Calling this 1.0.0 since its a very stable gem (Charlie Savage)
|
|
73
|
+
|
|
74
|
+
## 0.4.3 - August 30, 2011
|
|
75
|
+
* Remove reference to now private projects.h header
|
|
76
|
+
|
|
77
|
+
## 0.4.2 - August 15, 2011
|
|
78
|
+
* Minor build tweak to support MSVC++
|
|
79
|
+
|
|
80
|
+
## 0.4.1 - July 30, 2011
|
|
81
|
+
* Search first for binaries when using windows gems
|
|
82
|
+
* Add # encoding to test files
|
|
83
|
+
* Reformat tests files to use standard ruby 2 space indenting
|
|
84
|
+
|
|
85
|
+
## 0.4.0 - July 30, 2011
|
|
86
|
+
* Update to compile on Ruby 1.9.* (Fabio Renzo Panettieri)
|
|
87
|
+
* Add in gemspec file (Charlie Savage)
|
|
88
|
+
* Add rake-compiler as development dependency, remove older MinGW build system (Charlie Savage)
|
|
89
|
+
* Move to GitHub (Charlie Savage)
|
|
90
|
+
|
|
91
|
+
## 0.3.1 - December 23, 2009
|
|
92
|
+
* Update extconf.conf file to be more flexible to make it easier to build on OS X when using MacPorts
|
|
93
|
+
* Updated windows binary to link against proj4.7
|
|
94
|
+
|
|
95
|
+
## 0.3.0 - August 14, 2008
|
|
96
|
+
* Removed Proj4::UV class which was previously deprecated
|
|
97
|
+
* New build infrastructure for Windows (Charlie Savage)
|
|
98
|
+
* Fixed memory leaks in forward() and inverse() methods (Charlie Savage)
|
data/Gemfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
source "https://rubygems.org"
|
|
2
|
-
|
|
3
|
-
# Specify your gem's dependencies in
|
|
4
|
-
gemspec
|
|
1
|
+
source "https://rubygems.org"
|
|
2
|
+
|
|
3
|
+
# Specify your gem's dependencies in proj4rb.gemspec
|
|
4
|
+
gemspec
|
data/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# proj4rb
|
|
2
|
+
|
|
3
|
+
Ruby bindings for the [Proj](https://proj.org) coordinate transformation library. The Proj library supports converting coordinates between a number of different coordinate systems and projections.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Next install the Proj library. This varies per system, but you want to install the latest version possible. Once installed, you'll need to make sure that libproj is on your operating system's load path.
|
|
8
|
+
|
|
9
|
+
Then install the gem:
|
|
10
|
+
|
|
11
|
+
```console
|
|
12
|
+
gem install proj4rb
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'proj'
|
|
19
|
+
|
|
20
|
+
# Create a transformation between two coordinate systems
|
|
21
|
+
transform = Proj::Transformation.new('EPSG:31467', 'EPSG:4326')
|
|
22
|
+
|
|
23
|
+
# Transform a coordinate
|
|
24
|
+
from = Proj::Coordinate.new(x: 5428192.0, y: 3458305.0, z: -5.1790915237)
|
|
25
|
+
to = transform.forward(from)
|
|
26
|
+
|
|
27
|
+
puts "lat: #{to.x}, lon: #{to.y}"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
Full documentation is available at https://cfis.github.io/proj4rb/ including:
|
|
33
|
+
|
|
34
|
+
- [Getting Started](https://cfis.github.io/proj4rb/)
|
|
35
|
+
- [CRS](https://cfis.github.io/proj4rb/crs/)
|
|
36
|
+
- [Coordinate Operations](https://cfis.github.io/proj4rb/coordinate_operations/)
|
|
37
|
+
- [How-To Guides](https://cfis.github.io/proj4rb/examples/)
|
|
38
|
+
- [API Reference](https://cfis.github.io/proj4rb/reference/)
|
|
39
|
+
|
|
40
|
+
## Environment Variables
|
|
41
|
+
|
|
42
|
+
See [Configuration](https://cfis.github.io/proj4rb/configuration/) for details.
|
|
43
|
+
|
|
44
|
+
- `PROJ_LIB_PATH` - Override the path to the `libproj` shared library.
|
|
45
|
+
- `PROJ_DATA` - Path to the folder containing `proj.db` (Proj 6+). Must be set before Ruby launches.
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
proj4rb is released under the MIT license.
|
|
50
|
+
|
|
51
|
+
## Authors
|
|
52
|
+
|
|
53
|
+
The proj4rb Ruby bindings were started by Guilhem Vellut with most of the code written by Jochen Topf. Charlie Savage ported the code to Windows, added the Windows build infrastructure, rewrote the code to use FFI and then ruby-bindgen, and updated it to support Proj version 5 through 9.
|