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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzIwNGU0NDc3YzYwZmI1YzY3MDVhZjIwMDhkYWM0YjRlY2U0YWY2Ng==
4
+ NjliNmE5ODQ1NWMyOGMyZDJkMWFhNWNiYTY4OThmMDMxODlmNDMwOA==
5
5
  data.tar.gz: !binary |-
6
- Y2UyYmUwY2RhYWY4NmRiYWI1ZjFkMDI2ODgzYjk0ZWNmZGE5Mjg2Mg==
6
+ MDM3OTE4NTg2ZDM1ZGFjODVkYWQ4NjQwOWJjYmZlMTEwNWFiZDM5ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjRhMzhlMjI0NmI5NDNiYmQ4ZDFkNGZhNDQ0ODBkZWEyNWJjMTI5NWZmMDk0
10
- NmMxMzc3NTIzNGVmOTRkNTYxMWFiOWE1ZjAyNjhiMGZlZWJhODY3ZDc0Y2Y4
11
- M2MxZGI1NDU1OGMwMTllNTZiZDFlMGFhMjljNzkyOTgwOTJkYzE=
9
+ ZGFhMmEyNTI5MTlkYWFkMDk3YzY3OTJmMTA1N2IyMmQyMGZiMzIyMTM3OWQ1
10
+ NmI0Y2RjZjcxM2E0ZjUwZjVhZDJmZWFmNzkwYmZlZWMzMDcxZWM2ZDg0YWI4
11
+ ZjFjMDlhZGFiNmJmOWQ3MDRhZTQ3ZTA3MmMyZTdmY2Q0MmZiYjg=
12
12
  data.tar.gz: !binary |-
13
- YjEwYTc1NjdkMWJjN2JiMWFjOGU1YTFjYTNjMTYxNzVhN2IyNGE2MDAxZjNi
14
- NGYxNmVkODA0MGU4NGVlYzAxYzIyMzM2MGRjZDAyOTgzMzBhNjJhODliMTdi
15
- ZmJlMmE3YWJmZjg4ZTgxYjI0NjEyMmIzZmRmYmI0ZTJjMThhZWM=
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
@@ -1,9 +1,11 @@
1
1
  module GlobalConvert
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
4
4
 
5
5
  # History
6
6
  # =======
7
7
  #
8
8
  # 0.0.1 - First build
9
+ #
10
+ # 0.0.2 - Fixes absence of projections.yml from gem file
9
11
  #
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.1
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