national_grid 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.gitmodules +3 -0
- data/Gemfile +2 -0
- data/LICENSE +31 -0
- data/README.md +29 -0
- data/Rakefile +22 -0
- data/ext/national_grid/common.c +6 -0
- data/ext/national_grid/common.h +4 -0
- data/ext/national_grid/extconf.rb +8 -0
- data/ext/national_grid/national_grid.c +10 -0
- data/ext/national_grid/national_grid.h +9 -0
- data/ext/national_grid/national_grid_easting_northing.c +60 -0
- data/ext/national_grid/national_grid_easting_northing.h +6 -0
- data/ext/national_grid/national_grid_latitude_longitude.c +60 -0
- data/ext/national_grid/national_grid_latitude_longitude.h +6 -0
- data/ext/ostn02c.rb +52 -0
- data/lib/national_grid/easting_northing.rb +15 -0
- data/lib/national_grid/inspect.rb +7 -0
- data/lib/national_grid/latitude_longitude.rb +15 -0
- data/lib/national_grid/version.rb +3 -0
- data/lib/national_grid.rb +5 -0
- data/national_grid.gemspec +22 -0
- data/test/national_grid/easting_northing_test.rb +54 -0
- data/test/national_grid/latitude_longitude_test.rb +54 -0
- metadata +127 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 91d57aee8d888d98b249a9b6a9441ba16e14f821
|
4
|
+
data.tar.gz: 586d14b009bc0408103838f903b03d712ce10b0d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 366673606396f5ced7ca47ce7d02551463681c13c0939a4a9a9944620e9740302ea502b3eca594d9f79de4b9cf55df4bab57f0eb9bdc284c1d70416b827f4bc2
|
7
|
+
data.tar.gz: f296578bb91fe0ff92d6b0cd8847b407df3d65e09ecf5bf97d25e64bced713113059c31caf34d1f773374fe2198709bc1580fb4eaf0bfa4981a161676891f36e
|
data/.gitignore
ADDED
data/.gitmodules
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
Copyright © 2014 Andrew Haines
|
2
|
+
|
3
|
+
NationalGrid uses the OSTN02C implementation of the Ordnance Survey National
|
4
|
+
Grid Transformation (OSTN02) and Ordnance Survey Geoid model (OSGM02).
|
5
|
+
|
6
|
+
OSTN02C © 2014 George MacKerron
|
7
|
+
|
8
|
+
OSTN02 and OSGM02 are trademarks of Ordnance Survey.
|
9
|
+
OSTN02 and OSGM02 data © Crown copyright 2002. All rights reserved.
|
10
|
+
|
11
|
+
|
12
|
+
MIT License
|
13
|
+
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
15
|
+
a copy of this software and associated documentation files (the
|
16
|
+
"Software"), to deal in the Software without restriction, including
|
17
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
18
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
19
|
+
permit persons to whom the Software is furnished to do so, subject to
|
20
|
+
the following conditions:
|
21
|
+
|
22
|
+
The above copyright notice and this permission notice shall be
|
23
|
+
included in all copies or substantial portions of the Software.
|
24
|
+
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
26
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
27
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
28
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
29
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
30
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
31
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# NationalGrid
|
2
|
+
|
3
|
+
NationalGrid is a Ruby binding to [OSTN02C](https://github.com/jawj/OSTN02C), which converts between National Grid easting-northing coordinates (OSGB36) and GPS latitude-longitude coordinates (ETRS89) using the OSTN02 transformation.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'national_grid'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install national_grid
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require "national_grid"
|
23
|
+
|
24
|
+
NationalGrid::EastingNorthing.new(362269.979, 169978.688, 54.467).to_latitude_longitude
|
25
|
+
# => #<NationalGrid::LatitudeLongitude:0x3ff8f955f0b4 latitude=51.427547 longitude=-2.544076 elevation=104.018>
|
26
|
+
|
27
|
+
NationalGrid::LatitudeLongitude.new(53.779110, -3.040455, 64.940).to_easting_northing
|
28
|
+
# => #<NationalGrid::EastingNorthing:0x3ff8f995f04c easting=331534.545 northing=431920.763 elevation=12.636>
|
29
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/extensiontask"
|
3
|
+
require "rake/testtask"
|
4
|
+
require_relative "ext/ostn02c"
|
5
|
+
|
6
|
+
CLEAN.include OSTN02C.object_path
|
7
|
+
|
8
|
+
file OSTN02C.library => OSTN02C.sources do
|
9
|
+
OSTN02C.make or fail "Building libostn02 failed"
|
10
|
+
end
|
11
|
+
|
12
|
+
Rake::ExtensionTask.new "national_grid" do |ext|
|
13
|
+
ext.lib_dir = "lib/national_grid"
|
14
|
+
end
|
15
|
+
|
16
|
+
Rake::Task["compile"].prerequisites.unshift FileList[OSTN02C.library]
|
17
|
+
|
18
|
+
Rake::TestTask.new "test" => "compile" do |test|
|
19
|
+
test.pattern = "test/**/*_test.rb"
|
20
|
+
end
|
21
|
+
|
22
|
+
task "default" => "test"
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#include <national_grid_easting_northing.h>
|
2
|
+
|
3
|
+
VALUE cNationalGridEastingNorthing;
|
4
|
+
|
5
|
+
static EastingNorthing* easting_northing(VALUE self) {
|
6
|
+
EastingNorthing* data;
|
7
|
+
Data_Get_Struct(self, EastingNorthing, data);
|
8
|
+
return data;
|
9
|
+
}
|
10
|
+
|
11
|
+
static VALUE allocate(VALUE class) {
|
12
|
+
EastingNorthing* data = ALLOC(EastingNorthing);
|
13
|
+
return Data_Wrap_Struct(class, NULL, xfree, data);
|
14
|
+
}
|
15
|
+
|
16
|
+
static VALUE initialize(int argc, VALUE* argv, VALUE self) {
|
17
|
+
VALUE easting, northing, elevation;
|
18
|
+
rb_scan_args(argc, argv, "03", &easting, &northing, &elevation);
|
19
|
+
|
20
|
+
EastingNorthing* data = easting_northing(self);
|
21
|
+
data->e = default_to_zero(easting);
|
22
|
+
data->n = default_to_zero(northing);
|
23
|
+
data->elevation = default_to_zero(elevation);
|
24
|
+
|
25
|
+
return self;
|
26
|
+
}
|
27
|
+
|
28
|
+
static VALUE easting(VALUE self) {
|
29
|
+
return DBL2NUM(easting_northing(self)->e);
|
30
|
+
}
|
31
|
+
|
32
|
+
static VALUE northing(VALUE self) {
|
33
|
+
return DBL2NUM(easting_northing(self)->n);
|
34
|
+
}
|
35
|
+
|
36
|
+
static VALUE elevation(VALUE self) {
|
37
|
+
return DBL2NUM(easting_northing(self)->elevation);
|
38
|
+
}
|
39
|
+
|
40
|
+
static VALUE to_latitude_longitude(VALUE self) {
|
41
|
+
LatLonDecimal data = ETRS89LatLonFromETRS89EastingNorthing(ETRS89EastingNorthingFromOSGB36EastingNorthing(*easting_northing(self)));
|
42
|
+
if (data.geoid == 0) return Qnil;
|
43
|
+
return new_national_grid_latitude_longitude(data);
|
44
|
+
}
|
45
|
+
|
46
|
+
void Init_national_grid_easting_northing() {
|
47
|
+
cNationalGridEastingNorthing = rb_define_class_under(mNationalGrid, "EastingNorthing", rb_cObject);
|
48
|
+
rb_define_alloc_func(cNationalGridEastingNorthing, allocate);
|
49
|
+
rb_define_method(cNationalGridEastingNorthing, "initialize", initialize, -1);
|
50
|
+
rb_define_method(cNationalGridEastingNorthing, "easting", easting, 0);
|
51
|
+
rb_define_method(cNationalGridEastingNorthing, "northing", northing, 0);
|
52
|
+
rb_define_method(cNationalGridEastingNorthing, "elevation", elevation, 0);
|
53
|
+
rb_define_method(cNationalGridEastingNorthing, "to_latitude_longitude", to_latitude_longitude, 0);
|
54
|
+
}
|
55
|
+
|
56
|
+
VALUE new_national_grid_easting_northing(EastingNorthing data) {
|
57
|
+
VALUE instance = allocate(cNationalGridEastingNorthing);
|
58
|
+
*easting_northing(instance) = data;
|
59
|
+
return instance;
|
60
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
#include <national_grid_latitude_longitude.h>
|
2
|
+
|
3
|
+
VALUE cNationalGridLatitudeLongitude;
|
4
|
+
|
5
|
+
static LatLonDecimal* latitude_longitude(VALUE self) {
|
6
|
+
LatLonDecimal* data;
|
7
|
+
Data_Get_Struct(self, LatLonDecimal, data);
|
8
|
+
return data;
|
9
|
+
}
|
10
|
+
|
11
|
+
static VALUE allocate(VALUE class) {
|
12
|
+
LatLonDecimal* data = ALLOC(LatLonDecimal);
|
13
|
+
return Data_Wrap_Struct(class, NULL, xfree, data);
|
14
|
+
}
|
15
|
+
|
16
|
+
static VALUE initialize(int argc, VALUE* argv, VALUE self) {
|
17
|
+
VALUE latitude, longitude, elevation;
|
18
|
+
rb_scan_args(argc, argv, "03", &latitude, &longitude, &elevation);
|
19
|
+
|
20
|
+
LatLonDecimal* data = latitude_longitude(self);
|
21
|
+
data->lat = default_to_zero(latitude);
|
22
|
+
data->lon = default_to_zero(longitude);
|
23
|
+
data->elevation = default_to_zero(elevation);
|
24
|
+
|
25
|
+
return self;
|
26
|
+
}
|
27
|
+
|
28
|
+
static VALUE latitude(VALUE self) {
|
29
|
+
return DBL2NUM(latitude_longitude(self)->lat);
|
30
|
+
}
|
31
|
+
|
32
|
+
static VALUE longitude(VALUE self) {
|
33
|
+
return DBL2NUM(latitude_longitude(self)->lon);
|
34
|
+
}
|
35
|
+
|
36
|
+
static VALUE elevation(VALUE self) {
|
37
|
+
return DBL2NUM(latitude_longitude(self)->elevation);
|
38
|
+
}
|
39
|
+
|
40
|
+
static VALUE to_easting_northing(VALUE self) {
|
41
|
+
EastingNorthing data = OSGB36EastingNorthingFromETRS89EastingNorthing(ETRS89EastingNorthingFromETRS89LatLon(*latitude_longitude(self)));
|
42
|
+
if (data.geoid == 0) return Qnil;
|
43
|
+
return new_national_grid_easting_northing(data);
|
44
|
+
}
|
45
|
+
|
46
|
+
void Init_national_grid_latitude_longitude() {
|
47
|
+
cNationalGridLatitudeLongitude = rb_define_class_under(mNationalGrid, "LatitudeLongitude", rb_cObject);
|
48
|
+
rb_define_alloc_func(cNationalGridLatitudeLongitude, allocate);
|
49
|
+
rb_define_method(cNationalGridLatitudeLongitude, "initialize", initialize, -1);
|
50
|
+
rb_define_method(cNationalGridLatitudeLongitude, "latitude", latitude, 0);
|
51
|
+
rb_define_method(cNationalGridLatitudeLongitude, "longitude", longitude, 0);
|
52
|
+
rb_define_method(cNationalGridLatitudeLongitude, "elevation", elevation, 0);
|
53
|
+
rb_define_method(cNationalGridLatitudeLongitude, "to_easting_northing", to_easting_northing, 0);
|
54
|
+
}
|
55
|
+
|
56
|
+
VALUE new_national_grid_latitude_longitude(LatLonDecimal data) {
|
57
|
+
VALUE instance = allocate(cNationalGridLatitudeLongitude);
|
58
|
+
*latitude_longitude(instance) = data;
|
59
|
+
return instance;
|
60
|
+
}
|
data/ext/ostn02c.rb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
require "rbconfig"
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
module OSTN02C
|
5
|
+
module_function
|
6
|
+
|
7
|
+
def make
|
8
|
+
compile and package
|
9
|
+
end
|
10
|
+
|
11
|
+
def compile
|
12
|
+
puts "Compiling libostn02"
|
13
|
+
FileUtils.mkdir_p object_path
|
14
|
+
Dir.chdir object_path do
|
15
|
+
system RbConfig.expand("$(CC) -I#{include_path} $(CPPFLAGS) $(CFLAGS) -c #{sources.join(" ")}")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def package
|
20
|
+
puts "Packaging libostn02"
|
21
|
+
FileUtils.mkdir_p lib_path
|
22
|
+
system RbConfig.expand("$(AR) -crsv #{library} #{objects}")
|
23
|
+
end
|
24
|
+
|
25
|
+
def sources
|
26
|
+
Dir.glob(File.join(include_path, "*.c"))
|
27
|
+
end
|
28
|
+
|
29
|
+
def objects
|
30
|
+
File.join(object_path, "*.o")
|
31
|
+
end
|
32
|
+
|
33
|
+
def library
|
34
|
+
File.join(lib_path, "libostn02.a")
|
35
|
+
end
|
36
|
+
|
37
|
+
def include_path
|
38
|
+
File.expand_path("ostn02c/OSTN02", __dir__)
|
39
|
+
end
|
40
|
+
|
41
|
+
def lib_path
|
42
|
+
File.join(output_path, "lib")
|
43
|
+
end
|
44
|
+
|
45
|
+
def object_path
|
46
|
+
File.join(output_path, "obj")
|
47
|
+
end
|
48
|
+
|
49
|
+
def output_path
|
50
|
+
File.expand_path("../tmp/ostn02c", __dir__)
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "national_grid/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "national_grid"
|
7
|
+
spec.version = NationalGrid::VERSION
|
8
|
+
spec.authors = ["Andrew Haines"]
|
9
|
+
spec.email = ["andrew@haines.org.nz"]
|
10
|
+
spec.summary = "Converts between Ordnance Survey National Grid easting-northing coordinates and GPS latitude-longitude coordinates"
|
11
|
+
spec.homepage = "https://github.com/haines/national_grid"
|
12
|
+
spec.license = "MIT"
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0")
|
15
|
+
spec.test_files = spec.files.grep(%r{^test/})
|
16
|
+
spec.require_paths = ["lib"]
|
17
|
+
|
18
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
19
|
+
spec.add_development_dependency "rake"
|
20
|
+
spec.add_development_dependency "rake-compiler"
|
21
|
+
spec.add_development_dependency "minitest", "~> 5.3"
|
22
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require "minitest/autorun"
|
2
|
+
require "national_grid"
|
3
|
+
|
4
|
+
module NationalGrid
|
5
|
+
class EastingNorthingTest < Minitest::Test
|
6
|
+
def test_initialize_with_defaults
|
7
|
+
point = EastingNorthing.new
|
8
|
+
|
9
|
+
assert_equal 0, point.easting
|
10
|
+
assert_equal 0, point.northing
|
11
|
+
assert_equal 0, point.elevation
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_initialize_with_easting_and_northing
|
15
|
+
point = EastingNorthing.new(12345.6, 78901.2)
|
16
|
+
|
17
|
+
assert_equal 12345.6, point.easting
|
18
|
+
assert_equal 78901.2, point.northing
|
19
|
+
assert_equal 0, point.elevation
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_initialize_with_easting_northing_and_elevation
|
23
|
+
point = EastingNorthing.new(12345.6, 78901.2, 345.6)
|
24
|
+
|
25
|
+
assert_equal 12345.6, point.easting
|
26
|
+
assert_equal 78901.2, point.northing
|
27
|
+
assert_equal 345.6, point.elevation
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_inspect
|
31
|
+
assert_match /^#<NationalGrid::EastingNorthing:0x\h+ easting=12345.678 northing=90123.456 elevation=789.012>$/, EastingNorthing.new(12345.6779, 90123.4559, 789.0119).inspect
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_to_a
|
35
|
+
assert_equal [12345.6, 78901.2, 345.6], EastingNorthing.new(12345.6, 78901.2, 345.6).to_a
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_to_latitude_longitude
|
39
|
+
assert_close LatitudeLongitude.new(51.427547, -2.544076, 104.018), EastingNorthing.new(362269.979, 169978.688, 54.467).to_latitude_longitude
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_to_latitude_longitude_when_outside_the_grid
|
43
|
+
assert_nil EastingNorthing.new(999999.999, 999999.999, 99.999).to_latitude_longitude
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def assert_close(expected, actual)
|
49
|
+
assert_in_delta expected.latitude, actual.latitude, 0.5e-6
|
50
|
+
assert_in_delta expected.longitude, actual.longitude, 0.5e-6
|
51
|
+
assert_in_delta expected.elevation, actual.elevation, 0.5e-3
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require "minitest/autorun"
|
2
|
+
require "national_grid"
|
3
|
+
|
4
|
+
module NationalGrid
|
5
|
+
class LatitudeLongitudeTest < Minitest::Test
|
6
|
+
def test_initialize_with_defaults
|
7
|
+
point = LatitudeLongitude.new
|
8
|
+
|
9
|
+
assert_equal 0, point.latitude
|
10
|
+
assert_equal 0, point.longitude
|
11
|
+
assert_equal 0, point.elevation
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_initialize_with_latitude_and_longitude
|
15
|
+
point = LatitudeLongitude.new(12.3, 45.6)
|
16
|
+
|
17
|
+
assert_equal 12.3, point.latitude
|
18
|
+
assert_equal 45.6, point.longitude
|
19
|
+
assert_equal 0, point.elevation
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_initialize_with_latitude_longitude_and_elevation
|
23
|
+
point = LatitudeLongitude.new(12.3, 45.6, 789.0)
|
24
|
+
|
25
|
+
assert_equal 12.3, point.latitude
|
26
|
+
assert_equal 45.6, point.longitude
|
27
|
+
assert_equal 789.0, point.elevation
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_inspect
|
31
|
+
assert_match /^#<NationalGrid::LatitudeLongitude:0x\h+ latitude=12.345678 longitude=90.123456 elevation=789.012>$/, LatitudeLongitude.new(12.3456779, 90.1234559, 789.0119).inspect
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_to_a
|
35
|
+
assert_equal [12.3, 45.6, 789.0], LatitudeLongitude.new(12.3, 45.6, 789.0).to_a
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_to_easting_northing
|
39
|
+
assert_close EastingNorthing.new(331534.545, 431920.763, 12.636), LatitudeLongitude.new(53.779110, -3.040455, 64.940).to_easting_northing
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_to_easting_northing_when_outside_the_grid
|
43
|
+
assert_nil LatitudeLongitude.new(-45.878761, 170.502798).to_easting_northing
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def assert_close(expected, actual)
|
49
|
+
assert_in_delta expected.easting, actual.easting, 0.5e-3
|
50
|
+
assert_in_delta expected.northing, actual.northing, 0.5e-3
|
51
|
+
assert_in_delta expected.elevation, actual.elevation, 0.5e-3
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
metadata
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: national_grid
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew Haines
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake-compiler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.3'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- andrew@haines.org.nz
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- ".gitignore"
|
77
|
+
- ".gitmodules"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- ext/national_grid/common.c
|
83
|
+
- ext/national_grid/common.h
|
84
|
+
- ext/national_grid/extconf.rb
|
85
|
+
- ext/national_grid/national_grid.c
|
86
|
+
- ext/national_grid/national_grid.h
|
87
|
+
- ext/national_grid/national_grid_easting_northing.c
|
88
|
+
- ext/national_grid/national_grid_easting_northing.h
|
89
|
+
- ext/national_grid/national_grid_latitude_longitude.c
|
90
|
+
- ext/national_grid/national_grid_latitude_longitude.h
|
91
|
+
- ext/ostn02c.rb
|
92
|
+
- lib/national_grid.rb
|
93
|
+
- lib/national_grid/easting_northing.rb
|
94
|
+
- lib/national_grid/inspect.rb
|
95
|
+
- lib/national_grid/latitude_longitude.rb
|
96
|
+
- lib/national_grid/version.rb
|
97
|
+
- national_grid.gemspec
|
98
|
+
- test/national_grid/easting_northing_test.rb
|
99
|
+
- test/national_grid/latitude_longitude_test.rb
|
100
|
+
homepage: https://github.com/haines/national_grid
|
101
|
+
licenses:
|
102
|
+
- MIT
|
103
|
+
metadata: {}
|
104
|
+
post_install_message:
|
105
|
+
rdoc_options: []
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
requirements: []
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 2.2.2
|
121
|
+
signing_key:
|
122
|
+
specification_version: 4
|
123
|
+
summary: Converts between Ordnance Survey National Grid easting-northing coordinates
|
124
|
+
and GPS latitude-longitude coordinates
|
125
|
+
test_files:
|
126
|
+
- test/national_grid/easting_northing_test.rb
|
127
|
+
- test/national_grid/latitude_longitude_test.rb
|