to_wkt_ 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +29 -0
- data/lib/to_wkt_.rb +3 -3
- data/lib/to_wkt_/version.rb +1 -1
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dd7ab33c8624f71b9abbabe6adbe6807711229f
|
4
|
+
data.tar.gz: 8aa13f5c103f66a15da38287c532e6336e1d4364
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b570d0fa95283c6c29efc460cfb549fca284f2ce3b6f6ba7acc3db067ae75087d47a5c5d072c4509816ecc003a994d118fe9dfbfc662cdb0fb2b3c05c53044fb
|
7
|
+
data.tar.gz: 72c697ebdb31e8cddffe974c938cf9f6d8dcc9d15f5fd91b761ad6ff3f69e06cae8a96cb58931383ac5aed21da9e9c637a38fbec5ade8adb076d028b5e4cd2ca
|
data/README.md
CHANGED
@@ -77,6 +77,35 @@ ToWkt automatically exposes the following methods on any instance of `Array`:
|
|
77
77
|
|
78
78
|
## Contributing
|
79
79
|
|
80
|
+
### ToDos
|
81
|
+
|
82
|
+
WKT specs contain 18 different geometries; right now only 6 are implemented in **to_wkt_**.
|
83
|
+
|
84
|
+
- Implemented
|
85
|
+
- Point
|
86
|
+
- LineString
|
87
|
+
- Polygon
|
88
|
+
- MultiPoint
|
89
|
+
- MultiLineString
|
90
|
+
- MultiPolygon
|
91
|
+
- **Not Implemented**
|
92
|
+
- Geometry
|
93
|
+
- Triangle
|
94
|
+
- CircularString
|
95
|
+
- Curve
|
96
|
+
- MultiCurve
|
97
|
+
- CompoundCurve
|
98
|
+
- CurvePolygon
|
99
|
+
- Surface
|
100
|
+
- MultiSurface
|
101
|
+
- PolyhedralSurface
|
102
|
+
- TIN
|
103
|
+
- GeometryCollection
|
104
|
+
|
105
|
+
Some of these will be easier to implement than others.
|
106
|
+
|
107
|
+
### How to Contribute
|
108
|
+
|
80
109
|
1. Fork it
|
81
110
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
82
111
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
data/lib/to_wkt_.rb
CHANGED
@@ -7,12 +7,12 @@ module ToWkt
|
|
7
7
|
adapter.array_to_wkt(self, type)
|
8
8
|
end
|
9
9
|
|
10
|
-
Adapter::WKT_TYPES.each do |type|
|
11
|
-
define_method( "to_wkt_#{type}".to_sym ) do
|
10
|
+
Adapter::WKT_TYPES.each do |type|
|
11
|
+
define_method( "to_wkt_#{type}".to_sym ) do
|
12
12
|
to_wkt(type)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
end
|
17
17
|
|
18
|
-
Array.include
|
18
|
+
Array.send(:include, ToWkt)
|
data/lib/to_wkt_/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: to_wkt_
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steven Dunlap
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,10 +114,16 @@ summary: "# to_wkt_ Quickly and easily convert arrays to [Well-Known Text (WKT
|
|
114
114
|
[[1,1], [2,1], [2,2], [1,2], [1,1]] ], [ [[-1,-1], [-1,-2], [-2,-2], [-2,-1], [-1,-1]]
|
115
115
|
] ] multi_polygon_array.to_wkt_multi_polygon= \"MULTIPOLYGON(((0 0,4 0,4 4,0 4,0
|
116
116
|
0),(1 1,2 1,2 2,1 2,1 1)),((-1 -1,-1 -2,-2 -2,-2 -1,-1 -1)))\" ``` ## Contributing
|
117
|
-
\
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
\ ### ToDos WKT specs contain 18 different geometries; right now only 6 are implemented
|
118
|
+
in **to_wkt_**. - Implemented - Point - LineString - Polygon - MultiPoint - MultiLineString
|
119
|
+
- MultiPolygon - **Not Implemented** - Geometry - Triangle - CircularString - Curve
|
120
|
+
- MultiCurve - CompoundCurve - CurvePolygon - Surface - MultiSurface - PolyhedralSurface
|
121
|
+
- TIN - GeometryCollection Some of these will be easier to implement than others.
|
122
|
+
\ ### How to Contribute 1. Fork it 2. Create your feature branch (`git checkout
|
123
|
+
-b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`)
|
124
|
+
4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
|
125
|
+
\ [Well-Known Text (WKT)]: http://en.wikipedia.org/wiki/Well-known_text [PostGIS]:
|
126
|
+
http://postgis.refractions.net/documentation/manual-1.3SVN/ch04.html#id2726203"
|
121
127
|
test_files:
|
122
128
|
- spec/array.rb
|
123
129
|
- spec/spec_helper.rb
|