simpler-tiles 0.3.0 → 0.3.1
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 +4 -4
- data/ext/simpler_tiles/extconf.rb +2 -2
- data/index.erb +5 -1
- data/lib/simpler_tiles/version.rb +1 -1
- data/simpler-tiles.gemspec +0 -1
- data/test/helper.rb +1 -2
- data/test/test_map.rb +50 -51
- data/test/test_simpler_tiles.rb +3 -3
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14f695bb3124878c0dbefa1f154bae38a8cbeda3
|
4
|
+
data.tar.gz: 0aae7f6992bf7a64c8c25cfc9f6bb4c54760dadf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8074447dd3feda8e603e41a24789c58286a6512f9f0aa76936ddf36f88c754a4c23469afc2c44502ade99947a21a7fc44e6e9ca14c4ea82a243d0b64bf8c711
|
7
|
+
data.tar.gz: aaf4c4da3541b23bac13f38b2cec7762b77b40efcd8b1f2c932003da0392aec8215be8cb7d72d891cd8fdd0c1408d34998df0a0a8e2a39528a62c71ed086d192
|
@@ -6,8 +6,8 @@ ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
|
|
6
6
|
LIBDIR = RbConfig::CONFIG['libdir']
|
7
7
|
INCLUDEDIR = RbConfig::CONFIG['includedir']
|
8
8
|
|
9
|
-
$CFLAGS << " #{ENV["CFLAGS"]}" << `pkg-config --cflags simple-tiles`.chomp << `gdal-config --cflags`.chomp
|
10
|
-
$LIBS << " #{ENV["LIBS"]}" << `pkg-config --libs simple-tiles`.chomp << `gdal-config --libs
|
9
|
+
$CFLAGS << " #{ENV["CFLAGS"]}" << " " + `pkg-config --cflags simple-tiles`.chomp << " " + `gdal-config --cflags`.chomp
|
10
|
+
$LIBS << " #{ENV["LIBS"]}" << " " + `pkg-config --libs simple-tiles`.chomp << " " + `gdal-config --libs`.chomp
|
11
11
|
|
12
12
|
HEADER_DIRS = [
|
13
13
|
'/usr/local/include',
|
data/index.erb
CHANGED
@@ -469,6 +469,10 @@ CODE
|
|
469
469
|
<h2>Change Log</h2>
|
470
470
|
|
471
471
|
<dl>
|
472
|
+
<dd><b>0.3.1</b> — Februrary 15th, 2015</dd>
|
473
|
+
<dt>Fix build bugs.</dt>
|
474
|
+
<dd><b>0.3.0</b> — Februrary 15th, 2015</dd>
|
475
|
+
<dt>Added lanczos resampling.</dt>
|
472
476
|
<dd><b>0.2.1</b> — June 21st, 2014</dd>
|
473
477
|
<dt>Added raster support. (thanks <a href="http://github.com/ashaw">Al Shaw</a>)</dt>
|
474
478
|
<dd><b>0.1.1</b> — February, 10th 2014</dd>
|
@@ -500,7 +504,7 @@ CODE
|
|
500
504
|
<h2>License</h2>
|
501
505
|
|
502
506
|
<pre>
|
503
|
-
Copyright (c)
|
507
|
+
Copyright (c) 2015, ProPublica
|
504
508
|
|
505
509
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
506
510
|
of this software and associated documentation files (the "Software"), to deal
|
data/simpler-tiles.gemspec
CHANGED
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency(%q<rake-compiler>, [">= 0"])
|
26
26
|
s.add_development_dependency(%q<bundler>, [">= 1.5.0"])
|
27
27
|
s.add_development_dependency(%q<minitest>, ["~> 4.0.0"])
|
28
|
-
s.add_development_dependency(%q<shoulda>, ["~> 3.5.0"])
|
29
28
|
s.add_development_dependency(%q<yard>, ["~> 0.8.0"])
|
30
29
|
s.add_development_dependency(%q<pygmentize>, ["~> 0.0.3"])
|
31
30
|
end
|
data/test/helper.rb
CHANGED
data/test/test_map.rb
CHANGED
@@ -1,67 +1,66 @@
|
|
1
1
|
require "#{File.join(File.dirname(__FILE__))}/helper"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
8
|
-
|
9
|
-
should "accept block parameters on initialization" do
|
10
|
-
map = SimplerTiles::Map.new do |m|
|
11
|
-
m.width = 500
|
12
|
-
m.height = 500
|
13
|
-
end
|
3
|
+
describe SimplerTiles::Map do
|
4
|
+
before do
|
5
|
+
@map = SimplerTiles::Map.new
|
6
|
+
end
|
14
7
|
|
15
|
-
|
16
|
-
|
8
|
+
it "should accept block parameters on initialization" do
|
9
|
+
map = SimplerTiles::Map.new do |m|
|
10
|
+
m.width = 500
|
11
|
+
m.height = 500
|
17
12
|
end
|
18
13
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
assert_equal(@map.srs, srs)
|
23
|
-
end
|
14
|
+
assert_equal(map.width, 500)
|
15
|
+
assert_equal(map.height, 500)
|
16
|
+
end
|
24
17
|
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
it "should set projection" do
|
19
|
+
srs = "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ";
|
20
|
+
@map.srs = srs
|
21
|
+
assert_equal(@map.srs, srs)
|
22
|
+
end
|
28
23
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
24
|
+
it "should test validity" do
|
25
|
+
assert_equal @map.valid?, false
|
26
|
+
end
|
33
27
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
28
|
+
it "should set slippy" do
|
29
|
+
@map.slippy(0, 0, 1)
|
30
|
+
assert_equal @map.width, 256
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should raise error when invalid" do
|
34
|
+
map = SimplerTiles::Map.new do |m|
|
35
|
+
m.srs = "+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs"
|
36
|
+
m.set_bounds -179.231086, 17.831509, -100.859681, 71.441059
|
37
|
+
m.set_size 256, 256
|
38
|
+
m.layer "#{File.dirname(__FILE__)}/../data/tl_2010_us_state10.shp" do |l|
|
39
|
+
l.query "SELECT * from tl_2010_us_state10_error_error" do |q|
|
40
|
+
q.styles 'fill' => "#061F3799",
|
41
|
+
'line-join' => "round",
|
42
|
+
'line-cap' => "square",
|
43
|
+
'seamless' => "true"
|
46
44
|
end
|
47
45
|
end
|
48
|
-
assert_raises RuntimeError do
|
49
|
-
map.to_png
|
50
|
-
end
|
51
46
|
end
|
52
|
-
|
53
|
-
|
54
|
-
should "return bounds" do
|
55
|
-
map = SimplerTiles::Map.new do |m|
|
56
|
-
m.slippy 0, 0, 1
|
57
|
-
end
|
58
|
-
map.buffer = 1000
|
47
|
+
assert_raises RuntimeError do
|
48
|
+
map.to_png
|
59
49
|
end
|
50
|
+
end
|
60
51
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
52
|
+
#TODO: transform to real test
|
53
|
+
it "should return bounds" do
|
54
|
+
map = SimplerTiles::Map.new do |m|
|
55
|
+
m.slippy 0, 0, 1
|
65
56
|
end
|
57
|
+
map.buffer = 1000
|
58
|
+
end
|
59
|
+
|
60
|
+
it "should set and get bgcolor" do
|
61
|
+
color = "#cc0000"
|
62
|
+
@map.bgcolor = color
|
63
|
+
assert_equal @map.bgcolor, color
|
66
64
|
end
|
67
65
|
end
|
66
|
+
|
data/test/test_simpler_tiles.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "#{File.join(File.dirname(__FILE__))}/helper"
|
2
2
|
|
3
|
-
|
4
|
-
should
|
3
|
+
describe SimplerTiles do
|
4
|
+
it "should produce a png image" do
|
5
5
|
map = SimplerTiles::Map.new do |m|
|
6
6
|
# m.bgcolor = "#000000"
|
7
7
|
m.srs = "EPSG:32614"
|
@@ -32,7 +32,7 @@ class TestSimplerTiles < Test::Unit::TestCase
|
|
32
32
|
end
|
33
33
|
|
34
34
|
|
35
|
-
should
|
35
|
+
it "should not crash with memory errors" do
|
36
36
|
GC.disable
|
37
37
|
t = 10.times.map do
|
38
38
|
Thread.new do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simpler-tiles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Larson
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 4.0.0
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: shoulda
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 3.5.0
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 3.5.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: yard
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
148
|
version: '0'
|
163
149
|
requirements: []
|
164
150
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.4.5
|
166
152
|
signing_key:
|
167
153
|
specification_version: 4
|
168
154
|
summary: A set of ruby bindings for the Simple Tiles mapping library.
|