npm install
node bench.js 10 100
moved to https://github.com/springmeyer/campus-map-tech so that pull requests and comments are better
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>External Layers</title> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.2/mapbox.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.2/mapbox.css' rel='stylesheet' /> |
When reading from the cdfadmin13_1_unit
layer of cdfadmin13_1.gdb
with OpenFileGDB driver and setting a SetSpatialFilterRect
from Mapnik I'm seeing not all shapes returned. The incorrect.png
demostrates this. It should be a solid red color, but instead some polygons are missing and the shapefile underneath renders green and shows through.
Data from: http://frap.cdf.ca.gov/data/statewide/cdfadmin13_1.zip downloaded from http://frap.cdf.ca.gov/data/frapgisdata-sw-cdfadmin13_1_download.php
I found:
SetSpatialFilterRect
works around the problem (produces no_filter.png
below)Process: node [44234] | |
Path: /Users/USER/*/node | |
Identifier: node | |
Version: ??? | |
Code Type: X86-64 (Native) | |
Parent Process: node [44233] | |
Responsible: Terminal [16998] | |
User ID: 501 | |
Date/Time: 2014-04-10 09:18:45.498 -0400 |
<Map srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"> | |
<Style name="ellipse"> | |
<Rule> | |
<MarkersSymbolizer | |
width="240" | |
height="240" | |
fill="steelblue" | |
fill-opacity=".7" | |
stroke="yellow" | |
stroke-width="16" |
Process: Python [10242] | |
Path: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python | |
Identifier: Python | |
Version: 2.7.5 (2.7.5) | |
Code Type: X86-64 (Native) | |
Parent Process: sh [10221] | |
Responsible: Terminal [78893] | |
User ID: 501 | |
PlugIn Path: /opt/mapnik/*/_mapnik.so |
Visual rendering: 19 failed / 776 passed | |
1) 1104 different pixels: | |
/tmp/mapnik-visual-images/image-filters-multi-blur-inflate-512-512-1.0-agg.png (actual) | |
tests/visual_tests/images/image-filters-multi-blur-inflate-512-512-1.0-agg-reference.png (expected) | |
2) 180 different pixels: | |
/tmp/mapnik-visual-images/image-filters-multi-blur-inflate-512-512-2.0-agg.png (actual) | |
tests/visual_tests/images/image-filters-multi-blur-inflate-512-512-2.0-agg-reference.png (expected) | |
3) 68 different pixels: | |
/tmp/mapnik-visual-images/lines-5-800-800-1.0-agg.png (actual) | |
tests/visual_tests/images/lines-5-800-800-1.0-agg-reference.png (expected) |
Results in a massive dx2
value which breaks return values for dx
and dy
:
Output is:
$ ./calc-intersection-test
m_width * (v1.y - v0.y): 0.200000000023408
m_width * (v2.y - v1.y): 0.300000000000018
dx2: 9771986970684.640625000000000
1 9771986970692.2246093750000000 8934388088183.3027343750000000
diff --git a/deps/agg/src/agg_vcgen_stroke.cpp b/deps/agg/src/agg_vcgen_stroke.cpp | |
index 3ee336f..f00014f 100644 | |
--- a/deps/agg/src/agg_vcgen_stroke.cpp | |
+++ b/deps/agg/src/agg_vcgen_stroke.cpp | |
@@ -20,6 +20,7 @@ | |
#include "agg_vcgen_stroke.h" | |
#include "agg_shorten_path.h" | |
+const static double eps = 1e-2; | |
namespace agg |