rgeo-geojson 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +29 -0
- data/lib/rgeo/geo_json/coder.rb +0 -36
- data/lib/rgeo/geo_json/entities.rb +0 -36
- data/lib/rgeo/geo_json/interface.rb +0 -36
- data/lib/rgeo/geo_json/version.rb +1 -52
- data/lib/rgeo/geo_json.rb +0 -37
- data/lib/rgeo-geojson.rb +0 -35
- data/test/{tc_basic.rb → basic_test.rb} +4 -41
- metadata +66 -31
- data/History.rdoc +0 -19
- data/README.rdoc +0 -104
- data/Version +0 -1
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f03a9ed7960db6dc2eee2b24498f1dcfab817bec
|
4
|
+
data.tar.gz: fb4db35db82d544cc5436f4a3264408be0d3a5dd
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 388bda1f4cff81bd0fd2efe4dd61ae4e85ec3ac6c9e1abc7785b917e819b0fe2361775e2cec9ce1eb71ae2f94c8fb922bbc5b016af59fc3db3c8d75c939485da
|
7
|
+
data.tar.gz: 9b7b2f9f61b3749237fbe27667bc902ce2cc89b87a01b9daff0c8f789bc4a39b340d288a4d09eb614c88da564fcd3eccd09af1bd4b9b66aa34aad8b1944a275c
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# -----------------------------------------------------------------------------
|
2
|
+
# Copyright 2014 Daniel Azuma
|
3
|
+
#
|
4
|
+
# All rights reserved.
|
5
|
+
#
|
6
|
+
# Redistribution and use in source and binary forms, with or without
|
7
|
+
# modification, are permitted provided that the following conditions are met:
|
8
|
+
#
|
9
|
+
# * Redistributions of source code must retain the above copyright notice,
|
10
|
+
# this list of conditions and the following disclaimer.
|
11
|
+
# * Redistributions in binary form must reproduce the above copyright notice,
|
12
|
+
# this list of conditions and the following disclaimer in the documentation
|
13
|
+
# and/or other materials provided with the distribution.
|
14
|
+
# * Neither the name of the copyright holder, nor the names of any other
|
15
|
+
# contributors to this software, may be used to endorse or promote products
|
16
|
+
# derived from this software without specific prior written permission.
|
17
|
+
#
|
18
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
19
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
20
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
21
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
22
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
23
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
24
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
25
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
26
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
27
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
# -----------------------------------------------------------------------------
|
data/lib/rgeo/geo_json/coder.rb
CHANGED
@@ -1,39 +1,3 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# GeoJSON encoder object
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
|
-
|
37
1
|
module RGeo
|
38
2
|
|
39
3
|
module GeoJSON
|
@@ -1,39 +1,3 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# GeoJSON standard entities
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
|
-
|
37
1
|
module RGeo
|
38
2
|
|
39
3
|
module GeoJSON
|
@@ -1,39 +1,3 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# GeoJSON toplevel interface
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
|
-
|
37
1
|
module RGeo
|
38
2
|
|
39
3
|
module GeoJSON
|
@@ -1,56 +1,5 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# Version of rgeo-geojson
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
|
-
|
37
|
-
begin
|
38
|
-
require 'versionomy'
|
39
|
-
rescue ::LoadError
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
1
|
module RGeo
|
44
|
-
|
45
2
|
module GeoJSON
|
46
|
-
|
47
|
-
# Current version of RGeo::GeoJSON as a frozen string
|
48
|
-
VERSION_STRING = ::File.read(::File.dirname(__FILE__)+'/../../../Version').strip.freeze
|
49
|
-
|
50
|
-
# Current version of RGeo::GeoJSON as a Versionomy object, if the
|
51
|
-
# Versionomy gem is available; otherwise equal to VERSION_STRING.
|
52
|
-
VERSION = defined?(::Versionomy) ? ::Versionomy.parse(VERSION_STRING) : VERSION_STRING
|
53
|
-
|
3
|
+
VERSION = '0.3.0'.freeze
|
54
4
|
end
|
55
|
-
|
56
5
|
end
|
data/lib/rgeo/geo_json.rb
CHANGED
@@ -1,40 +1,3 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# GeoJSON implementation for RGeo
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
|
-
|
37
|
-
# Dependencies
|
38
1
|
require 'rgeo'
|
39
2
|
|
40
3
|
|
data/lib/rgeo-geojson.rb
CHANGED
@@ -1,36 +1 @@
|
|
1
|
-
# -----------------------------------------------------------------------------
|
2
|
-
#
|
3
|
-
# GeoJSON implementation for RGeo
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
1
|
require 'rgeo/geo_json'
|
@@ -1,48 +1,11 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
# Tests for basic GeoJSON usage
|
4
|
-
#
|
5
|
-
# -----------------------------------------------------------------------------
|
6
|
-
# Copyright 2010-2012 Daniel Azuma
|
7
|
-
#
|
8
|
-
# All rights reserved.
|
9
|
-
#
|
10
|
-
# Redistribution and use in source and binary forms, with or without
|
11
|
-
# modification, are permitted provided that the following conditions are met:
|
12
|
-
#
|
13
|
-
# * Redistributions of source code must retain the above copyright notice,
|
14
|
-
# this list of conditions and the following disclaimer.
|
15
|
-
# * Redistributions in binary form must reproduce the above copyright notice,
|
16
|
-
# this list of conditions and the following disclaimer in the documentation
|
17
|
-
# and/or other materials provided with the distribution.
|
18
|
-
# * Neither the name of the copyright holder, nor the names of any other
|
19
|
-
# contributors to this software, may be used to endorse or promote products
|
20
|
-
# derived from this software without specific prior written permission.
|
21
|
-
#
|
22
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
23
|
-
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
24
|
-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
25
|
-
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
26
|
-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
27
|
-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28
|
-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29
|
-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30
|
-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31
|
-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32
|
-
# POSSIBILITY OF SUCH DAMAGE.
|
33
|
-
# -----------------------------------------------------------------------------
|
34
|
-
;
|
35
|
-
|
36
|
-
|
37
|
-
require 'test/unit'
|
1
|
+
require 'minitest/autorun'
|
38
2
|
require 'rgeo/geo_json'
|
39
3
|
|
40
|
-
|
41
4
|
module RGeo
|
42
5
|
module GeoJSON
|
43
6
|
module Tests # :nodoc:
|
44
7
|
|
45
|
-
class
|
8
|
+
class BasicTest < Minitest::Test # :nodoc:
|
46
9
|
|
47
10
|
|
48
11
|
def setup
|
@@ -55,7 +18,7 @@ module RGeo
|
|
55
18
|
|
56
19
|
|
57
20
|
def test_has_version
|
58
|
-
|
21
|
+
refute_nil(::RGeo::GeoJSON::VERSION)
|
59
22
|
end
|
60
23
|
|
61
24
|
|
@@ -226,7 +189,7 @@ module RGeo
|
|
226
189
|
'properties' => nil,
|
227
190
|
}
|
228
191
|
obj_ = ::RGeo::GeoJSON.decode(json_, :geo_factory => @geo_factory)
|
229
|
-
|
192
|
+
refute_nil(obj_)
|
230
193
|
assert_nil(obj_.geometry)
|
231
194
|
assert_equal({}, obj_.properties)
|
232
195
|
end
|
metadata
CHANGED
@@ -1,76 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rgeo-geojson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
- Daniel Azuma
|
7
|
+
- Daniel Azuma, Tee Parham
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rgeo
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.3
|
19
|
+
version: '0.3'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.3
|
26
|
+
version: '0.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.6'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.6'
|
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.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.3'
|
30
69
|
description: RGeo is a geospatial data library for Ruby. RGeo::GeoJSON is an optional
|
31
70
|
RGeo module providing GeoJSON encoding and decoding services. This module can be
|
32
71
|
used to communicate with location-based web services that understand the GeoJSON
|
33
72
|
format.
|
34
|
-
email: dazuma@gmail.com
|
73
|
+
email: dazuma@gmail.com, parhameter@gmail.com
|
35
74
|
executables: []
|
36
75
|
extensions: []
|
37
|
-
extra_rdoc_files:
|
38
|
-
- History.rdoc
|
39
|
-
- README.rdoc
|
76
|
+
extra_rdoc_files: []
|
40
77
|
files:
|
78
|
+
- LICENSE.txt
|
79
|
+
- lib/rgeo-geojson.rb
|
80
|
+
- lib/rgeo/geo_json.rb
|
41
81
|
- lib/rgeo/geo_json/coder.rb
|
42
82
|
- lib/rgeo/geo_json/entities.rb
|
43
83
|
- lib/rgeo/geo_json/interface.rb
|
44
84
|
- lib/rgeo/geo_json/version.rb
|
45
|
-
-
|
46
|
-
|
47
|
-
- test/tc_basic.rb
|
48
|
-
- History.rdoc
|
49
|
-
- README.rdoc
|
50
|
-
- Version
|
51
|
-
homepage: http://virtuoso.rubyforge.org/rgeo-geojson
|
85
|
+
- test/basic_test.rb
|
86
|
+
homepage: http://github.com/rgeo/rgeo-geojson
|
52
87
|
licenses: []
|
88
|
+
metadata: {}
|
53
89
|
post_install_message:
|
54
90
|
rdoc_options: []
|
55
91
|
require_paths:
|
56
92
|
- lib
|
57
93
|
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
94
|
requirements:
|
60
|
-
- -
|
95
|
+
- - ">="
|
61
96
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.
|
97
|
+
version: 1.9.3
|
63
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
-
none: false
|
65
99
|
requirements:
|
66
|
-
- -
|
100
|
+
- - ">="
|
67
101
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
102
|
+
version: '0'
|
69
103
|
requirements: []
|
70
|
-
rubyforge_project:
|
71
|
-
rubygems_version:
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.2.2
|
72
106
|
signing_key:
|
73
|
-
specification_version:
|
107
|
+
specification_version: 4
|
74
108
|
summary: An RGeo module providing GeoJSON encoding and decoding.
|
75
109
|
test_files:
|
76
|
-
- test/
|
110
|
+
- test/basic_test.rb
|
111
|
+
has_rdoc:
|
data/History.rdoc
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
=== 0.2.3 / 2012-03-17
|
2
|
-
|
3
|
-
* Returns nil from the encode method if nil is passed in. (Suggestion by Pete Deffendol.)
|
4
|
-
|
5
|
-
=== 0.2.2 / 2012-01-09
|
6
|
-
|
7
|
-
* Fixed Feature#property(:symbol). (Reported by Andy Allan.)
|
8
|
-
* Added an "rgeo-geojson.rb" wrapper so bundler's auto-require will work without modification. (Reported by Mauricio Pasquier Juan.)
|
9
|
-
|
10
|
-
=== 0.2.1 / 2011-04-11
|
11
|
-
|
12
|
-
* The gem version is now accessible via an api.
|
13
|
-
* A .gemspec file is now available for gem building and bundler git integration.
|
14
|
-
|
15
|
-
=== 0.2.0 / 2010-12-07
|
16
|
-
|
17
|
-
* Initial public alpha release. Spun rgeo-geojson off from the core rgeo gem.
|
18
|
-
|
19
|
-
For earlier history, see the History file for the rgeo gem.
|
data/README.rdoc
DELETED
@@ -1,104 +0,0 @@
|
|
1
|
-
== RGeo::GeoJSON
|
2
|
-
|
3
|
-
RGeo::GeoJSON is an optional module for {RGeo}[http://github.com/dazuma/rgeo]
|
4
|
-
that provides GeoJSON encoding and decoding services.
|
5
|
-
|
6
|
-
=== Summary
|
7
|
-
|
8
|
-
\RGeo is a key component for writing location-aware applications in the
|
9
|
-
Ruby programming language. At its core is an implementation of the
|
10
|
-
industry standard OGC Simple Features Specification, which provides data
|
11
|
-
representations of geometric objects such as points, lines, and polygons,
|
12
|
-
along with a set of geometric analysis operations. See the README for the
|
13
|
-
"rgeo" gem for more information.
|
14
|
-
|
15
|
-
RGeo::GeoJSON is an optional \RGeo add-on module that provides GeoJSON
|
16
|
-
encoding and decoding services. GeoJSON is an emerging standard format
|
17
|
-
used by many web services that need to communicate geospatial data. See
|
18
|
-
http://www.geojson.com for more information.
|
19
|
-
|
20
|
-
Example:
|
21
|
-
|
22
|
-
require 'rgeo/geo_json'
|
23
|
-
|
24
|
-
str1 = '{"type":"Point","coordinates":[1,2]}'
|
25
|
-
geom = RGeo::GeoJSON.decode(str1, :json_parser => :json)
|
26
|
-
geom.as_text # => "POINT(1.0 2.0)"
|
27
|
-
|
28
|
-
str2 = '{"type":"Feature","geometry":{"type":"Point","coordinates":[2.5,4.0]},"properties":{"color":"red"}}'
|
29
|
-
feature = RGeo::GeoJSON.decode(str2, :json_parser => :json)
|
30
|
-
feature['color'] # => 'red'
|
31
|
-
feature.geometry.as_text # => "POINT(2.5 4.0)"
|
32
|
-
|
33
|
-
hash = RGeo::GeoJSON.encode(feature)
|
34
|
-
hash.to_json == str2 # => true
|
35
|
-
|
36
|
-
=== Installation
|
37
|
-
|
38
|
-
RGeo::GeoJSON has the following requirements:
|
39
|
-
|
40
|
-
* Ruby 1.8.7 or later. Ruby 1.9.2 or later preferred.
|
41
|
-
* rgeo 0.3.7 or later.
|
42
|
-
* If you are using Ruby 1.8, you should install the "json" gem to support
|
43
|
-
parsing JSON strings. Ruby 1.9 has JSON support in its standard library
|
44
|
-
and does not require the gem.
|
45
|
-
|
46
|
-
Install RGeo::GeoJSON as a gem:
|
47
|
-
|
48
|
-
gem install rgeo
|
49
|
-
gem install rgeo-geojson
|
50
|
-
|
51
|
-
See the README for the "rgeo" gem, a required dependency, for further
|
52
|
-
installation information.
|
53
|
-
|
54
|
-
=== To-do list
|
55
|
-
|
56
|
-
* Add support for the "bbox" and "crs" elements.
|
57
|
-
|
58
|
-
=== Development and support
|
59
|
-
|
60
|
-
Documentation is available at http://virtuoso.rubyforge.org/rgeo-geojson/README_rdoc.html
|
61
|
-
|
62
|
-
Source code is hosted on Github at http://github.com/dazuma/rgeo-geojson
|
63
|
-
|
64
|
-
Contributions are welcome. Fork the project on Github.
|
65
|
-
|
66
|
-
Report bugs on Github issues at http://github.org/dazuma/rgeo-geojson/issues
|
67
|
-
|
68
|
-
Contact the author at dazuma at gmail dot com.
|
69
|
-
|
70
|
-
=== Acknowledgments
|
71
|
-
|
72
|
-
\RGeo is written by Daniel Azuma (http://www.daniel-azuma.com).
|
73
|
-
|
74
|
-
Development is supported by Pirq. (http://www.pirq.com).
|
75
|
-
|
76
|
-
=== License
|
77
|
-
|
78
|
-
Copyright 2010-2012 Daniel Azuma
|
79
|
-
|
80
|
-
All rights reserved.
|
81
|
-
|
82
|
-
Redistribution and use in source and binary forms, with or without
|
83
|
-
modification, are permitted provided that the following conditions are met:
|
84
|
-
|
85
|
-
* Redistributions of source code must retain the above copyright notice,
|
86
|
-
this list of conditions and the following disclaimer.
|
87
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
88
|
-
this list of conditions and the following disclaimer in the documentation
|
89
|
-
and/or other materials provided with the distribution.
|
90
|
-
* Neither the name of the copyright holder, nor the names of any other
|
91
|
-
contributors to this software, may be used to endorse or promote products
|
92
|
-
derived from this software without specific prior written permission.
|
93
|
-
|
94
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
95
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
96
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
97
|
-
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
98
|
-
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
99
|
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
100
|
-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
101
|
-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
102
|
-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
103
|
-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
104
|
-
POSSIBILITY OF SUCH DAMAGE.
|
data/Version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.2.3
|