global_convert 0.0.1 → 0.0.2
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 +8 -8
- data/README.rdoc +14 -1
- data/data/projections.yml +14 -0
- data/lib/global_convert/version.rb +3 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjliNmE5ODQ1NWMyOGMyZDJkMWFhNWNiYTY4OThmMDMxODlmNDMwOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDM3OTE4NTg2ZDM1ZGFjODVkYWQ4NjQwOWJjYmZlMTEwNWFiZDM5ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZGFhMmEyNTI5MTlkYWFkMDk3YzY3OTJmMTA1N2IyMmQyMGZiMzIyMTM3OWQ1
|
10
|
+
NmI0Y2RjZjcxM2E0ZjUwZjVhZDJmZWFmNzkwYmZlZWMzMDcxZWM2ZDg0YWI4
|
11
|
+
ZjFjMDlhZGFiNmJmOWQ3MDRhZTQ3ZTA3MmMyZTdmY2Q0MmZiYjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
M2Q0MzRjNTU1Mzc0ZjJkZTFiNDk3ZDEyYzQ1OWY3ZjM5MTczMzVlNDBkOWFh
|
14
|
+
YTI3MmUwY2U5YTQ4ODRmZDNkNmVjNWEzZjkxNjBiYjk2YTdhZDk2YTdkYjVj
|
15
|
+
NzFkMjgzNDgwZWY2OGUxYmU2YmRkNDIzNzU3ZGE4YjY0MGUxOGE=
|
data/README.rdoc
CHANGED
@@ -9,6 +9,19 @@ to convert coordinates between global charting systems with different projection
|
|
9
9
|
Global Convert was greatly influenced by Peter Hick's blog:
|
10
10
|
{Converting OSGB36 (Eastings/Northings) to WGS84 (Longitude/Latitude) in Ruby}[http://blog.poggs.com/index.php/2010/09/converting-osgb36-eastingsnorthings-to-wgs84-longitudelatitude-in-ruby/]
|
11
11
|
|
12
|
+
Peter Hick's blog was itself based on Harry Wood's blog:
|
13
|
+
{Ruby code for converting to UK Ordnance Survey coordinate systems from WGS84?}[http://www.harrywood.co.uk/blog/2010/06/29/ruby-code-for-converting-to-uk-ordnance-survey-coordinate-systems-from-wgs84/]
|
14
|
+
|
15
|
+
== Installation
|
16
|
+
|
17
|
+
Global Convert is releases as a gem. So either:
|
18
|
+
|
19
|
+
gem install 'global_convert'
|
20
|
+
|
21
|
+
or add this to your Gemfile:
|
22
|
+
|
23
|
+
gem 'global_convert'
|
24
|
+
|
12
25
|
== UK Ordinance Survey National Grid references to Longitude / Latitude
|
13
26
|
|
14
27
|
require 'global_convert'
|
@@ -16,7 +29,7 @@ Global Convert was greatly influenced by Peter Hick's blog:
|
|
16
29
|
easting = 529978
|
17
30
|
northing = 186491
|
18
31
|
|
19
|
-
location = Location.new(
|
32
|
+
location = GlobalConvert::Location.new(
|
20
33
|
input: {
|
21
34
|
projection: :osgb36,
|
22
35
|
lon: easting,
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# root element is used when initializing a new Projection
|
2
|
+
# For example: Projection.new(:wgs84)
|
3
|
+
# Each definition must contain a 'projection' key
|
4
|
+
# Currently 'name' and 'output_units' are supplied for documentation only
|
5
|
+
|
6
|
+
wgs84:
|
7
|
+
name: WGS84 (Longitude/Latitude)
|
8
|
+
projection: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
|
9
|
+
output_units: radians
|
10
|
+
|
11
|
+
osgb36:
|
12
|
+
name: OSGB36 (UK Ordinance Survey Eastings/Northings)
|
13
|
+
projection: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs
|
14
|
+
output_units: metres
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: global_convert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Nichols
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- LICENSE
|
40
40
|
- Rakefile
|
41
41
|
- README.rdoc
|
42
|
+
- data/projections.yml
|
42
43
|
- test/units/global_convert_test.rb
|
43
44
|
- test/units/global_convert/projection_test.rb
|
44
45
|
- test/units/global_convert/location_test.rb
|