japan_plane_rectangular 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 +50 -0
- data/Gemfile +6 -0
- data/LICENSE +21 -0
- data/README.md +52 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/japan_plane_rectangular.gemspec +25 -0
- data/lib/japan_plane_rectangular.rb +9 -0
- data/lib/japan_plane_rectangular/constants.rb +37 -0
- data/lib/japan_plane_rectangular/functions.rb +189 -0
- data/lib/japan_plane_rectangular/version.rb +5 -0
- metadata +97 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 857c201c090e63bc80b3ace5062fd573568fed57
|
4
|
+
data.tar.gz: 804f6dbfe9b1f445699fae03c35842e13513d51b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c719c3d4a18995056c415cedce862f048348fb9707a5562fb853c8cfcd883a172632fd9cae8083d840b8102aad5465e05627cad03bd0e81e34ff1bad62cb5301
|
7
|
+
data.tar.gz: 2bd05010662da314f90e062f2a9a7b1e574536eb17ca87a7f363a3c965cbe1d0b2a44321567b035c70cb1b899e900d52a4e01d0c34aeb6a3bbd2b115911fb784
|
data/.gitignore
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
# Gemfile.lock
|
46
|
+
# .ruby-version
|
47
|
+
# .ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 dash14
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Japan Plane Rectangular
|
2
|
+
|
3
|
+
Conversion between world geodetic system and Japan plane rectangular coordinate system.
|
4
|
+
|
5
|
+
世界測地系と日本平面直角座標系との変換
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'japan_plane_rectangular'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install japan_plane_rectangular
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
require 'japan_plane_rectangular'
|
27
|
+
|
28
|
+
# TokyoTower
|
29
|
+
latlon = [35.658596, 139.745403]
|
30
|
+
|
31
|
+
# Lat, Lon -> X, Y
|
32
|
+
xy = JapanPlaneRectangular.to_xy(latlon, 9)
|
33
|
+
p xy # [-37873.418395058005, -7961.358270500216]
|
34
|
+
|
35
|
+
# X, Y -> Lat, Lon
|
36
|
+
latlon = JapanPlaneRectangular.to_latlon(xy, 9)
|
37
|
+
p latlon # [35.658596, 139.745403]
|
38
|
+
|
39
|
+
# Get nearest zone number by Lat, Lon
|
40
|
+
zone = JapanPlaneRectangular.nearest_zone(latlon)
|
41
|
+
p zone # 9
|
42
|
+
```
|
43
|
+
|
44
|
+
## Development
|
45
|
+
|
46
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
47
|
+
|
48
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
49
|
+
|
50
|
+
## Contributing
|
51
|
+
|
52
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/dash14/ruby-japan-plane-rectangular.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "japan_plane_rectangular"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "japan_plane_rectangular/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "japan_plane_rectangular"
|
8
|
+
spec.version = JapanPlaneRectangular::VERSION
|
9
|
+
spec.authors = ["dash14"]
|
10
|
+
spec.email = ["dash14.ack@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Conversion between WGS and Japan plane rectangular CS}
|
13
|
+
spec.homepage = "https://github.com/dash14/ruby-japan-plane-rectangular"
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
16
|
+
f.match(%r{^(test|spec|features)/})
|
17
|
+
end
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
25
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
|
2
|
+
module JapanPlaneRectangular
|
3
|
+
module Constants
|
4
|
+
# Positions of zone origins
|
5
|
+
ORIGINS = [
|
6
|
+
[33.00000, 129.5000],
|
7
|
+
[33.00000, 131.00000],
|
8
|
+
[36.00000, 132.166666666666669],
|
9
|
+
[33.00000, 133.50000],
|
10
|
+
[36.00000, 134.333333333333334],
|
11
|
+
[36.00000, 136.00000],
|
12
|
+
[36.00000, 137.166666666666666],
|
13
|
+
[36.00000, 138.5],
|
14
|
+
[36.00000, 139.833333333333334],
|
15
|
+
[40.00000, 140.833333333333334],
|
16
|
+
[44.00000, 140.25000],
|
17
|
+
[44.00000, 142.25000],
|
18
|
+
[44.00000, 144.25000],
|
19
|
+
[26.00000, 142.00000],
|
20
|
+
[26.00000, 127.50000],
|
21
|
+
[26.00000, 124.00000],
|
22
|
+
[26.00000, 131.00000],
|
23
|
+
[20.00000, 136.00000],
|
24
|
+
[26.00000, 154.000000]
|
25
|
+
]
|
26
|
+
|
27
|
+
M0 = 0.9999
|
28
|
+
|
29
|
+
# Equatorial radius of earth
|
30
|
+
GRS80_ER = 6378137.0
|
31
|
+
|
32
|
+
# Inverse flattening
|
33
|
+
GRS80_IF = 298.257222101
|
34
|
+
|
35
|
+
ECCENTRICITY = Math.sqrt(2.0 * GRS80_IF - 1.0) / GRS80_IF
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,189 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'japan_plane_rectangular/constants'
|
4
|
+
|
5
|
+
module JapanPlaneRectangular
|
6
|
+
module Functions
|
7
|
+
include JapanPlaneRectangular::Constants
|
8
|
+
|
9
|
+
# Find nearest zone number by [Latitude, Longitude]
|
10
|
+
# @param [Array<Float>] latlon [Latitude, Longitude]
|
11
|
+
# @return Integer zone number (1~19)
|
12
|
+
def nearest_zone(latlon)
|
13
|
+
min_index = 0
|
14
|
+
min_val = Float::MAX
|
15
|
+
ORIGINS.each_with_index do |origin, i|
|
16
|
+
xy1 = to_xy(latlon, 7)
|
17
|
+
xy2 = to_xy(origin, 7)
|
18
|
+
d = distance(xy1, xy2)
|
19
|
+
if d < min_val
|
20
|
+
min_index = i
|
21
|
+
min_val = d
|
22
|
+
end
|
23
|
+
end
|
24
|
+
min_index + 1 # zone number
|
25
|
+
end
|
26
|
+
|
27
|
+
# Convert to XY from latlon in zone
|
28
|
+
# @param [Array<Float>] latlon [latitude, longitude]
|
29
|
+
# @param [Integer] zone zone number (1~19)
|
30
|
+
# @return [Array<Float>] [x, y]
|
31
|
+
def to_xy(point, zone)
|
32
|
+
raise ArgumentError, 'Invalid zone number' unless 1 <= zone && zone <= 19
|
33
|
+
origin_point = ORIGINS[zone - 1]
|
34
|
+
|
35
|
+
phi0 = to_radian(origin_point[0])
|
36
|
+
lamda0 = to_radian(origin_point[1])
|
37
|
+
|
38
|
+
phi1 = to_radian(point[0])
|
39
|
+
lamda1 = to_radian(point[1])
|
40
|
+
|
41
|
+
s0 = meridian_arc_length(phi0)
|
42
|
+
s1 = meridian_arc_length(phi1)
|
43
|
+
|
44
|
+
ut = GRS80_ER / Math.sqrt(1.0 - ECCENTRICITY**2.0 * Math.sin(phi1)**2.0)
|
45
|
+
conp = Math.cos(phi1)
|
46
|
+
t1 = Math.tan(phi1)
|
47
|
+
dlamda = lamda1 - lamda0
|
48
|
+
eta2 = (ECCENTRICITY**2.0 / (1.0 - ECCENTRICITY**2.0)) * conp**2.0
|
49
|
+
|
50
|
+
v1 = 5.0 - t1**2.0 + 9.0 * eta2 + 4.0 * eta2**2.0
|
51
|
+
v2 = -61.0 + 58.0 * t1**2.0 - t1**4.0 - 270.0 * eta2 + 330.0 * t1**2.0 * eta2
|
52
|
+
v3 = -1385.0 + 3111.0 * t1**2.0 - 543.0 * t1**4.0 + t1**6.0
|
53
|
+
|
54
|
+
x = ((s1 - s0) + ut * conp**2.0 * t1 * dlamda**2.0 / 2.0 +
|
55
|
+
ut * conp**4.0 * t1 * v1 * dlamda**4.0 / 24.0 -
|
56
|
+
ut * conp**6.0 * t1 * v2 * dlamda**6.0 / 720.0 -
|
57
|
+
ut * conp**8.0 * t1 * v3 * dlamda**8.0 / 40320.0) * M0
|
58
|
+
|
59
|
+
v1 = -1.0 + t1**2.0 - eta2
|
60
|
+
v2 = -5.0 + 18.0 * t1**2.0 - t1**4.0 - 14.0 * eta2 + 58.0 * t1**2.0 * eta2
|
61
|
+
v3 = -61.0 + 479.0 * t1**2.0 - 179.0 * t1**4.0 + t1**6.0
|
62
|
+
|
63
|
+
y = (ut * conp * dlamda -
|
64
|
+
ut * conp**3.0 * v1 * dlamda**3.0 / 6.0 -
|
65
|
+
ut * conp**5.0 * v2 * dlamda**5.0 / 120.0 -
|
66
|
+
ut * conp**7.0 * v3 * dlamda**7.0 / 5040.0) * M0
|
67
|
+
|
68
|
+
[x, y]
|
69
|
+
end
|
70
|
+
|
71
|
+
# Convert to latlon from XY in zone
|
72
|
+
# @param [Array<Float>] xy [x, y]
|
73
|
+
# @param [Integer] zone zone number (1~19)
|
74
|
+
# @return [Array<Float>] [latitude, longitude]
|
75
|
+
def to_latlon(xy, zone)
|
76
|
+
raise ArgumentError, 'Invalid zone number' unless 1 <= zone && zone <= 19
|
77
|
+
origin_point = ORIGINS[zone - 1]
|
78
|
+
(x, y) = xy
|
79
|
+
|
80
|
+
phi0 = to_radian(origin_point[0])
|
81
|
+
lamda0 = to_radian(origin_point[1])
|
82
|
+
|
83
|
+
phi1 = perpendicular(x, phi0)
|
84
|
+
|
85
|
+
ut = GRS80_ER / Math.sqrt(1.0 - ECCENTRICITY**2.0 * Math.sin(phi1)**2.0)
|
86
|
+
conp = Math.cos(phi1)
|
87
|
+
t1 = Math.tan(phi1)
|
88
|
+
eta2 = (ECCENTRICITY**2.0 / (1.0 - ECCENTRICITY**2.0)) * conp**2.0
|
89
|
+
|
90
|
+
yy = y / M0
|
91
|
+
v1 = 1.0 + eta2
|
92
|
+
v2 = 5.0 + 3.0 * t1**2.0 + 6.0 * eta2 - 6.0 * t1**2.0 * eta2 - 3.0 * eta2**2.0 - 9.0 * t1**2.0 * eta2**2.0
|
93
|
+
v3 = 61.0 + 90.0 * t1**2.0 + 45.0 * t1**4.0 + 107.0 * eta2 - 162.0 * t1**2.0 * eta2 - 45.0 * t1**4.0 * eta2
|
94
|
+
v4 = 1385.0 + 3633.0 * t1**2.0 + 4095.0 * t1**4.0 + 1575.0 * t1**6.0
|
95
|
+
|
96
|
+
phir = -(v1 / (2.0 * ut**2.0)) * yy**2.0
|
97
|
+
phir += (v2 / (24.0 * ut**4.0)) * yy**4.0
|
98
|
+
phir -= (v3 / (720.0 * ut**6.0)) * yy**6.0
|
99
|
+
phir += (v4 / (40320.0 * ut**8.0)) * yy**8.0
|
100
|
+
phir *= t1
|
101
|
+
phir += phi1
|
102
|
+
phir = to_degree(phir)
|
103
|
+
|
104
|
+
v1 = ut * conp
|
105
|
+
v2 = 1.0 + 2.0 * t1**2.0 + eta2
|
106
|
+
v3 = 5.0 + 28.0 * t1**2.0 + 24.0 * t1**4.0 + 6.0 * eta2 + 8.0 * t1**2.0 * eta2
|
107
|
+
v4 = 61.0 + 662.0 * t1**2.0 + 1320.0 * t1**4.0 + 720.0 * t1**6.0
|
108
|
+
|
109
|
+
lamdar = (1.0 / v1) * yy
|
110
|
+
lamdar -= (v2 / (6.0 * ut**2.0 * v1)) * yy**3.0
|
111
|
+
lamdar += (v3 / (120.0 * ut**4.0 * v1)) * yy**5.0
|
112
|
+
lamdar -= (v4 / (5040.0 * ut**6.0 * v1)) * yy**7.0
|
113
|
+
lamdar += lamda0
|
114
|
+
|
115
|
+
lamdar = to_degree(lamdar)
|
116
|
+
|
117
|
+
[phir, lamdar]
|
118
|
+
end
|
119
|
+
|
120
|
+
private
|
121
|
+
|
122
|
+
def distance(p1, p2)
|
123
|
+
(x1, y1) = p1
|
124
|
+
(x2, y2) = p2
|
125
|
+
Math.sqrt((x2 - x1)**2.0 + (y2 - y1)**2.0)
|
126
|
+
end
|
127
|
+
|
128
|
+
def to_radian(degree)
|
129
|
+
degree * Math::PI / 180.0
|
130
|
+
end
|
131
|
+
|
132
|
+
def to_degree(radian)
|
133
|
+
radian * 180.0 / Math::PI
|
134
|
+
end
|
135
|
+
|
136
|
+
def perpendicular(x, phi0)
|
137
|
+
s0 = meridian_arc_length(phi0)
|
138
|
+
m = s0 + x / M0
|
139
|
+
cnt = 0
|
140
|
+
phin = phi0
|
141
|
+
e2 = ECCENTRICITY**2.0
|
142
|
+
phi0 = phin
|
143
|
+
|
144
|
+
loop do
|
145
|
+
cnt += 1
|
146
|
+
phi0 = phin
|
147
|
+
sn = meridian_arc_length(phin)
|
148
|
+
v1 = 2.0 * (sn - m) * ((1.0 - e2 * Math.sin(phin)**2.0)**1.5)
|
149
|
+
v2 = 3.0 * e2 * (sn - m) * Math.sin(phin) * Math.cos(phin) * Math.sqrt(1.0 - e2 * Math.sin(phin)**2.0) - 2.0 * GRS80_ER * (1.0 - e2)
|
150
|
+
phin += v1 / v2
|
151
|
+
break if ((phin - phi0).abs < 0.00000000000001) || cnt > 100
|
152
|
+
end
|
153
|
+
phin
|
154
|
+
end
|
155
|
+
|
156
|
+
def meridian_arc_length(lat_rad)
|
157
|
+
e0 = ECCENTRICITY
|
158
|
+
e2 = e0**2.0
|
159
|
+
e4 = e0**4.0
|
160
|
+
e6 = e0**6.0
|
161
|
+
e8 = e0**8.0
|
162
|
+
e10 = e0**10.0
|
163
|
+
e12 = e0**12.0
|
164
|
+
e14 = e0**14.0
|
165
|
+
e16 = e0**16.0
|
166
|
+
|
167
|
+
a = 1.0 + 3.0 / 4.0 * e2 + 45.0 / 64.0 * e4 + 175.0 / 256.0 * e6 + 11025.0 / 16384.0 * e8 + 43659.0 / 65536.0 * e10 + 693693.0 / 1048576.0 * e12 + 19324305.0 / 29360128.0 * e14 + 4927697775.0 / 7516192768.0 * e16
|
168
|
+
b = 3.0 / 4.0 * e2 + 15.0 / 16.0 * e4 + 525.0 / 512.0 * e6 + 2205.0 / 2048.0 * e8 + 72765.0 / 65536.0 * e10 + 297297.0 / 262144.0 * e12 + 135270135.0 / 117440512.0 * e14 + 547521975.0 / 469762048.0 * e16
|
169
|
+
c = 15.0 / 64.0 * e4 + 105.0 / 256.0 * e6 + 2205.0 / 4096.0 * e8 + 10395.0 / 16384.0 * e10 + 1486485.0 / 2097152.0 * e12 + 45090045.0 / 58720256.0 * e14 + 766530765.0 / 939524096.0 * e16
|
170
|
+
d = 35.0 / 512.0 * e6 + 315.0 / 2048.0 * e8 + 31185.0 / 131072.0 * e10 + 165165.0 / 524288.0 * e12 + 45090045.0 / 117440512.0 * e14 + 209053845.0 / 469762048.0 * e16
|
171
|
+
e = 315.0 / 16384.0 * e8 + 3465.0 / 65536.0 * e10 + 99099.0 / 1048576.0 * e12 + 4099095.0 / 29360128.0 * e14 + 348423075.0 / 1879048192.0 * e16
|
172
|
+
f = 693.0 / 131072 * e10 + 9009.0 / 524288.0 * e12 + 4099095.0 / 117440512.0 * e14 + 26801775.0 / 469762048.0 * e16
|
173
|
+
g = 3003 / 2097152.0 * e12 + 315315.0 / 58720256.0 * e14 + 11486475.0 / 939524096.0 * e16
|
174
|
+
h = 45045.0 / 117440512.0 * e14 + 765765.0 / 469762048.0 * e16
|
175
|
+
i = 765765.0 / 7516192768.0 * e16
|
176
|
+
|
177
|
+
meridian = GRS80_ER * (1.0 - e2) * (a * lat_rad -
|
178
|
+
b * Math.sin(lat_rad * 2.0) / 2.0 +
|
179
|
+
c * Math.sin(lat_rad * 4.0) / 4.0 -
|
180
|
+
d * Math.sin(lat_rad * 6.0) / 6.0 +
|
181
|
+
e * Math.sin(lat_rad * 8.0) / 8.0 -
|
182
|
+
f * Math.sin(lat_rad * 10.0) / 10.0 +
|
183
|
+
g * Math.sin(lat_rad * 12.0) / 12.0 -
|
184
|
+
h * Math.sin(lat_rad * 14.0) / 14.0 +
|
185
|
+
i * Math.sin(lat_rad * 16.0) / 16.0)
|
186
|
+
meridian
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
metadata
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: japan_plane_rectangular
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- dash14
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-02-17 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.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- dash14.ack@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- Gemfile
|
64
|
+
- LICENSE
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- bin/console
|
68
|
+
- bin/setup
|
69
|
+
- japan_plane_rectangular.gemspec
|
70
|
+
- lib/japan_plane_rectangular.rb
|
71
|
+
- lib/japan_plane_rectangular/constants.rb
|
72
|
+
- lib/japan_plane_rectangular/functions.rb
|
73
|
+
- lib/japan_plane_rectangular/version.rb
|
74
|
+
homepage: https://github.com/dash14/ruby-japan-plane-rectangular
|
75
|
+
licenses: []
|
76
|
+
metadata: {}
|
77
|
+
post_install_message:
|
78
|
+
rdoc_options: []
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project:
|
93
|
+
rubygems_version: 2.6.13
|
94
|
+
signing_key:
|
95
|
+
specification_version: 4
|
96
|
+
summary: Conversion between WGS and Japan plane rectangular CS
|
97
|
+
test_files: []
|