From fb224be470beead0aa35ba2c994b61a57fd3ad45 Mon Sep 17 00:00:00 2001
From: Wilkins
Date: Wed, 27 Jan 2016 14:26:10 +0100
Subject: [PATCH 01/25] Initiating Jasmine tests with Grunt & Travis
---
.gitignore | 2 ++
Gruntfile.js | 37 +++++++++++++++++++++++++++++++++++++
dist/app.min.js | 2 +-
dist/i18n.min.js | 2 +-
package.json | 6 +++++-
src/i18n.js | 2 +-
tests/formatSpec.js | 39 +++++++++++++++++++++++++++++++++++++++
7 files changed, 86 insertions(+), 4 deletions(-)
create mode 100644 tests/formatSpec.js
diff --git a/.gitignore b/.gitignore
index f7a1096..37b71f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,5 @@ vendor/jquery-autocomplete/*
vendor/i18next/*
css/.sass-cache
*.swp
+.grunt
+_SpecRunner.html
diff --git a/Gruntfile.js b/Gruntfile.js
index 5c84a6d..0766929 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -113,6 +113,39 @@ grunt.initConfig({
//,dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.css'
}
},
+ jasmine: {
+ components: {
+ src: [
+ /*
+ 'http://code.jquery.com/jquery-1.8.3.min.js',
+ 'src/formats.js',
+ 'src/formats/*js'
+ */
+ 'src/formats.js',
+ 'src/foo.js'
+ ],
+ options: {
+ vendor: [
+ 'http://code.jquery.com/jquery-1.8.3.min.js',
+ 'http://cdn.leafletjs.com/leaflet-0.7/leaflet.js',
+ 'dist/jquery.cookie.min.js',
+ 'dist/togeojson.min.js',
+ 'dist/togpx.min.js',
+ 'dist/pretty-data.min.js',
+ 'dist/tokml.min.js',
+ 'dist/geojson-to-path.min.js',
+ 'dist/leaflet.filelayer.min.js',
+ 'dist/FileSaver.min.js',
+ 'dist/i18next.min.js',
+ 'dist/i18n.min.js',
+ 'node_modules/jasmine-jquery/lib/jasmine-jquery.js'
+ ],
+ specs: 'tests/*.js',
+ keepRunner : true,
+ //helpers: 'test/spec/*.js'
+ }
+ }
+ },
watch: {
css: {
options: { livereload: true },
@@ -141,6 +174,10 @@ grunt.registerTask('default', [
'cssmin',
//'copy'
]);
+grunt.registerTask('travis', [
+ 'jshint', 'jasmine',
+]);
+
require('load-grunt-tasks')(grunt);
diff --git a/dist/app.min.js b/dist/app.min.js
index dfb9abe..dd44a64 100644
--- a/dist/app.min.js
+++ b/dist/app.min.js
@@ -17,6 +17,6 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}
}(document, 'script', 'twitter-wjs');;
function filesizeHuman(a,b){if(0===a)return a;b=b||1;var c=$.t("export.units").split(",");return i=parseInt(Math.floor(Math.log(a)/Math.log(1024))),0===i&&(b=0),(a/Math.pow(1024,i)).toFixed(b)+" "+c[i]}function getPosition(a){for(var b=0,c=0;a;)b+=a.offsetLeft-a.scrollLeft+a.clientLeft,c+=a.offsetTop-a.scrollTop+a.clientTop,a=a.offsetParent;return{x:b,y:c}}function hideAll(){$(".popup").each(function(){$(this).hide()}),hideLanguages()}function chooseDownloadFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#download-formats").css("top",b.y-4),$("#download-formats").show()}function chooseViewFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#view-formats").css("top",b.y-4),$("#view-formats").show(),$("#download-formats").hide()}function GeoJSONFormat(){this.param={key:"geojson",syntax:"json",name:"GeoJSON",extension:"geojson",contenttype:"appplication/json",size_header:45,size_track:110,size_node:22},this.exportData=function(a){return JSON.stringify(a)},this.display=function(a){return prettyData.json(a)}}function GPXFormat(){this.param={key:"gpx",syntax:"xml",name:"GPX",extension:"gpx",contenttype:"application/gpx+xml",size_header:186,size_track:70,size_node:41},this.exportData=function(a){return togpx(a)},this.display=function(a){return prettyData.xml(a)}}function KMLFormat(){this.param={key:"kml",syntax:"xml",name:"KML",extension:"kml",contenttype:"application/vnd.google-earth.kml+xml",size_header:92,size_track:150,size_node:20},this.exportData=function(a){return tokml(a)},this.display=function(a){return prettyData.xml(a)}}function MediawikiFormat(){this.param={key:"mediawiki",syntax:"nohighlight",name:"Mediawiki",extension:"txt",contenttype:"text/plain",size_header:0,size_track:0,size_node:20},this.exportData=function(a){return geojsonToPath(a)}}$("#export-close").on("click",function(){$("#export-format").hide()});var Format=function(){this.param={key:"format",name:"RootFormat"},this.formats=[]};Format.prototype={loadAll:function(a){for(var b=0;b"+b.name+"")}Object.keys(window.Layers).length>0?$(".leaflet-control-switcher-box").show():$(".leaflet-control-switcher-box").hide()}function clearMap(){for(var a in window.Layers)window.Layers[a].remove();window.Layers={},updateLayers()}var LayerOptimizer=function(a){this.id=this.createId(),this.name=a.filename,this.sourceLayer=a.layer,this.size=a.layer.getLayers().length,this.sourceLayerStyle={color:"red",opacity:.7,fillOpacity:.7,weight:5,clickable:!1},this.sourceLayerData=[],this.sourceLayerJSON=[],this.sourceLayerOptions=[],this.sourceLayerNodes=0,this.simplifiedLayerStyle={color:"blue",opacity:1,fillOpacity:1,weight:2,clickable:!1},this.simplifiedLayerData=[],this.simplifiedLayerNodes=0,this.controller=null,this.tolerance=0,this.init()};LayerOptimizer.prototype={init:function(){for(var a,b=[],c=0;c'+f.param.name+' :'+d+"
");$("#size-format").show()},clearInfos:function(){$("#filename").html(""),$("#nodes").html(""),$(".leaflet-control-stats").hide()},clearSizeFormats:function(){$("#size-format").hide()},remove:function(){this.removeLayers(),this.removeController(),this.clearInfos(),this.clearSizeFormats()},removeLayers:function(){for(var a=0;a',L.Control.FileLayerLoad.TITLE=$.t("actions.upload");var b=L.Control.fileLayerLoad({addToMap:!1,fitBounds:!1,fileSizeLimit:8096,binaryFormats:[]}).addTo(a);b.loader.on("data:loaded",function(a){hideAll(),window.currentLayer&&window.currentLayer.removeController();var b=new LayerOptimizer(a);b.choose(),window.Layers[b.id]=b,window.currentLayer=b,updateLayers()}).on("data:error",function(a){console.log("ERROR",a.error)}),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-download leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.download"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",chooseDownloadFormat),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-view leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.view"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",chooseViewFormat),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-erase leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.clear"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",clearMap).on(b,"click",hideAll),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-lang leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.lang"),$(b).addClass("first"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",showLanguage),a},a}().addTo(a),function(){var a=new L.Control({position:"bottomleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-stats");return a.id="stats",a.innerHTML='
',filename$=$("#filename",a),nodes$=$("#nodes",a),a},a}().addTo(a),initLanguage(),L.control.attribution({position:"topright",prefix:'Leaflet • '+$.t("osm.contributors")+""}).addTo(a),function(){var a=new L.Control({position:"topright"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-switcher-box leaflet-bar"),b=L.DomUtil.create("label","",a);b.href="#",b.title=$.t("actions.switchlayer"),b.innerHTML=$.t("layers.switcher");var c=L.DomUtil.create("select","leaflet-control-switcher leaflet-bar",a);return L.DomEvent.on(c,"change",function(){window.currentLayer.removeController(),window.currentLayer=window.Layers[$(this).val()],window.currentLayer.choose()}),a},a}().addTo(a),$("#slider").slider({value:0,min:0,max:.1,step:5e-5,precision:8,tooltip:"hide"}).on("slide",function(a){window.currentLayer.optimize(Math.pow(a.value,2)),window.currentLayer.displayInfos()}).parent().width("100%"),$("#helpbtn").on("click",function(a){a.preventDefault(),$("#modal").modal("show")});var c=$.cookie("tour");(!c||parseInt(c)<3)&&($("#modal").modal("show"),c=(parseInt(c)||0)+1,$.cookie("tour",c,{expires:120}));var d=new Format;window.formats=d,d.loadAll(["GeoJSONFormat","GPXFormat","KMLFormat","MediawikiFormat"]),hljs.initHighlightingOnLoad()});
\ No newline at end of file
diff --git a/dist/i18n.min.js b/dist/i18n.min.js
index 82dde15..511e34c 100644
--- a/dist/i18n.min.js
+++ b/dist/i18n.min.js
@@ -1 +1 @@
-function hideLanguages(){$(".leaflet-control-lang a.lang").each(function(){$(this).hide()})}function switchLanguage(){hideLanguages(),window.location.href="?setLng="+$(this).attr("data-lang").toLowerCase()}function initLanguage(){var a,b=$(".leaflet-control-lang").get(0);for(var c in window.languages)a=L.DomUtil.create("a","",b),a.innerHTML=window.languages[c],a.className="lang",$(a).attr("data-lang",c),L.DomEvent.on(a,"click",switchLanguage.bind(a))}function showLanguage(){hideAll(),$(".leaflet-control-lang a.lang").each(function(){$(this).show()})}$.i18n.init({ns:{namespaces:["ns.special"],defaultNs:"ns.special"},useLocalStorage:!1,getAsync:!1,fallbackLng:"en",debug:!0},function(){$("body").i18n()}),window.languages={En:"English",It:"Italiano",Fr:"Français"};
\ No newline at end of file
+function hideLanguages(){$(".leaflet-control-lang a.lang").each(function(){$(this).hide()})}function switchLanguage(){hideLanguages(),window.location.href="?setLng="+$(this).attr("data-lang").toLowerCase()}function initLanguage(){var a,b=$(".leaflet-control-lang").get(0);for(var c in window.languages)a=L.DomUtil.create("a","",b),a.innerHTML=window.languages[c],a.className="lang",$(a).attr("data-lang",c),L.DomEvent.on(a,"click",switchLanguage.bind(a))}function showLanguage(){hideAll(),$(".leaflet-control-lang a.lang").each(function(){$(this).show()})}$.i18n.init({ns:{namespaces:["ns.special"],defaultNs:"ns.special"},useLocalStorage:!1,getAsync:!1,fallbackLng:"en",debug:!1},function(){$("body").i18n()}),window.languages={En:"English",It:"Italiano",Fr:"Français"};
\ No newline at end of file
diff --git a/package.json b/package.json
index 2b054c6..7d09f39 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,9 @@
"gpx",
"track"
],
+ "scripts": {
+ "test": "grunt travis --verbose"
+ },
"dependencies": {
"leaflet": "*"
},
@@ -35,6 +38,7 @@
"grunt-contrib-sass": "~0.9.2",
"grunt-scss-lint": "~0.3.4",
"jshint-stylish": "~1.0.1",
- "load-grunt-tasks": "~3.1.0"
+ "load-grunt-tasks": "~3.1.0",
+ "grunt-contrib-jasmine": "~1.0.0"
}
}
diff --git a/src/i18n.js b/src/i18n.js
index 1bafae2..5f70cf2 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -5,7 +5,7 @@ $.i18n.init({
// We load in synchronous mode to be able to build the page with i18n text
getAsync: false,
fallbackLng: 'en',
- debug: true
+ debug: false
}, function(t) {
$('body').i18n();
});
diff --git a/tests/formatSpec.js b/tests/formatSpec.js
new file mode 100644
index 0000000..6962544
--- /dev/null
+++ b/tests/formatSpec.js
@@ -0,0 +1,39 @@
+describe('filesizeHuman function', function() {
+ /*
+ var format;
+
+ beforeEach(function() {
+ format = new Format();
+ });
+ */
+
+ it('filesizeHuman converts properly in fr', function() {
+ $.i18n.init({lng:'fr' });
+ expect(filesizeHuman(1000, 0)).toEqual('1000 octets');
+ expect(filesizeHuman(2000, 0)).toEqual('2.0 ko');
+ expect(filesizeHuman(20000, 0)).toEqual('19.5 ko');
+ expect(filesizeHuman(100000, 0)).toEqual('97.7 ko');
+ expect(filesizeHuman(500000, 0)).toEqual('488.3 ko');
+ expect(filesizeHuman(3000000, 0)).toEqual('2.9 Mo');
+ });
+ it('filesizeHuman converts properly in en', function() {
+ $.i18n.init({lng:'en' });
+ expect(filesizeHuman(1000, 0)).toEqual('1000 Bytes');
+ expect(filesizeHuman(2000, 0)).toEqual('2.0 kB');
+ expect(filesizeHuman(20000, 0)).toEqual('19.5 kB');
+ expect(filesizeHuman(100000, 0)).toEqual('97.7 kB');
+ expect(filesizeHuman(500000, 0)).toEqual('488.3 kB');
+ expect(filesizeHuman(3000000, 0)).toEqual('2.9 MB');
+ });
+ it('filesizeHuman converts properly in it', function() {
+ $.i18n.init({lng:'it' });
+ expect(filesizeHuman(1000, 0)).toEqual('1000 Bytes');
+ expect(filesizeHuman(2000, 0)).toEqual('2.0 kB');
+ expect(filesizeHuman(20000, 0)).toEqual('19.5 kB');
+ expect(filesizeHuman(100000, 0)).toEqual('97.7 kB');
+ expect(filesizeHuman(500000, 0)).toEqual('488.3 kB');
+ expect(filesizeHuman(3000000, 0)).toEqual('2.9 MB');
+ });
+});
+
+
From 9616e6893b0de79525c1242fdf532516c7ec55e7 Mon Sep 17 00:00:00 2001
From: Wilkins
Date: Wed, 27 Jan 2016 14:41:11 +0100
Subject: [PATCH 02/25] Changing node version
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 241fff1..e105582 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@
language: node_js
node_js:
- - "0.8"
+ - "0.10"
before_install: npm install -g grunt-cli
install: npm install
script: grunt --verbose --force
From b4d8005c34cf0fdd25ad117d36cdd2cb9b3b1f06 Mon Sep 17 00:00:00 2001
From: Wilkins
Date: Wed, 27 Jan 2016 14:49:04 +0100
Subject: [PATCH 03/25] Using SASS and latest node version
---
.travis.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index e105582..3d4cc28 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,10 @@
language: node_js
node_js:
+ - "0.12"
+ - "0.11"
- "0.10"
-before_install: npm install -g grunt-cli
+before_install:
+ - npm install -g grunt-cli
+ - gem install sass
install: npm install
script: grunt --verbose --force
From 371a61642b9349c8167caf3729db8a34b0372426 Mon Sep 17 00:00:00 2001
From: Wilkins
Date: Wed, 27 Jan 2016 23:46:17 +0100
Subject: [PATCH 04/25] Adding Jasmine tests to Travis build + More tests
---
.travis.yml | 4 ++-
Gruntfile.js | 1 +
README.md | 2 +-
tests/formatSpec.js | 39 ----------------------------
tests/formatsSpec.js | 62 ++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 67 insertions(+), 41 deletions(-)
delete mode 100644 tests/formatSpec.js
create mode 100644 tests/formatsSpec.js
diff --git a/.travis.yml b/.travis.yml
index 3d4cc28..d29c00e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,4 +7,6 @@ before_install:
- npm install -g grunt-cli
- gem install sass
install: npm install
-script: grunt --verbose --force
+script:
+ - grunt --verbose --force
+ - grunt travis --verbose
diff --git a/Gruntfile.js b/Gruntfile.js
index 0766929..ce412b6 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -122,6 +122,7 @@ grunt.initConfig({
'src/formats/*js'
*/
'src/formats.js',
+ 'src/formats/*.js',
'src/foo.js'
],
options: {
diff --git a/README.md b/README.md
index 3032430..b6480fd 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Track Simplifier / Optimizer online
+Track Simplifier / Optimizer online [](https://travis-ci.org/Wilkins/gpx-simplify-optimizer)
============
Online Simplifier and Optimizer for GPX / GeoJSON / KML tracks.
diff --git a/tests/formatSpec.js b/tests/formatSpec.js
deleted file mode 100644
index 6962544..0000000
--- a/tests/formatSpec.js
+++ /dev/null
@@ -1,39 +0,0 @@
-describe('filesizeHuman function', function() {
- /*
- var format;
-
- beforeEach(function() {
- format = new Format();
- });
- */
-
- it('filesizeHuman converts properly in fr', function() {
- $.i18n.init({lng:'fr' });
- expect(filesizeHuman(1000, 0)).toEqual('1000 octets');
- expect(filesizeHuman(2000, 0)).toEqual('2.0 ko');
- expect(filesizeHuman(20000, 0)).toEqual('19.5 ko');
- expect(filesizeHuman(100000, 0)).toEqual('97.7 ko');
- expect(filesizeHuman(500000, 0)).toEqual('488.3 ko');
- expect(filesizeHuman(3000000, 0)).toEqual('2.9 Mo');
- });
- it('filesizeHuman converts properly in en', function() {
- $.i18n.init({lng:'en' });
- expect(filesizeHuman(1000, 0)).toEqual('1000 Bytes');
- expect(filesizeHuman(2000, 0)).toEqual('2.0 kB');
- expect(filesizeHuman(20000, 0)).toEqual('19.5 kB');
- expect(filesizeHuman(100000, 0)).toEqual('97.7 kB');
- expect(filesizeHuman(500000, 0)).toEqual('488.3 kB');
- expect(filesizeHuman(3000000, 0)).toEqual('2.9 MB');
- });
- it('filesizeHuman converts properly in it', function() {
- $.i18n.init({lng:'it' });
- expect(filesizeHuman(1000, 0)).toEqual('1000 Bytes');
- expect(filesizeHuman(2000, 0)).toEqual('2.0 kB');
- expect(filesizeHuman(20000, 0)).toEqual('19.5 kB');
- expect(filesizeHuman(100000, 0)).toEqual('97.7 kB');
- expect(filesizeHuman(500000, 0)).toEqual('488.3 kB');
- expect(filesizeHuman(3000000, 0)).toEqual('2.9 MB');
- });
-});
-
-
diff --git a/tests/formatsSpec.js b/tests/formatsSpec.js
new file mode 100644
index 0000000..9fdbf7d
--- /dev/null
+++ b/tests/formatsSpec.js
@@ -0,0 +1,62 @@
+describe('filesizeHuman function', function() {
+
+ it('filesizeHuman converts properly in fr', function() {
+ $.i18n.init({lng:'fr' });
+ expect(filesizeHuman(1000, 0)).toEqual('1000 octets');
+ expect(filesizeHuman(2000, 0)).toEqual('2.0 ko');
+ expect(filesizeHuman(20000, 0)).toEqual('19.5 ko');
+ expect(filesizeHuman(100000, 0)).toEqual('97.7 ko');
+ expect(filesizeHuman(500000, 0)).toEqual('488.3 ko');
+ expect(filesizeHuman(3000000, 0)).toEqual('2.9 Mo');
+ });
+
+ it('filesizeHuman converts properly in en', function() {
+ $.i18n.init({lng:'en' });
+ expect(filesizeHuman(1000, 0)).toEqual('1000 Bytes');
+ expect(filesizeHuman(2000, 0)).toEqual('2.0 kB');
+ expect(filesizeHuman(20000, 0)).toEqual('19.5 kB');
+ expect(filesizeHuman(100000, 0)).toEqual('97.7 kB');
+ expect(filesizeHuman(500000, 0)).toEqual('488.3 kB');
+ expect(filesizeHuman(3000000, 0)).toEqual('2.9 MB');
+ });
+
+ it('filesizeHuman converts properly in it', function() {
+ $.i18n.init({lng:'it' });
+ expect(filesizeHuman(1000, 0)).toEqual('1000 Bytes');
+ expect(filesizeHuman(2000, 0)).toEqual('2.0 kB');
+ expect(filesizeHuman(20000, 0)).toEqual('19.5 kB');
+ expect(filesizeHuman(100000, 0)).toEqual('97.7 kB');
+ expect(filesizeHuman(500000, 0)).toEqual('488.3 kB');
+ expect(filesizeHuman(3000000, 0)).toEqual('2.9 MB');
+ });
+});
+
+
+describe('Formats', function() {
+ var geojsonData = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-0.580169,44.841228],[-0.42678,45.000941],[-0.426868,45.002157],[-0.602955,45.38455],[-0.603477,45.385947],[-0.589506,45.597002],[-0.589527,45.59825],[-0.667646,45.785438],[-0.667558,45.786107],[-0.558538,45.941167],[-0.558113,45.942187],[-0.510364,46.169241],[-0.509617,46.170379],[-0.299221,46.344348],[-0.299249,46.344476],[-0.407783,46.418584],[-0.409374,46.419001],[-0.664399,46.391373],[-0.665289,46.391522],[-1.073797,46.533238],[-1.074503,46.533726],[-1.13799,46.602358],[-1.138088,46.602591],[-1.166572,46.752703],[-1.16709,46.753447],[-1.560173,47.218559]]}}]};
+
+ it('Converts GeoJSON to GPX properly', function() {
+ var gpxData = '';
+ var format = new GPXFormat();
+ expect(format.exportData(geojsonData)).toEqual(gpxData);
+ });
+
+ it('Converts GeoJSON to Mediawiki properly', function() {
+ var mediawikiData = '44.841228,-0.580169:45.000941,-0.42678:45.002157,-0.426868:45.38455,-0.602955:45.385947,-0.603477:45.597002,-0.589506:45.59825,-0.589527:45.785438,-0.667646:45.786107,-0.667558:45.941167,-0.558538:45.942187,-0.558113:46.169241,-0.510364:46.170379,-0.509617:46.344348,-0.299221:46.344476,-0.299249:46.418584,-0.407783:46.419001,-0.409374:46.391373,-0.664399:46.391522,-0.665289:46.533238,-1.073797:46.533726,-1.074503:46.602358,-1.13799:46.602591,-1.138088:46.752703,-1.166572:46.753447,-1.16709:47.218559,-1.560173';
+ var format = new MediawikiFormat();
+ expect(format.exportData(geojsonData)).toEqual(mediawikiData);
+ });
+
+ it('Converts GeoJSON to KML properly', function() {
+ var kmlData = '-0.580169,44.841228 -0.42678,45.000941 -0.426868,45.002157 -0.602955,45.38455 -0.603477,45.385947 -0.589506,45.597002 -0.589527,45.59825 -0.667646,45.785438 -0.667558,45.786107 -0.558538,45.941167 -0.558113,45.942187 -0.510364,46.169241 -0.509617,46.170379 -0.299221,46.344348 -0.299249,46.344476 -0.407783,46.418584 -0.409374,46.419001 -0.664399,46.391373 -0.665289,46.391522 -1.073797,46.533238 -1.074503,46.533726 -1.13799,46.602358 -1.138088,46.602591 -1.166572,46.752703 -1.16709,46.753447 -1.560173,47.218559';
+ var format = new KMLFormat();
+ expect(format.exportData(geojsonData)).toEqual(kmlData);
+ });
+
+ it('Converts GeoJSON to GeoJSON properly', function() {
+ var newData = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-0.580169,44.841228],[-0.42678,45.000941],[-0.426868,45.002157],[-0.602955,45.38455],[-0.603477,45.385947],[-0.589506,45.597002],[-0.589527,45.59825],[-0.667646,45.785438],[-0.667558,45.786107],[-0.558538,45.941167],[-0.558113,45.942187],[-0.510364,46.169241],[-0.509617,46.170379],[-0.299221,46.344348],[-0.299249,46.344476],[-0.407783,46.418584],[-0.409374,46.419001],[-0.664399,46.391373],[-0.665289,46.391522],[-1.073797,46.533238],[-1.074503,46.533726],[-1.13799,46.602358],[-1.138088,46.602591],[-1.166572,46.752703],[-1.16709,46.753447],[-1.560173,47.218559]]}}]}';
+ var format = new GeoJSONFormat();
+ expect(format.exportData(geojsonData)).toEqual(newData);
+ });
+
+});
From 95834e40fe9c86c2f1e3d6f7a6740c7e783f8ca7 Mon Sep 17 00:00:00 2001
From: Wilkins
Date: Thu, 28 Jan 2016 17:46:42 +0100
Subject: [PATCH 05/25] More tests + better testing environment
---
Gruntfile.js | 22 ++++----
dist/app.min.js | 4 +-
dist/formats.min.js | 2 +-
dist/layers.min.js | 2 +-
src/formats.js | 17 +++++-
src/formats/geojson.js | 4 +-
src/formats/kml.js | 4 +-
src/layers.js | 25 +++++++--
tests/fixtures/testcase1.json | 14 +++++
tests/fixtures/testcase2.json | 14 +++++
tests/formatsSpec.js | 100 +++++++++++++++++++++++++++++-----
11 files changed, 165 insertions(+), 43 deletions(-)
create mode 100644 tests/fixtures/testcase1.json
create mode 100644 tests/fixtures/testcase2.json
diff --git a/Gruntfile.js b/Gruntfile.js
index ce412b6..a956160 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -23,7 +23,9 @@ grunt.initConfig({
"-W033": true,
"-W044": true //ignore regexp
},
- files: ['src/main.js', 'src/formats.js', 'src/formats/*.js', 'src/layers.js', 'src/i18n.js', 'locales/*/*.json', 'package.json']
+ sources: ['src/main.js', 'src/formats.js', 'src/formats/*.js', 'src/layers.js', 'src/i18n.js', 'locales/*/*.json', 'package.json'],
+ tests: ['tests/*.js']
+
},
uglify: {
dist: {
@@ -116,19 +118,15 @@ grunt.initConfig({
jasmine: {
components: {
src: [
- /*
- 'http://code.jquery.com/jquery-1.8.3.min.js',
- 'src/formats.js',
- 'src/formats/*js'
- */
+ 'src/layers.js',
'src/formats.js',
'src/formats/*.js',
- 'src/foo.js'
],
options: {
vendor: [
'http://code.jquery.com/jquery-1.8.3.min.js',
- 'http://cdn.leafletjs.com/leaflet-0.7/leaflet.js',
+ 'http://cdn.leafletjs.com/leaflet-0.7/leaflet-src.js',
+ 'vendor/simplify-geometry/simplifygeometry-0.0.1.min.js',
'dist/jquery.cookie.min.js',
'dist/togeojson.min.js',
'dist/togpx.min.js',
@@ -142,8 +140,7 @@ grunt.initConfig({
'node_modules/jasmine-jquery/lib/jasmine-jquery.js'
],
specs: 'tests/*.js',
- keepRunner : true,
- //helpers: 'test/spec/*.js'
+ keepRunner : false,
}
}
},
@@ -168,7 +165,7 @@ grunt.initConfig({
grunt.registerTask('default', [
'clean',
- 'jshint',
+ 'jshint:sources',
'uglify',
'concat',
'sass',
@@ -176,7 +173,8 @@ grunt.registerTask('default', [
//'copy'
]);
grunt.registerTask('travis', [
- 'jshint', 'jasmine',
+ 'jshint:tests',
+ 'jasmine',
]);
diff --git a/dist/app.min.js b/dist/app.min.js
index dd44a64..018e5a2 100644
--- a/dist/app.min.js
+++ b/dist/app.min.js
@@ -16,7 +16,7 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}
}(document, 'script', 'twitter-wjs');;
-function filesizeHuman(a,b){if(0===a)return a;b=b||1;var c=$.t("export.units").split(",");return i=parseInt(Math.floor(Math.log(a)/Math.log(1024))),0===i&&(b=0),(a/Math.pow(1024,i)).toFixed(b)+" "+c[i]}function getPosition(a){for(var b=0,c=0;a;)b+=a.offsetLeft-a.scrollLeft+a.clientLeft,c+=a.offsetTop-a.scrollTop+a.clientTop,a=a.offsetParent;return{x:b,y:c}}function hideAll(){$(".popup").each(function(){$(this).hide()}),hideLanguages()}function chooseDownloadFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#download-formats").css("top",b.y-4),$("#download-formats").show()}function chooseViewFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#view-formats").css("top",b.y-4),$("#view-formats").show(),$("#download-formats").hide()}function GeoJSONFormat(){this.param={key:"geojson",syntax:"json",name:"GeoJSON",extension:"geojson",contenttype:"appplication/json",size_header:45,size_track:110,size_node:22},this.exportData=function(a){return JSON.stringify(a)},this.display=function(a){return prettyData.json(a)}}function GPXFormat(){this.param={key:"gpx",syntax:"xml",name:"GPX",extension:"gpx",contenttype:"application/gpx+xml",size_header:186,size_track:70,size_node:41},this.exportData=function(a){return togpx(a)},this.display=function(a){return prettyData.xml(a)}}function KMLFormat(){this.param={key:"kml",syntax:"xml",name:"KML",extension:"kml",contenttype:"application/vnd.google-earth.kml+xml",size_header:92,size_track:150,size_node:20},this.exportData=function(a){return tokml(a)},this.display=function(a){return prettyData.xml(a)}}function MediawikiFormat(){this.param={key:"mediawiki",syntax:"nohighlight",name:"Mediawiki",extension:"txt",contenttype:"text/plain",size_header:0,size_track:0,size_node:20},this.exportData=function(a){return geojsonToPath(a)}}$("#export-close").on("click",function(){$("#export-format").hide()});var Format=function(){this.param={key:"format",name:"RootFormat"},this.formats=[]};Format.prototype={loadAll:function(a){for(var b=0;b"+b.name+"")}Object.keys(window.Layers).length>0?$(".leaflet-control-switcher-box").show():$(".leaflet-control-switcher-box").hide()}function clearMap(){for(var a in window.Layers)window.Layers[a].remove();window.Layers={},updateLayers()}var LayerOptimizer=function(a){this.id=this.createId(),this.name=a.filename,this.sourceLayer=a.layer,this.size=a.layer.getLayers().length,this.sourceLayerStyle={color:"red",opacity:.7,fillOpacity:.7,weight:5,clickable:!1},this.sourceLayerData=[],this.sourceLayerJSON=[],this.sourceLayerOptions=[],this.sourceLayerNodes=0,this.simplifiedLayerStyle={color:"blue",opacity:1,fillOpacity:1,weight:2,clickable:!1},this.simplifiedLayerData=[],this.simplifiedLayerNodes=0,this.controller=null,this.tolerance=0,this.init()};LayerOptimizer.prototype={init:function(){for(var a,b=[],c=0;c'+f.param.name+' :'+d+"");$("#size-format").show()},clearInfos:function(){$("#filename").html(""),$("#nodes").html(""),$(".leaflet-control-stats").hide()},clearSizeFormats:function(){$("#size-format").hide()},remove:function(){this.removeLayers(),this.removeController(),this.clearInfos(),this.clearSizeFormats()},removeLayers:function(){for(var a=0;a"+b.name+"")}Object.keys(window.Layers).length>0?$(".leaflet-control-switcher-box").show():$(".leaflet-control-switcher-box").hide()}function clearMap(){for(var a in window.Layers)window.Layers[a].remove();window.Layers={},updateLayers()}var LayerOptimizer=function(a){this.id=this.createId(),this.name=a.filename,this.sourceLayer=a.layer,this.size=a.layer.getLayers().length,this.sourceLayerStyle={color:"red",opacity:.7,fillOpacity:.7,weight:5,clickable:!1},this.sourceLayerData=[],this.sourceLayerJSON=[],this.sourceLayerOptions=[],this.sourceLayerNodes=0,this.simplifiedLayerStyle={color:"blue",opacity:1,fillOpacity:1,weight:2,clickable:!1},this.simplifiedLayerData=[],this.simplifiedLayerNodes=0,this.controller=null,this.tolerance=0,this.init()};LayerOptimizer.prototype={init:function(){for(var a,b=[],c=0;c'+f.param.name+' :'+b+"");$("#size-format").show()},clearInfos:function(){$("#filename").html(""),$("#nodes").html(""),$(".leaflet-control-stats").hide()},clearSizeFormats:function(){$("#size-format").hide()},remove:function(){this.removeLayers(),this.removeController(),this.clearInfos(),this.clearSizeFormats()},removeLayers:function(){for(var a=0;a',L.Control.FileLayerLoad.TITLE=$.t("actions.upload");var b=L.Control.fileLayerLoad({addToMap:!1,fitBounds:!1,fileSizeLimit:8096,binaryFormats:[]}).addTo(a);b.loader.on("data:loaded",function(a){hideAll(),window.currentLayer&&window.currentLayer.removeController();var b=new LayerOptimizer(a);b.choose(),window.Layers[b.id]=b,window.currentLayer=b,updateLayers()}).on("data:error",function(a){console.log("ERROR",a.error)}),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-download leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.download"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",chooseDownloadFormat),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-view leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.view"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",chooseViewFormat),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-erase leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.clear"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",clearMap).on(b,"click",hideAll),a},a}().addTo(a),function(){var a=new L.Control({position:"topleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-lang leaflet-bar"),b=L.DomUtil.create("a","",a);return b.href="#",b.target="_blank",b.title=$.t("actions.lang"),$(b).addClass("first"),b.innerHTML='',L.DomEvent.on(b,"click",L.DomEvent.stop).on(b,"click",showLanguage),a},a}().addTo(a),function(){var a=new L.Control({position:"bottomleft"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-stats");return a.id="stats",a.innerHTML='
',filename$=$("#filename",a),nodes$=$("#nodes",a),a},a}().addTo(a),initLanguage(),L.control.attribution({position:"topright",prefix:'Leaflet • '+$.t("osm.contributors")+""}).addTo(a),function(){var a=new L.Control({position:"topright"});return a.onAdd=function(){var a=L.DomUtil.create("div","leaflet-control-switcher-box leaflet-bar"),b=L.DomUtil.create("label","",a);b.href="#",b.title=$.t("actions.switchlayer"),b.innerHTML=$.t("layers.switcher");var c=L.DomUtil.create("select","leaflet-control-switcher leaflet-bar",a);return L.DomEvent.on(c,"change",function(){window.currentLayer.removeController(),window.currentLayer=window.Layers[$(this).val()],window.currentLayer.choose()}),a},a}().addTo(a),$("#slider").slider({value:0,min:0,max:.1,step:5e-5,precision:8,tooltip:"hide"}).on("slide",function(a){window.currentLayer.optimize(Math.pow(a.value,2)),window.currentLayer.displayInfos()}).parent().width("100%"),$("#helpbtn").on("click",function(a){a.preventDefault(),$("#modal").modal("show")});var c=$.cookie("tour");(!c||parseInt(c)<3)&&($("#modal").modal("show"),c=(parseInt(c)||0)+1,$.cookie("tour",c,{expires:120}));var d=new Format;window.formats=d,d.loadAll(["GeoJSONFormat","GPXFormat","KMLFormat","MediawikiFormat"]),hljs.initHighlightingOnLoad()});
\ No newline at end of file
diff --git a/dist/formats.min.js b/dist/formats.min.js
index 3bec03d..0078ef2 100644
--- a/dist/formats.min.js
+++ b/dist/formats.min.js
@@ -1 +1 @@
-function filesizeHuman(a,b){if(0===a)return a;b=b||1;var c=$.t("export.units").split(",");return i=parseInt(Math.floor(Math.log(a)/Math.log(1024))),0===i&&(b=0),(a/Math.pow(1024,i)).toFixed(b)+" "+c[i]}function getPosition(a){for(var b=0,c=0;a;)b+=a.offsetLeft-a.scrollLeft+a.clientLeft,c+=a.offsetTop-a.scrollTop+a.clientTop,a=a.offsetParent;return{x:b,y:c}}function hideAll(){$(".popup").each(function(){$(this).hide()}),hideLanguages()}function chooseDownloadFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#download-formats").css("top",b.y-4),$("#download-formats").show()}function chooseViewFormat(a){hideAll();var b=getPosition(a.currentTarget);$("#view-formats").css("top",b.y-4),$("#view-formats").show(),$("#download-formats").hide()}function GeoJSONFormat(){this.param={key:"geojson",syntax:"json",name:"GeoJSON",extension:"geojson",contenttype:"appplication/json",size_header:45,size_track:110,size_node:22},this.exportData=function(a){return JSON.stringify(a)},this.display=function(a){return prettyData.json(a)}}function GPXFormat(){this.param={key:"gpx",syntax:"xml",name:"GPX",extension:"gpx",contenttype:"application/gpx+xml",size_header:186,size_track:70,size_node:41},this.exportData=function(a){return togpx(a)},this.display=function(a){return prettyData.xml(a)}}function KMLFormat(){this.param={key:"kml",syntax:"xml",name:"KML",extension:"kml",contenttype:"application/vnd.google-earth.kml+xml",size_header:92,size_track:150,size_node:20},this.exportData=function(a){return tokml(a)},this.display=function(a){return prettyData.xml(a)}}function MediawikiFormat(){this.param={key:"mediawiki",syntax:"nohighlight",name:"Mediawiki",extension:"txt",contenttype:"text/plain",size_header:0,size_track:0,size_node:20},this.exportData=function(a){return geojsonToPath(a)}}$("#export-close").on("click",function(){$("#export-format").hide()});var Format=function(){this.param={key:"format",name:"RootFormat"},this.formats=[]};Format.prototype={loadAll:function(a){for(var b=0;b"+b.name+"")}Object.keys(window.Layers).length>0?$(".leaflet-control-switcher-box").show():$(".leaflet-control-switcher-box").hide()}function clearMap(){for(var a in window.Layers)window.Layers[a].remove();window.Layers={},updateLayers()}var LayerOptimizer=function(a){this.id=this.createId(),this.name=a.filename,this.sourceLayer=a.layer,this.size=a.layer.getLayers().length,this.sourceLayerStyle={color:"red",opacity:.7,fillOpacity:.7,weight:5,clickable:!1},this.sourceLayerData=[],this.sourceLayerJSON=[],this.sourceLayerOptions=[],this.sourceLayerNodes=0,this.simplifiedLayerStyle={color:"blue",opacity:1,fillOpacity:1,weight:2,clickable:!1},this.simplifiedLayerData=[],this.simplifiedLayerNodes=0,this.controller=null,this.tolerance=0,this.init()};LayerOptimizer.prototype={init:function(){for(var a,b=[],c=0;c'+f.param.name+' :'+d+"");$("#size-format").show()},clearInfos:function(){$("#filename").html(""),$("#nodes").html(""),$(".leaflet-control-stats").hide()},clearSizeFormats:function(){$("#size-format").hide()},remove:function(){this.removeLayers(),this.removeController(),this.clearInfos(),this.clearSizeFormats()},removeLayers:function(){for(var a=0;a"+b.name+"")}Object.keys(window.Layers).length>0?$(".leaflet-control-switcher-box").show():$(".leaflet-control-switcher-box").hide()}function clearMap(){for(var a in window.Layers)window.Layers[a].remove();window.Layers={},updateLayers()}var LayerOptimizer=function(a){this.id=this.createId(),this.name=a.filename,this.sourceLayer=a.layer,this.size=a.layer.getLayers().length,this.sourceLayerStyle={color:"red",opacity:.7,fillOpacity:.7,weight:5,clickable:!1},this.sourceLayerData=[],this.sourceLayerJSON=[],this.sourceLayerOptions=[],this.sourceLayerNodes=0,this.simplifiedLayerStyle={color:"blue",opacity:1,fillOpacity:1,weight:2,clickable:!1},this.simplifiedLayerData=[],this.simplifiedLayerNodes=0,this.controller=null,this.tolerance=0,this.init()};LayerOptimizer.prototype={init:function(){for(var a,b=[],c=0;c'+f.param.name+' :'+b+"");$("#size-format").show()},clearInfos:function(){$("#filename").html(""),$("#nodes").html(""),$(".leaflet-control-stats").hide()},clearSizeFormats:function(){$("#size-format").hide()},remove:function(){this.removeLayers(),this.removeController(),this.clearInfos(),this.clearSizeFormats()},removeLayers:function(){for(var a=0;a'+f.param.name+' :'+size+'');
}
$('#size-format').show();
diff --git a/tests/fixtures/testcase1.json b/tests/fixtures/testcase1.json
new file mode 100644
index 0000000..4b24c25
--- /dev/null
+++ b/tests/fixtures/testcase1.json
@@ -0,0 +1,14 @@
+{
+ "name": "Simple track with 26 nodes",
+
+ "source": {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-0.580169,44.841228],[-0.42678,45.000941],[-0.426868,45.002157],[-0.602955,45.38455],[-0.603477,45.385947],[-0.589506,45.597002],[-0.589527,45.59825],[-0.667646,45.785438],[-0.667558,45.786107],[-0.558538,45.941167],[-0.558113,45.942187],[-0.510364,46.169241],[-0.509617,46.170379],[-0.299221,46.344348],[-0.299249,46.344476],[-0.407783,46.418584],[-0.409374,46.419001],[-0.664399,46.391373],[-0.665289,46.391522],[-1.073797,46.533238],[-1.074503,46.533726],[-1.13799,46.602358],[-1.138088,46.602591],[-1.166572,46.752703],[-1.16709,46.753447],[-1.560173,47.218559]]}}]},
+
+ "gpx": "",
+
+ "geojson": "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[-0.580169,44.841228],[-0.42678,45.000941],[-0.426868,45.002157],[-0.602955,45.38455],[-0.603477,45.385947],[-0.589506,45.597002],[-0.589527,45.59825],[-0.667646,45.785438],[-0.667558,45.786107],[-0.558538,45.941167],[-0.558113,45.942187],[-0.510364,46.169241],[-0.509617,46.170379],[-0.299221,46.344348],[-0.299249,46.344476],[-0.407783,46.418584],[-0.409374,46.419001],[-0.664399,46.391373],[-0.665289,46.391522],[-1.073797,46.533238],[-1.074503,46.533726],[-1.13799,46.602358],[-1.138088,46.602591],[-1.166572,46.752703],[-1.16709,46.753447],[-1.560173,47.218559]]}}]}",
+
+ "kml": "-0.580169,44.841228 -0.42678,45.000941 -0.426868,45.002157 -0.602955,45.38455 -0.603477,45.385947 -0.589506,45.597002 -0.589527,45.59825 -0.667646,45.785438 -0.667558,45.786107 -0.558538,45.941167 -0.558113,45.942187 -0.510364,46.169241 -0.509617,46.170379 -0.299221,46.344348 -0.299249,46.344476 -0.407783,46.418584 -0.409374,46.419001 -0.664399,46.391373 -0.665289,46.391522 -1.073797,46.533238 -1.074503,46.533726 -1.13799,46.602358 -1.138088,46.602591 -1.166572,46.752703 -1.16709,46.753447 -1.560173,47.218559",
+
+ "mediawiki": "44.841228,-0.580169:45.000941,-0.42678:45.002157,-0.426868:45.38455,-0.602955:45.385947,-0.603477:45.597002,-0.589506:45.59825,-0.589527:45.785438,-0.667646:45.786107,-0.667558:45.941167,-0.558538:45.942187,-0.558113:46.169241,-0.510364:46.170379,-0.509617:46.344348,-0.299221:46.344476,-0.299249:46.418584,-0.407783:46.419001,-0.409374:46.391373,-0.664399:46.391522,-0.665289:46.533238,-1.073797:46.533726,-1.074503:46.602358,-1.13799:46.602591,-1.138088:46.752703,-1.166572:46.753447,-1.16709:47.218559,-1.560173"
+
+}
diff --git a/tests/fixtures/testcase2.json b/tests/fixtures/testcase2.json
new file mode 100644
index 0000000..2a1933b
--- /dev/null
+++ b/tests/fixtures/testcase2.json
@@ -0,0 +1,14 @@
+{
+ "name" : "Empty track",
+
+ "source": {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[]}}]},
+
+ "gpx": "",
+
+ "geojson": "{\"type\":\"FeatureCollection\",\"features\":[{\"type\":\"Feature\",\"properties\":{},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[]}}]}",
+
+ "kml": "",
+
+ "mediawiki": ""
+
+}
diff --git a/tests/formatsSpec.js b/tests/formatsSpec.js
index 9fdbf7d..c9f978f 100644
--- a/tests/formatsSpec.js
+++ b/tests/formatsSpec.js
@@ -31,32 +31,102 @@ describe('filesizeHuman function', function() {
});
});
+/*
+var jsonify=function(o){
+ var seen=[];
+ var jso=JSON.stringify(o, function(k,v){
+ if (typeof v =='object') {
+ if ( !seen.indexOf(v) ) { return '__cycle__'; }
+ seen.push(v);
+ } return v;
+ });
+ return jso;
+};
+*/
-describe('Formats', function() {
- var geojsonData = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-0.580169,44.841228],[-0.42678,45.000941],[-0.426868,45.002157],[-0.602955,45.38455],[-0.603477,45.385947],[-0.589506,45.597002],[-0.589527,45.59825],[-0.667646,45.785438],[-0.667558,45.786107],[-0.558538,45.941167],[-0.558113,45.942187],[-0.510364,46.169241],[-0.509617,46.170379],[-0.299221,46.344348],[-0.299249,46.344476],[-0.407783,46.418584],[-0.409374,46.419001],[-0.664399,46.391373],[-0.665289,46.391522],[-1.073797,46.533238],[-1.074503,46.533726],[-1.13799,46.602358],[-1.138088,46.602591],[-1.166572,46.752703],[-1.16709,46.753447],[-1.560173,47.218559]]}}]};
+describe("Testing fixtures conversion", function() {
+ jasmine.getFixtures().fixturesPath = 'tests/fixtures';
+ jasmine.getJSONFixtures().fixturesPath = 'tests/fixtures';
+
+ $(document.body).append('');
+ window.map = L.map('map');
+ window.map.hasLayer = function() { return true; }
+
+ describe('Checking fixture 1', function() {
+ checkFormatFixture('testcase1.json');
+ });
+ describe('Checking fixture 2', function() {
+ checkFormatFixture('testcase2.json');
+ });
+});
+
+function checkFormatFixture(file) {
+ var fixture = getJSONFixture(file);
+ var kml = new KMLFormat();
+ var gpx = new GPXFormat();
+ var geojson = new GeoJSONFormat();
+ var mediawiki = new MediawikiFormat();
+
+
+
+ //window.formats = { "formats": {'length': 0} };
+ //Layer.optimize(0);
+ var Layer = new LayerOptimizer({layer: L.geoJson(fixture.source)});
+ var counters = Layer.countTracksNodes();
it('Converts GeoJSON to GPX properly', function() {
- var gpxData = '';
- var format = new GPXFormat();
- expect(format.exportData(geojsonData)).toEqual(gpxData);
+ checkExportFormat(gpx, fixture.source, fixture.gpx);
+ });
+
+ it('Converts GeoJSON to GPX with correct estimated size', function() {
+ checkSizePrecision(gpx, fixture.gpx, counters);
});
it('Converts GeoJSON to Mediawiki properly', function() {
- var mediawikiData = '44.841228,-0.580169:45.000941,-0.42678:45.002157,-0.426868:45.38455,-0.602955:45.385947,-0.603477:45.597002,-0.589506:45.59825,-0.589527:45.785438,-0.667646:45.786107,-0.667558:45.941167,-0.558538:45.942187,-0.558113:46.169241,-0.510364:46.170379,-0.509617:46.344348,-0.299221:46.344476,-0.299249:46.418584,-0.407783:46.419001,-0.409374:46.391373,-0.664399:46.391522,-0.665289:46.533238,-1.073797:46.533726,-1.074503:46.602358,-1.13799:46.602591,-1.138088:46.752703,-1.166572:46.753447,-1.16709:47.218559,-1.560173';
- var format = new MediawikiFormat();
- expect(format.exportData(geojsonData)).toEqual(mediawikiData);
+ checkExportFormat(mediawiki, fixture.source, fixture.mediawiki);
+ });
+
+ it('Converts GeoJSON to Mediawiki with correct estimated size', function() {
+ checkSizePrecision(mediawiki, fixture.mediawiki, counters);
});
it('Converts GeoJSON to KML properly', function() {
- var kmlData = '-0.580169,44.841228 -0.42678,45.000941 -0.426868,45.002157 -0.602955,45.38455 -0.603477,45.385947 -0.589506,45.597002 -0.589527,45.59825 -0.667646,45.785438 -0.667558,45.786107 -0.558538,45.941167 -0.558113,45.942187 -0.510364,46.169241 -0.509617,46.170379 -0.299221,46.344348 -0.299249,46.344476 -0.407783,46.418584 -0.409374,46.419001 -0.664399,46.391373 -0.665289,46.391522 -1.073797,46.533238 -1.074503,46.533726 -1.13799,46.602358 -1.138088,46.602591 -1.166572,46.752703 -1.16709,46.753447 -1.560173,47.218559';
- var format = new KMLFormat();
- expect(format.exportData(geojsonData)).toEqual(kmlData);
+ checkExportFormat(kml, fixture.source, fixture.kml);
+ });
+
+ it('Converts GeoJSON to KML with correct estimated size', function() {
+ checkSizePrecision(kml, fixture.kml, counters);
});
it('Converts GeoJSON to GeoJSON properly', function() {
- var newData = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-0.580169,44.841228],[-0.42678,45.000941],[-0.426868,45.002157],[-0.602955,45.38455],[-0.603477,45.385947],[-0.589506,45.597002],[-0.589527,45.59825],[-0.667646,45.785438],[-0.667558,45.786107],[-0.558538,45.941167],[-0.558113,45.942187],[-0.510364,46.169241],[-0.509617,46.170379],[-0.299221,46.344348],[-0.299249,46.344476],[-0.407783,46.418584],[-0.409374,46.419001],[-0.664399,46.391373],[-0.665289,46.391522],[-1.073797,46.533238],[-1.074503,46.533726],[-1.13799,46.602358],[-1.138088,46.602591],[-1.166572,46.752703],[-1.16709,46.753447],[-1.560173,47.218559]]}}]}';
- var format = new GeoJSONFormat();
- expect(format.exportData(geojsonData)).toEqual(newData);
+ checkExportFormat(geojson, fixture.source, fixture.geojson);
});
-});
+ it('Converts GeoJSON to GeoJSON with correct estimated size', function() {
+ checkSizePrecision(geojson, fixture.geojson, counters);
+ });
+}
+
+/**
+ * Checks that the format estimated size the close to the real export size
+ *
+ * @param format the export format
+ * @param data the generated data
+ */
+function checkSizePrecision(format, data, counters) {
+ var estimatedSize = format.getEstimatedSize(counters.tracks, counters.nodes);
+ var precision = 10/100; // 10 percent
+ expect(data.length*(1+precision)+1).toBeGreaterThan(estimatedSize);
+ expect(data.length*(1-precision)-1).toBeLessThan(estimatedSize);
+}
+
+/**
+ * Checks that the exported data is as expected
+ *
+ * @param format the export format
+ * @param data the generated data
+ */
+function checkExportFormat(format, source, data) {
+ expect(format.exportData(source)).toEqual(data);
+}
+
From d9e3628156e351fea54bab4b89b6eb1332a011cc Mon Sep 17 00:00:00 2001
From: Wilkins
Date: Thu, 28 Jan 2016 17:57:41 +0100
Subject: [PATCH 06/25] Ajout de Jasmine JQuery dans le package.json
---
package.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 7d09f39..a2231fc 100644
--- a/package.json
+++ b/package.json
@@ -39,6 +39,7 @@
"grunt-scss-lint": "~0.3.4",
"jshint-stylish": "~1.0.1",
"load-grunt-tasks": "~3.1.0",
- "grunt-contrib-jasmine": "~1.0.0"
+ "grunt-contrib-jasmine": "~1.0.0",
+ "jasmine-jquery": "~2.1.1"
}
}
From 0fdc7807ec9a6d695637981cdec5ea82eb446c55 Mon Sep 17 00:00:00 2001
From: Wilkins
Date: Fri, 29 Jan 2016 10:52:10 +0100
Subject: [PATCH 07/25] New tests for Nova Scotia (issue #12)
---
src/formats/geojson.js | 4 +--
src/formats/gpx.js | 4 +--
src/formats/kml.js | 4 +--
src/formats/mediawiki.js | 2 +-
src/layers.js | 3 ---
tests/fixtures/testcase3.json | 15 ++++++++++++
tests/formatsSpec.js | 46 ++++++++++++++++++++++++++---------
7 files changed, 57 insertions(+), 21 deletions(-)
create mode 100644 tests/fixtures/testcase3.json
diff --git a/src/formats/geojson.js b/src/formats/geojson.js
index 67246a9..01ea1cd 100644
--- a/src/formats/geojson.js
+++ b/src/formats/geojson.js
@@ -12,8 +12,8 @@ function GeoJSONFormat() {
'extension': 'geojson',
'contenttype': 'appplication/json',
'size_header': 90,
- 'size_track': 35,
- 'size_node': 22
+ 'size_track': 36,
+ 'size_node': 20
}
this.exportData = function(data) {
return JSON.stringify(data);
diff --git a/src/formats/gpx.js b/src/formats/gpx.js
index e7a5590..f270799 100644
--- a/src/formats/gpx.js
+++ b/src/formats/gpx.js
@@ -12,8 +12,8 @@ function GPXFormat() {
'extension': 'gpx',
'contenttype': 'application/gpx+xml',
'size_header': 186,
- 'size_track': 70,
- 'size_node': 41
+ 'size_track': 75,
+ 'size_node': 37
}
this.exportData = function(data) {
return togpx(data);
diff --git a/src/formats/kml.js b/src/formats/kml.js
index b20f4c9..610baa9 100644
--- a/src/formats/kml.js
+++ b/src/formats/kml.js
@@ -12,8 +12,8 @@ function KMLFormat() {
'extension': 'kml',
'contenttype': 'application/vnd.google-earth.kml+xml',
'size_header': 150,
- 'size_track': 80,
- 'size_node': 20
+ 'size_track': 81,
+ 'size_node': 19
}
this.exportData = function(data) {
return tokml(data);
diff --git a/src/formats/mediawiki.js b/src/formats/mediawiki.js
index 653e92f..f834bca 100644
--- a/src/formats/mediawiki.js
+++ b/src/formats/mediawiki.js
@@ -14,7 +14,7 @@ function MediawikiFormat() {
'contenttype': 'text/plain',
'size_header': 0,
'size_track': 0,
- 'size_node': 20
+ 'size_node': 17
}
this.exportData = function(data) {
return geojsonToPath(data);
diff --git a/src/layers.js b/src/layers.js
index fa09ba4..d3a710b 100644
--- a/src/layers.js
+++ b/src/layers.js
@@ -172,7 +172,6 @@ LayerOptimizer.prototype = {
simplifiedJSON = this.simplifiedLayerData[i].getLayers()[0].toGeoJSON();
simplifiedJSON.geometry.coordinates = newcoords;
this.simplifiedLayerData[i].clearLayers();
- //console.log(JSON.stringify(simplifiedJSON));
this.simplifiedLayerData[i].addData(simplifiedJSON);
this.simplifiedLayerNodes += newcoords.length;
@@ -256,8 +255,6 @@ LayerOptimizer.prototype = {
for (var i=0; i Nova Scotia -65.61,43.428,0 -65.629,43.422,0 -65.621,43.435,0 -65.627,43.445,0 -65.635,43.453,0 -65.645,43.459,0 -65.656,43.463,0 -65.646,43.472,0 -65.634,43.477,0 -65.608,43.484,0 -65.617,43.508,0 -65.605,43.514,0 -65.56,43.511,0 -65.569,43.495,0 -65.574,43.477,0 -65.587,43.464,0 -65.598,43.445,0 -65.61,43.428,0 -59.807,43.933,0 -59.861,43.916,0 -59.913,43.908,0 -59.971,43.906,0 -60.028,43.911,0 -60.083,43.923,0 -60.133,43.942,0 -60.124,43.946,0 -60.116,43.947,0 -60.108,43.946,0 -60.098,43.942,0 -60.074,43.943,0 -59.998,43.929,0 -59.867,43.937,0 -59.844,43.941,0 -59.822,43.948,0 -59.803,43.957,0 -59.741,43.987,0 -59.728,43.998,0 -59.76,43.96,0 -59.807,43.933,0 -66.298,44.283,0 -66.313,44.251,0 -66.328,44.258,0 -66.286,44.325,0 -66.258,44.355,0 -66.242,44.377,0 -66.231,44.387,0 -66.213,44.396,0 -66.203,44.392,0 -66.204,44.381,0 -66.218,44.367,0 -66.239,44.338,0 -66.298,44.283,0 -60.932,45.577,0 -60.914,45.567,0 -60.908,45.577,0 -60.899,45.579,0 -60.889,45.574,0 -60.879,45.567,0 -60.884,45.558,0 -60.892,45.553,0 -60.902,45.551,0 -60.914,45.553,0 -60.953,45.532,0 -60.962,45.517,0 -60.947,45.498,0 -60.968,45.487,0 -60.986,45.47,0 -61.003,45.461,0 -61.024,45.471,0 -61.013,45.477,0 -61.004,45.486,0 -61.002,45.495,0 -61.013,45.498,0 -61.04,45.499,0 -61.053,45.501,0 -61.065,45.505,0 -61.075,45.511,0 -61.089,45.523,0 -61.105,45.527,0 -61.106,45.531,0 -61.106,45.536,0 -61.112,45.549,0 -61.106,45.551,0 -61.091,45.553,0 -61.075,45.563,0 -61.054,45.571,0 -61.031,45.577,0 -61.01,45.581,0 -60.958,45.582,0 -60.932,45.577,0 -64.008,46.005,0 -63.905,45.98,0 -63.87,45.963,0 -63.867,45.937,0 -63.844,45.934,0 -63.825,45.925,0 -63.811,45.91,0 -63.806,45.889,0 -63.786,45.891,0 -63.759,45.886,0 -63.732,45.877,0 -63.716,45.868,0 -63.727,45.862,0 -63.746,45.854,0 -63.757,45.847,0 -63.736,45.842,0 -63.69,45.853,0 -63.669,45.847,0 -63.674,45.837,0 -63.674,45.828,0 -63.67,45.824,0 -63.662,45.827,0 -63.652,45.837,0 -63.653,45.843,0 -63.659,45.85,0 -63.662,45.865,0 -63.659,45.874,0 -63.652,45.875,0 -63.644,45.87,0 -63.638,45.865,0 -63.629,45.862,0 -63.593,45.875,0 -63.492,45.883,0 -63.439,45.876,0 -63.409,45.855,0 -63.428,45.854,0 -63.464,45.86,0 -63.483,45.861,0 -63.47,45.852,0 -63.438,45.839,0 -63.428,45.827,0 -63.447,45.821,0 -63.484,45.826,0 -63.504,45.827,0 -63.523,45.82,0 -63.516,45.811,0 -63.496,45.807,0 -63.477,45.814,0 -63.469,45.809,0 -63.461,45.806,0 -63.452,45.806,0 -63.442,45.806,0 -63.438,45.805,0 -63.431,45.801,0 -63.428,45.8,0 -63.425,45.802,0 -63.418,45.812,0 -63.415,45.814,0 -63.399,45.812,0 -63.369,45.803,0 -63.354,45.8,0 -63.324,45.804,0 -63.291,45.812,0 -63.259,45.816,0 -63.23,45.806,0 -63.258,45.791,0 -63.302,45.776,0 -63.347,45.767,0 -63.381,45.772,0 -63.373,45.757,0 -63.356,45.748,0 -63.312,45.737,0 -63.304,45.732,0 -63.295,45.726,0 -63.288,45.724,0 -63.285,45.735,0 -63.282,45.741,0 -63.273,45.748,0 -63.257,45.759,0 -63.257,45.754,0 -63.257,45.743,0 -63.257,45.737,0 -63.212,45.76,0 -63.196,45.765,0 -63.195,45.768,0 -63.194,45.773,0 -63.192,45.777,0 -63.189,45.779,0 -63.184,45.776,0 -63.182,45.771,0 -63.182,45.766,0 -63.185,45.762,0 -63.2,45.753,0 -63.205,45.746,0 -63.202,45.737,0 -63.19,45.736,0 -63.134,45.759,0 -63.117,45.763,0 -63.1,45.765,0 -63.083,45.764,0 -63.065,45.759,0 -63.07,45.779,0 -63.084,45.79,0 -63.121,45.806,0 -63.1,45.811,0 -62.98,45.796,0 -62.924,45.783,0 -62.777,45.765,0 -62.751,45.766,0 -62.699,45.773,0 -62.675,45.772,0 -62.696,45.761,0 -62.718,45.761,0 -62.738,45.763,0 -62.757,45.759,0 -62.739,45.748,0 -62.729,45.744,0 -62.699,45.745,0 -62.682,45.742,0 -62.664,45.736,0 -62.647,45.727,0 -62.633,45.717,0 -62.703,45.687,0 -62.751,45.681,0 -62.77,45.675,0 -62.784,45.662,0 -62.792,45.642,0 -62.781,45.653,0 -62.765,45.662,0 -62.749,45.664,0 -62.736,45.655,0 -62.747,45.627,0 -62.75,45.613,0 -62.74,45.618,0 -62.72,45.646,0 -62.706,45.656,0 -62.692,45.652,0 -62.669,45.631,0 -62.657,45.628,0 -62.647,45.642,0 -62.664,45.647,0 -62.672,45.656,0 -62.672,45.668,0 -62.665,45.68,0 -62.655,45.682,0 -62.64,45.681,0 -62.625,45.682,0 -62.613,45.691,0 -62.6,45.686,0 -62.577,45.686,0 -62.566,45.683,0 -62.557,45.678,0 -62.55,45.667,0 -62.545,45.663,0 -62.526,45.658,0 -62.51,45.659,0 -62.495,45.662,0 -62.476,45.663,0 -62.503,45.631,0 -62.509,45.615,0 -62.493,45.608,0 -62.47,45.615,0 -62.435,45.643,0 -62.418,45.649,0 -62.4,45.653,0 -62.377,45.662,0 -62.362,45.673,0 -62.371,45.683,0 -62.383,45.68,0 -62.405,45.675,0 -62.441,45.655,0 -62.416,45.679,0 -62.27,45.704,0 -62.06,45.808,0 -61.989,45.863,0 -61.949,45.882,0 -61.924,45.889,0 -61.911,45.889,0 -61.9,45.882,0 -61.897,45.872,0 -61.905,45.866,0 -61.916,45.86,0 -61.921,45.851,0 -61.92,45.83,0 -61.909,45.787,0 -61.888,45.738,0 -61.886,45.721,0 -61.894,45.704,0 -61.876,45.693,0 -61.836,45.681,0 -61.821,45.673,0 -61.807,45.66,0 -61.795,45.653,0 -61.726,45.628,0 -61.708,45.623,0 -61.684,45.622,0 -61.668,45.627,0 -61.655,45.636,0 -61.642,45.642,0 -61.626,45.636,0 -61.633,45.636,0 -61.648,45.634,0 -61.648,45.627,0 -61.64,45.621,0 -61.62,45.614,0 -61.619,45.623,0 -61.615,45.632,0 -61.61,45.639,0 -61.602,45.642,0 -61.589,45.646,0 -61.583,45.653,0 -61.58,45.663,0 -61.575,45.673,0 -61.558,45.684,0 -61.537,45.689,0 -61.492,45.691,0 -61.47,45.683,0 -61.437,45.65,0 -61.417,45.642,0 -61.4,45.633,0 -61.384,45.612,0 -61.37,45.581,0 -61.359,45.578,0 -61.351,45.57,0 -61.339,45.553,0 -61.324,45.542,0 -61.263,45.512,0 -61.247,45.507,0 -61.24,45.508,0 -61.237,45.506,0 -61.235,45.491,0 -61.237,45.468,0 -61.248,45.453,0 -61.267,45.443,0 -61.353,45.414,0 -61.373,45.409,0 -61.374,45.421,0 -61.388,45.418,0 -61.406,45.408,0 -61.417,45.399,0 -61.43,45.392,0 -61.483,45.375,0 -61.461,45.355,0 -61.451,45.349,0 -61.137,45.354,0 -61.12,45.352,0 -61.082,45.343,0 -60.999,45.333,0 -60.982,45.326,0 -60.971,45.314,0 -60.971,45.302,0 -60.972,45.288,0 -60.969,45.272,0 -60.983,45.271,0 -60.987,45.277,0 -60.989,45.285,0 -60.996,45.292,0 -61.007,45.294,0 -61.017,45.294,0 -61.027,45.294,0 -61.037,45.3,0 -61.028,45.285,0 -61.023,45.279,0 -61.016,45.272,0 -61.024,45.263,0 -61.031,45.261,0 -61.039,45.26,0 -61.047,45.255,0 -61.053,45.245,0 -61.057,45.236,0 -61.063,45.233,0 -61.078,45.238,0 -61.071,45.224,0 -61.12,45.214,0 -61.139,45.218,0 -61.153,45.238,0 -61.142,45.245,0 -61.133,45.253,0 -61.126,45.262,0 -61.119,45.272,0 -61.165,45.264,0 -61.175,45.258,0 -61.18,45.243,0 -61.171,45.216,0 -61.175,45.203,0 -61.184,45.209,0 -61.188,45.216,0 -61.19,45.223,0 -61.197,45.235,0 -61.204,45.246,0 -61.212,45.253,0 -61.216,45.248,0 -61.246,45.24,0 -61.263,45.239,0 -61.263,45.251,0 -61.278,45.254,0 -61.299,45.248,0 -61.332,45.231,0 -61.35,45.217,0 -61.365,45.201,0 -61.364,45.19,0 -61.339,45.19,0 -61.355,45.178,0 -61.371,45.169,0 -61.389,45.164,0 -61.568,45.147,0 -61.61,45.151,0 -61.64,45.176,0 -61.647,45.157,0 -61.666,45.164,0 -61.687,45.175,0 -61.702,45.169,0 -61.686,45.162,0 -61.666,45.149,0 -61.649,45.135,0 -61.64,45.121,0 -61.649,45.122,0 -61.658,45.12,0 -61.674,45.115,0 -61.64,45.094,0 -61.64,45.087,0 -61.677,45.089,0 -61.695,45.092,0 -61.702,45.097,0 -61.704,45.107,0 -61.709,45.107,0 -61.715,45.101,0 -61.756,45.101,0 -61.754,45.094,0 -61.755,45.089,0 -61.756,45.084,0 -61.756,45.08,0 -61.781,45.092,0 -61.81,45.101,0 -61.825,45.099,0 -61.811,45.08,0 -61.822,45.078,0 -61.846,45.08,0 -61.859,45.08,0 -61.859,45.073,0 -61.851,45.071,0 -61.841,45.065,0 -61.836,45.056,0 -61.839,45.047,0 -61.848,45.045,0 -61.88,45.053,0 -61.887,45.047,0 -61.882,45.034,0 -61.897,45.031,0 -61.918,45.037,0 -61.935,45.053,0 -61.941,45.033,0 -61.941,45.025,0 -61.959,45.037,0 -61.976,45.036,0 -61.99,45.027,0 -62.004,45.011,0 -62.006,45.016,0 -62.008,45.021,0 -62.01,45.026,0 -62.01,45.032,0 -62.02,45.026,0 -62.029,45.019,0 -62.039,45.014,0 -62.05,45.011,0 -62.035,45.004,0 -61.976,44.991,0 -61.989,44.985,0 -62.003,44.983,0 -62.018,44.985,0 -62.031,44.991,0 -62.042,44.983,0 -62.057,44.976,0 -62.073,44.973,0 -62.086,44.978,0 -62.098,44.974,0 -62.119,44.97,0 -62.138,44.969,0 -62.147,44.974,0 -62.151,44.975,0 -62.174,44.961,0 -62.185,44.956,0 -62.234,44.959,0 -62.254,44.952,0 -62.27,44.929,0 -62.278,44.937,0 -62.29,44.927,0 -62.306,44.92,0 -62.321,44.918,0 -62.332,44.922,0 -62.339,44.922,0 -62.34,44.918,0 -62.342,44.915,0 -62.344,44.913,0 -62.346,44.909,0 -62.343,44.905,0 -62.342,44.903,0 -62.339,44.895,0 -62.361,44.902,0 -62.377,44.91,0 -62.393,44.91,0 -62.415,44.895,0 -62.41,44.892,0 -62.406,44.886,0 -62.401,44.881,0 -62.42,44.878,0 -62.437,44.869,0 -62.448,44.853,0 -62.448,44.834,0 -62.467,44.841,0 -62.473,44.859,0 -62.473,44.881,0 -62.476,44.901,0 -62.49,44.882,0 -62.507,44.864,0 -62.527,44.856,0 -62.551,44.868,0 -62.566,44.84,0 -62.555,44.833,0 -62.546,44.825,0 -62.531,44.806,0 -62.553,44.8,0 -62.578,44.834,0 -62.599,44.827,0 -62.607,44.837,0 -62.623,44.83,0 -62.661,44.806,0 -62.654,44.793,0 -62.687,44.802,0 -62.805,44.785,0 -62.799,44.772,0 -62.802,44.761,0 -62.813,44.754,0 -62.826,44.752,0 -62.821,44.744,0 -62.815,44.738,0 -62.807,44.733,0 -62.798,44.73,0 -62.819,44.721,0 -62.83,44.718,0 -62.842,44.717,0 -62.851,44.723,0 -62.857,44.734,0 -62.864,44.738,0 -62.873,44.724,0 -62.887,44.731,0 -62.908,44.738,0 -62.93,44.74,0 -62.945,44.734,0 -62.972,44.718,0 -62.989,44.711,0 -62.997,44.714,0 -62.998,44.722,0 -63,44.727,0 -63.002,44.731,0 -63.004,44.737,0 -63.003,44.765,0 -63.004,44.772,0 -63.018,44.778,0 -63.047,44.766,0 -63.058,44.778,0 -63.059,44.763,0 -63.05,44.751,0 -63.021,44.727,0 -63.014,44.711,0 -63.024,44.697,0 -63.058,44.675,0 -63.063,44.689,0 -63.061,44.705,0 -63.063,44.718,0 -63.076,44.724,0 -63.096,44.729,0 -63.102,44.743,0 -63.099,44.775,0 -63.103,44.784,0 -63.11,44.79,0 -63.119,44.791,0 -63.127,44.785,0 -63.125,44.782,0 -63.121,44.752,0 -63.124,44.735,0 -63.137,44.707,0 -63.14,44.689,0 -63.154,44.696,0 -63.16,44.706,0 -63.16,44.718,0 -63.155,44.73,0 -63.173,44.721,0 -63.183,44.692,0 -63.202,44.683,0 -63.214,44.681,0 -63.214,44.683,0 -63.212,44.69,0 -63.216,44.703,0 -63.232,44.727,0 -63.237,44.737,0 -63.25,44.726,0 -63.253,44.712,0 -63.248,44.698,0 -63.237,44.689,0 -63.25,44.673,0 -63.281,44.644,0 -63.285,44.628,0 -63.317,44.636,0 -63.389,44.643,0 -63.415,44.655,0 -63.402,44.665,0 -63.396,44.667,0 -63.387,44.668,0 -63.399,44.682,0 -63.417,44.683,0 -63.456,44.668,0 -63.435,44.659,0 -63.42,44.648,0 -63.415,44.634,0 -63.422,44.614,0 -63.439,44.596,0 -63.456,44.601,0 -63.476,44.613,0 -63.51,44.624,0 -63.538,44.648,0 -63.574,44.666,0 -63.633,44.713,0 -63.644,44.717,0 -63.662,44.717,0 -63.649,44.688,0 -63.64,44.676,0 -63.628,44.668,0 -63.62,44.667,0 -63.596,44.668,0 -63.587,44.664,0 -63.574,44.646,0 -63.569,44.642,0 -63.563,44.635,0 -63.548,44.603,0 -63.545,44.593,0 -63.546,44.574,0 -63.548,44.562,0 -63.546,44.55,0 -63.523,44.518,0 -63.524,44.503,0 -63.533,44.489,0 -63.548,44.473,0 -63.554,44.47,0 -63.573,44.464,0 -63.579,44.464,0 -63.587,44.469,0 -63.585,44.475,0 -63.58,44.48,0 -63.579,44.484,0 -63.596,44.487,0 -63.605,44.477,0 -63.61,44.463,0 -63.621,44.453,0 -63.626,44.446,0 -63.633,44.441,0 -63.641,44.443,0 -63.644,44.45,0 -63.639,44.459,0 -63.632,44.466,0 -63.628,44.47,0 -63.641,44.476,0 -63.658,44.475,0 -63.693,44.47,0 -63.701,44.468,0 -63.703,44.463,0 -63.705,44.458,0 -63.716,44.456,0 -63.721,44.461,0 -63.724,44.47,0 -63.729,44.475,0 -63.737,44.47,0 -63.749,44.474,0 -63.758,44.482,0 -63.763,44.491,0 -63.765,44.505,0 -63.774,44.494,0 -63.783,44.478,0 -63.793,44.469,0 -63.806,44.477,0 -63.809,44.49,0 -63.804,44.503,0 -63.785,44.532,0 -63.793,44.526,0 -63.805,44.515,0 -63.812,44.511,0 -63.82,44.514,0 -63.826,44.521,0 -63.834,44.525,0 -63.847,44.519,0 -63.844,44.515,0 -63.84,44.505,0 -63.854,44.504,0 -63.874,44.499,0 -63.888,44.497,0 -63.9,44.498,0 -63.912,44.501,0 -63.922,44.506,0 -63.929,44.511,0 -63.942,44.534,0 -63.942,44.554,0 -63.922,44.593,0 -63.928,44.6,0 -63.943,44.621,0 -63.925,44.629,0 -63.919,44.634,0 -63.915,44.642,0 -63.919,44.643,0 -63.929,44.648,0 -63.902,44.667,0 -63.891,44.68,0 -63.888,44.696,0 -63.907,44.684,0 -63.926,44.675,0 -63.989,44.656,0 -64.001,44.655,0 -64.057,44.639,0 -64.066,44.634,0 -64.06,44.621,0 -64.062,44.587,0 -64.052,44.58,0 -64.037,44.571,0 -64.025,44.551,0 -64.011,44.511,0 -64.041,44.523,0 -64.055,44.509,0 -64.064,44.488,0 -64.076,44.477,0 -64.097,44.475,0 -64.106,44.478,0 -64.117,44.488,0 -64.123,44.516,0 -64.124,44.522,0 -64.119,44.538,0 -64.128,44.555,0 -64.145,44.57,0 -64.162,44.58,0 -64.178,44.582,0 -64.197,44.58,0 -64.211,44.571,0 -64.21,44.552,0 -64.227,44.537,0 -64.253,44.544,0 -64.281,44.558,0 -64.305,44.566,0 -64.301,44.561,0 -64.292,44.546,0 -64.304,44.543,0 -64.305,44.536,0 -64.301,44.527,0 -64.299,44.515,0 -64.301,44.503,0 -64.308,44.492,0 -64.317,44.484,0 -64.326,44.477,0 -64.318,44.477,0 -64.299,44.47,0 -64.31,44.465,0 -64.354,44.456,0 -64.354,44.445,0 -64.344,44.438,0 -64.336,44.429,0 -64.34,44.415,0 -64.297,44.417,0 -64.275,44.416,0 -64.258,44.409,0 -64.275,44.407,0 -64.288,44.401,0 -64.3,44.393,0 -64.312,44.387,0 -64.312,44.381,0 -64.261,44.38,0 -64.235,44.377,0 -64.21,44.367,0 -64.228,44.361,0 -64.246,44.361,0 -64.282,44.367,0 -64.347,44.367,0 -64.347,44.361,0 -64.34,44.356,0 -64.336,44.35,0 -64.336,44.342,0 -64.34,44.333,0 -64.326,44.33,0 -64.315,44.324,0 -64.305,44.32,0 -64.292,44.326,0 -64.298,44.329,0 -64.307,44.337,0 -64.312,44.34,0 -64.302,44.343,0 -64.291,44.341,0 -64.264,44.333,0 -64.29,44.304,0 -64.289,44.299,0 -64.237,44.299,0 -64.269,44.267,0 -64.287,44.259,0 -64.305,44.272,0 -64.312,44.264,0 -64.33,44.276,0 -64.339,44.284,0 -64.347,44.292,0 -64.337,44.298,0 -64.333,44.299,0 -64.409,44.329,0 -64.429,44.34,0 -64.418,44.326,0 -64.401,44.313,0 -64.382,44.303,0 -64.364,44.299,0 -64.359,44.296,0 -64.357,44.288,0 -64.358,44.279,0 -64.36,44.272,0 -64.367,44.264,0 -64.426,44.234,0 -64.431,44.226,0 -64.434,44.208,0 -64.439,44.199,0 -64.449,44.193,0 -64.469,44.187,0 -64.477,44.182,0 -64.483,44.174,0 -64.498,44.141,0 -64.514,44.15,0 -64.522,44.153,0 -64.531,44.155,0 -64.536,44.156,0 -64.543,44.161,0 -64.549,44.162,0 -64.552,44.16,0 -64.555,44.15,0 -64.559,44.148,0 -64.594,44.158,0 -64.606,44.159,0 -64.6,44.148,0 -64.606,44.146,0 -64.609,44.143,0 -64.614,44.141,0 -64.621,44.141,0 -64.599,44.135,0 -64.575,44.134,0 -64.554,44.13,0 -64.546,44.117,0 -64.55,44.1,0 -64.561,44.08,0 -64.576,44.069,0 -64.594,44.079,0 -64.621,44.065,0 -64.649,44.059,0 -64.717,44.059,0 -64.705,44.046,0 -64.687,44.042,0 -64.669,44.036,0 -64.662,44.015,0 -64.667,43.998,0 -64.68,43.993,0 -64.697,43.99,0 -64.714,43.98,0 -64.731,43.964,0 -64.744,43.958,0 -64.806,43.957,0 -64.816,43.954,0 -64.819,43.946,0 -64.822,43.937,0 -64.828,43.931,0 -64.837,43.929,0 -64.847,43.929,0 -64.833,43.914,0 -64.797,43.895,0 -64.786,43.875,0 -64.802,43.876,0 -64.814,43.874,0 -64.819,43.867,0 -64.812,43.853,0 -64.829,43.845,0 -64.834,43.834,0 -64.839,43.83,0 -64.854,43.84,0 -64.859,43.846,0 -64.868,43.861,0 -64.874,43.867,0 -64.883,43.873,0 -64.893,43.877,0 -64.904,43.879,0 -64.915,43.881,0 -64.91,43.871,0 -64.895,43.856,0 -64.888,43.847,0 -64.886,43.839,0 -64.884,43.822,0 -64.881,43.812,0 -64.906,43.805,0 -64.924,43.823,0 -64.938,43.849,0 -64.95,43.867,0 -64.967,43.874,0 -64.964,43.861,0 -64.935,43.813,0 -64.932,43.806,0 -64.935,43.799,0 -64.949,43.775,0 -64.958,43.766,0 -64.97,43.759,0 -64.984,43.758,0 -64.997,43.77,0 -65.02,43.817,0 -65.039,43.832,0 -65.038,43.816,0 -65.019,43.771,0 -65.016,43.759,0 -65.014,43.743,0 -65.016,43.727,0 -65.025,43.716,0 -65.034,43.712,0 -65.037,43.716,0 -65.037,43.721,0 -65.043,43.724,0 -65.053,43.721,0 -65.058,43.714,0 -65.061,43.707,0 -65.06,43.703,0 -65.077,43.711,0 -65.073,43.745,0 -65.087,43.758,0 -65.096,43.736,0 -65.123,43.697,0 -65.128,43.675,0 -65.151,43.689,0 -65.147,43.707,0 -65.136,43.727,0 -65.141,43.751,0 -65.161,43.716,0 -65.169,43.71,0 -65.178,43.71,0 -65.187,43.716,0 -65.194,43.725,0 -65.201,43.751,0 -65.212,43.772,0 -65.225,43.792,0 -65.238,43.806,0 -65.24,43.798,0 -65.242,43.795,0 -65.242,43.792,0 -65.238,43.785,0 -65.255,43.776,0 -65.249,43.755,0 -65.224,43.719,0 -65.24,43.695,0 -65.25,43.673,0 -65.263,43.671,0 -65.289,43.675,0 -65.327,43.697,0 -65.328,43.71,0 -65.316,43.733,0 -65.313,43.744,0 -65.317,43.761,0 -65.323,43.766,0 -65.331,43.763,0 -65.341,43.758,0 -65.345,43.751,0 -65.346,43.742,0 -65.351,43.737,0 -65.367,43.744,0 -65.355,43.716,0 -65.341,43.694,0 -65.334,43.67,0 -65.341,43.641,0 -65.341,43.634,0 -65.34,43.625,0 -65.34,43.617,0 -65.344,43.614,0 -65.354,43.611,0 -65.358,43.604,0 -65.356,43.597,0 -65.351,43.593,0 -65.346,43.588,0 -65.341,43.545,0 -65.362,43.575,0 -65.371,43.579,0 -65.381,43.577,0 -65.392,43.567,0 -65.402,43.566,0 -65.416,43.571,0 -65.442,43.593,0 -65.457,43.6,0 -65.457,43.593,0 -65.413,43.539,0 -65.41,43.529,0 -65.408,43.519,0 -65.402,43.504,0 -65.416,43.5,0 -65.422,43.511,0 -65.429,43.545,0 -65.439,43.557,0 -65.45,43.561,0 -65.456,43.556,0 -65.451,43.545,0 -65.455,43.535,0 -65.463,43.528,0 -65.472,43.524,0 -65.484,43.525,0 -65.474,43.504,0 -65.471,43.494,0 -65.47,43.48,0 -65.475,43.471,0 -65.484,43.472,0 -65.493,43.48,0 -65.498,43.494,0 -65.504,43.503,0 -65.542,43.528,0 -65.547,43.532,0 -65.55,43.538,0 -65.552,43.543,0 -65.546,43.556,0 -65.55,43.561,0 -65.556,43.565,0 -65.56,43.569,0 -65.566,43.574,0 -65.579,43.566,0 -65.613,43.536,0 -65.649,43.518,0 -65.653,43.513,0 -65.654,43.507,0 -65.658,43.502,0 -65.669,43.497,0 -65.668,43.5,0 -65.674,43.505,0 -65.69,43.511,0 -65.719,43.509,0 -65.729,43.514,0 -65.738,43.531,0 -65.73,43.547,0 -65.732,43.563,0 -65.739,43.577,0 -65.752,43.587,0 -65.752,43.576,0 -65.752,43.569,0 -65.749,43.564,0 -65.745,43.559,0 -65.748,43.555,0 -65.751,43.553,0 -65.754,43.552,0 -65.758,43.551,0 -65.778,43.568,0 -65.782,43.588,0 -65.772,43.641,0 -65.771,43.669,0 -65.774,43.681,0 -65.779,43.689,0 -65.789,43.691,0 -65.795,43.683,0 -65.8,43.669,0 -65.807,43.655,0 -65.796,43.646,0 -65.792,43.634,0 -65.794,43.62,0 -65.799,43.606,0 -65.815,43.632,0 -65.817,43.657,0 -65.816,43.683,0 -65.82,43.71,0 -65.825,43.719,0 -65.84,43.739,0 -65.848,43.751,0 -65.853,43.764,0 -65.861,43.806,0 -65.868,43.806,0 -65.868,43.787,0 -65.866,43.779,0 -65.861,43.771,0 -65.877,43.77,0 -65.889,43.784,0 -65.899,43.804,0 -65.909,43.819,0 -65.924,43.827,0 -65.937,43.826,0 -65.941,43.82,0 -65.93,43.812,0 -65.93,43.806,0 -65.957,43.785,0 -65.971,43.78,0 -65.978,43.795,0 -65.979,43.802,0 -65.984,43.82,0 -65.987,43.839,0 -65.992,43.849,0 -65.997,43.854,0 -65.999,43.85,0 -66.004,43.832,0 -66.005,43.826,0 -66.005,43.816,0 -66.004,43.81,0 -66.002,43.804,0 -65.974,43.751,0 -65.963,43.737,0 -65.973,43.714,0 -65.979,43.706,0 -65.991,43.703,0 -65.983,43.72,0 -65.984,43.729,0 -65.991,43.731,0 -66.005,43.724,0 -66.007,43.717,0 -66.005,43.708,0 -66.006,43.7,0 -66.015,43.697,0 -66.024,43.698,0 -66.028,43.702,0 -66.029,43.709,0 -66.026,43.716,0 -66.032,43.716,0 -66.031,43.737,0 -66.042,43.746,0 -66.055,43.741,0 -66.06,43.716,0 -66.074,43.729,0 -66.077,43.741,0 -66.073,43.768,0 -66.079,43.772,0 -66.093,43.767,0 -66.107,43.755,0 -66.115,43.744,0 -66.122,43.744,0 -66.134,43.81,0 -66.12,43.825,0 -66.113,43.836,0 -66.111,43.848,0 -66.118,43.853,0 -66.128,43.85,0 -66.136,43.842,0 -66.142,43.833,0 -66.149,43.826,0 -66.148,43.84,0 -66.149,43.853,0 -66.156,43.86,0 -66.17,43.86,0 -66.166,43.871,0 -66.167,43.88,0 -66.17,43.887,0 -66.17,43.894,0 -66.165,43.904,0 -66.152,43.924,0 -66.149,43.932,0 -66.154,43.947,0 -66.161,43.961,0 -66.163,43.976,0 -66.149,44.003,0 -66.15,44.011,0 -66.156,44.022,0 -66.158,44.024,0 -66.183,44.084,0 -66.194,44.093,0 -66.21,44.086,0 -66.21,44.106,0 -66.195,44.143,0 -66.19,44.165,0 -66.188,44.171,0 -66.159,44.201,0 -66.152,44.209,0 -66.142,44.231,0 -66.114,44.343,0 -66.095,44.374,0 -66.063,44.394,0 -66.047,44.407,0 -66.04,44.426,0 -66.032,44.437,0 -65.966,44.489,0 -65.928,44.506,0 -65.889,44.533,0 -65.867,44.544,0 -65.848,44.557,0 -65.84,44.574,0 -65.849,44.587,0 -65.868,44.588,0 -65.913,44.58,0 -65.924,44.581,0 -65.933,44.584,0 -65.942,44.584,0 -66.028,44.521,0 -66.187,44.395,0 -66.197,44.391,0 -66.192,44.418,0 -66.18,44.434,0 -65.999,44.58,0 -65.889,44.631,0 -65.875,44.643,0 -65.786,44.696,0 -65.773,44.686,0 -65.763,44.672,0 -65.756,44.657,0 -65.752,44.642,0 -65.754,44.632,0 -65.757,44.621,0 -65.757,44.611,0 -65.749,44.607,0 -65.729,44.609,0 -65.71,44.614,0 -65.692,44.621,0 -65.68,44.629,0 -65.656,44.648,0 -65.625,44.667,0 -65.612,44.678,0 -65.601,44.696,0 -65.594,44.689,0 -65.537,44.737,0 -65.522,44.744,0 -65.494,44.749,0 -65.451,44.771,0 -65.429,44.778,0 -65.447,44.781,0 -65.492,44.758,0 -65.535,44.747,0 -65.615,44.709,0 -65.654,44.698,0 -65.676,44.696,0 -65.717,44.675,0 -65.742,44.668,0 -65.758,44.683,0 -65.723,44.728,0 -65.621,44.779,0 -65.457,44.855,0 -65.398,44.895,0 -65.378,44.901,0 -65.358,44.904,0 -65.232,44.955,0 -65.213,44.967,0 -65.18,44.993,0 -65.022,45.06,0 -64.863,45.14,0 -64.714,45.192,0 -64.644,45.201,0 -64.575,45.22,0 -64.511,45.229,0 -64.475,45.24,0 -64.441,45.256,0 -64.415,45.272,0 -64.395,45.302,0 -64.417,45.32,0 -64.459,45.329,0 -64.498,45.334,0 -64.478,45.341,0 -64.456,45.339,0 -64.415,45.326,0 -64.349,45.32,0 -64.33,45.31,0 -64.318,45.295,0 -64.32,45.283,0 -64.33,45.272,0 -64.343,45.262,0 -64.351,45.248,0 -64.359,45.213,0 -64.367,45.197,0 -64.352,45.185,0 -64.357,45.171,0 -64.372,45.157,0 -64.388,45.149,0 -64.367,45.126,0 -64.362,45.116,0 -64.367,45.108,0 -64.357,45.104,0 -64.345,45.106,0 -64.337,45.113,0 -64.333,45.125,0 -64.331,45.136,0 -64.326,45.142,0 -64.317,45.146,0 -64.305,45.149,0 -64.223,45.109,0 -64.151,45.05,0 -64.149,45.039,0 -64.155,44.984,0 -64.147,44.998,0 -64.136,45.003,0 -64.122,45.003,0 -64.107,44.998,0 -64.116,45.012,0 -64.119,45.03,0 -64.114,45.046,0 -64.101,45.053,0 -64.101,45.06,0 -64.119,45.062,0 -64.136,45.073,0 -64.184,45.114,0 -64.197,45.133,0 -64.199,45.149,0 -64.166,45.16,0 -64.164,45.168,0 -64.166,45.178,0 -64.165,45.186,0 -64.158,45.192,0 -64.139,45.2,0 -64.131,45.207,0 -64.115,45.216,0 -64.024,45.242,0 -63.963,45.251,0 -63.906,45.276,0 -63.885,45.279,0 -63.846,45.277,0 -63.825,45.28,0 -63.809,45.289,0 -63.804,45.299,0 -63.804,45.306,0 -63.801,45.311,0 -63.788,45.313,0 -63.76,45.311,0 -63.748,45.308,0 -63.737,45.3,0 -63.73,45.306,0 -63.72,45.322,0 -63.716,45.326,0 -63.708,45.326,0 -63.675,45.32,0 -63.579,45.322,0 -63.543,45.332,0 -63.524,45.334,0 -63.504,45.329,0 -63.492,45.317,0 -63.483,45.303,0 -63.469,45.292,0 -63.461,45.325,0 -63.433,45.345,0 -63.396,45.356,0 -63.36,45.361,0 -63.392,45.372,0 -63.507,45.375,0 -63.528,45.378,0 -63.571,45.392,0 -63.593,45.395,0 -63.816,45.395,0 -63.834,45.392,0 -63.849,45.385,0 -63.874,45.367,0 -63.88,45.362,0 -63.885,45.356,0 -63.891,45.353,0 -63.901,45.354,0 -63.91,45.359,0 -63.914,45.365,0 -63.914,45.373,0 -63.908,45.382,0 -63.936,45.399,0 -64.014,45.391,0 -64.052,45.395,0 -64.042,45.401,0 -64.038,45.402,0 -64.066,45.413,0 -64.105,45.415,0 -64.183,45.409,0 -64.244,45.395,0 -64.276,45.392,0 -64.312,45.402,0 -64.314,45.382,0 -64.322,45.38,0 -64.334,45.386,0 -64.347,45.389,0 -64.359,45.386,0 -64.37,45.382,0 -64.379,45.375,0 -64.388,45.367,0 -64.4,45.373,0 -64.436,45.382,0 -64.446,45.388,0 -64.451,45.395,0 -64.459,45.4,0 -64.576,45.416,0 -64.62,45.409,0 -64.672,45.389,0 -64.707,45.361,0 -64.696,45.326,0 -64.717,45.325,0 -64.732,45.316,0 -64.745,45.306,0 -64.759,45.3,0 -64.768,45.297,0 -64.768,45.298,0 -64.767,45.303,0 -64.772,45.313,0 -64.773,45.318,0 -64.766,45.325,0 -64.768,45.33,0 -64.774,45.333,0 -64.786,45.332,0 -64.792,45.334,0 -64.823,45.348,0 -64.86,45.353,0 -64.897,45.347,0 -64.929,45.326,0 -64.936,45.351,0 -64.929,45.383,0 -64.915,45.412,0 -64.902,45.43,0 -64.854,45.457,0 -64.839,45.459,0 -64.815,45.468,0 -64.799,45.471,0 -64.833,45.484,0 -64.706,45.537,0 -64.681,45.543,0 -64.663,45.557,0 -64.649,45.559,0 -64.645,45.586,0 -64.613,45.603,0 -64.573,45.615,0 -64.542,45.632,0 -64.513,45.657,0 -64.484,45.676,0 -64.477,45.679,0 -64.462,45.681,0 -64.457,45.683,0 -64.448,45.691,0 -64.438,45.704,0 -64.429,45.71,0 -64.437,45.725,0 -64.439,45.739,0 -64.432,45.748,0 -64.412,45.752,0 -64.398,45.756,0 -64.386,45.768,0 -64.379,45.781,0 -64.381,45.793,0 -64.305,45.827,0 -64.293,45.816,0 -64.294,45.805,0 -64.312,45.786,0 -64.319,45.781,0 -64.326,45.78,0 -64.331,45.777,0 -64.333,45.769,0 -64.331,45.763,0 -64.328,45.76,0 -64.328,45.755,0 -64.333,45.745,0 -64.317,45.756,0 -64.303,45.762,0 -64.287,45.765,0 -64.264,45.765,0 -64.269,45.774,0 -64.279,45.779,0 -64.291,45.78,0 -64.305,45.779,0 -64.294,45.784,0 -64.283,45.794,0 -64.274,45.805,0 -64.271,45.814,0 -64.271,45.831,0 -64.273,45.836,0 -64.273,45.836,0 -64.264,45.845,0 -64.258,45.857,0 -64.252,45.87,0 -64.245,45.881,0 -64.23,45.894,0 -64.214,45.904,0 -64.199,45.916,0 -64.187,45.931,0 -64.175,45.95,0 -64.16,45.964,0 -64.141,45.973,0 -64.12,45.976,0 -64.099,45.975,0 -64.073,45.973,0 -64.051,45.977,0 -64.043,45.992,0 -64.043,45.992,0 -64.042,45.991,0 -64.033,45.995,0 -64.024,46.002,0 -64.017,46.005,0 -64.008,46.005,0 -59.706,46.011,0 -59.706,45.999,0 -59.708,45.995,0 -59.714,45.998,0 -59.726,46,0 -59.76,46,0 -59.781,46.004,0 -59.778,46.012,0 -59.724,46.029,0 -59.695,46.034,0 -59.689,46.03,0 -59.703,46.023,0 -59.706,46.011,0 -60.501,47.001,0 -60.486,46.999,0 -60.461,47.003,0 -60.42,47.022,0 -60.396,47.026,0 -60.383,47.017,0 -60.398,46.996,0 -60.434,46.964,0 -60.465,46.927,0 -60.49,46.905,0 -60.496,46.896,0 -60.474,46.897,0 -60.452,46.893,0 -60.442,46.885,0 -60.455,46.876,0 -60.455,46.868,0 -60.43,46.864,0 -60.393,46.863,0 -60.358,46.866,0 -60.339,46.876,0 -60.331,46.872,0 -60.323,46.867,0 -60.317,46.861,0 -60.311,46.855,0 -60.305,46.834,0 -60.309,46.803,0 -60.324,46.745,0 -60.342,46.709,0 -60.345,46.694,0 -60.352,46.687,0 -60.399,46.67,0 -60.391,46.661,0 -60.381,46.656,0 -60.37,46.654,0 -60.358,46.656,0 -60.358,46.65,0 -60.365,46.648,0 -60.378,46.644,0 -60.386,46.642,0 -60.374,46.63,0 -60.36,46.623,0 -60.35,46.616,0 -60.352,46.601,0 -60.357,46.595,0 -60.38,46.581,0 -60.421,46.525,0 -60.461,46.423,0 -60.473,46.407,0 -60.509,46.369,0 -60.516,46.356,0 -60.53,46.324,0 -60.578,46.264,0 -60.606,46.21,0 -60.606,46.21,0 -60.605,46.211,0 -60.6,46.201,0 -60.599,46.197,0 -60.552,46.262,0 -60.54,46.272,0 -60.524,46.278,0 -60.475,46.32,0 -60.443,46.333,0 -60.434,46.334,0 -60.419,46.33,0 -60.416,46.324,0 -60.418,46.315,0 -60.421,46.303,0 -60.427,46.284,0 -60.442,46.271,0 -60.475,46.252,0 -60.612,46.128,0 -60.632,46.118,0 -60.675,46.102,0 -60.691,46.091,0 -60.701,46.088,0 -60.715,46.107,0 -60.725,46.105,0 -60.748,46.085,0 -60.756,46.081,0 -60.773,46.073,0 -60.816,46.062,0 -60.873,46.053,0 -60.879,46.062,0 -60.874,46.068,0 -60.863,46.073,0 -60.852,46.074,0 -60.874,46.079,0 -60.912,46.052,0 -60.975,45.992,0 -60.993,45.982,0 -61.015,45.975,0 -61.102,45.958,0 -61.119,45.95,0 -61.126,45.93,0 -61.033,45.937,0 -61.01,45.942,0 -60.995,45.954,0 -60.983,45.97,0 -60.969,45.985,0 -60.903,46.01,0 -60.884,46.035,0 -60.863,46.038,0 -60.818,46.039,0 -60.773,46.059,0 -60.747,46.066,0 -60.736,46.057,0 -60.743,46.037,0 -60.76,46.022,0 -60.781,46.008,0 -60.797,45.992,0 -60.803,45.975,0 -60.806,45.954,0 -60.815,45.937,0 -60.835,45.93,0 -60.847,45.929,0 -60.858,45.925,0 -60.868,45.92,0 -60.876,45.913,0 -60.886,45.908,0 -60.898,45.91,0 -60.92,45.916,0 -60.962,45.915,0 -60.981,45.91,0 -60.989,45.899,0 -61.001,45.897,0 -61.056,45.898,0 -61.071,45.896,0 -61.052,45.889,0 -61.044,45.889,0 -61.057,45.88,0 -61.073,45.875,0 -61.088,45.868,0 -61.098,45.855,0 -61.084,45.854,0 -61.061,45.857,0 -61.039,45.864,0 -61.03,45.872,0 -61.019,45.876,0 -60.998,45.875,0 -60.983,45.877,0 -60.989,45.889,0 -60.968,45.886,0 -60.914,45.855,0 -60.926,45.848,0 -60.937,45.851,0 -60.949,45.857,0 -60.965,45.861,0 -60.967,45.857,0 -60.942,45.835,0 -60.934,45.827,0 -60.953,45.827,0 -60.961,45.829,0 -60.969,45.834,0 -60.982,45.821,0 -60.995,45.82,0 -61.006,45.824,0 -61.013,45.823,0 -61.024,45.814,0 -61.103,45.779,0 -61.123,45.764,0 -61.134,45.745,0 -61.129,45.747,0 -61.112,45.752,0 -61.111,45.745,0 -61.111,45.736,0 -61.113,45.728,0 -61.116,45.724,0 -61.126,45.722,0 -61.134,45.717,0 -61.14,45.712,0 -61.148,45.708,0 -61.143,45.703,0 -61.133,45.699,0 -61.082,45.691,0 -61.049,45.699,0 -60.947,45.752,0 -60.913,45.756,0 -60.873,45.752,0 -60.836,45.741,0 -60.807,45.721,0 -60.799,45.703,0 -60.808,45.691,0 -60.824,45.679,0 -60.845,45.655,0 -60.85,45.651,0 -60.849,45.648,0 -60.838,45.642,0 -60.829,45.641,0 -60.826,45.644,0 -60.828,45.65,0 -60.832,45.655,0 -60.81,45.663,0 -60.818,45.669,0 -60.784,45.669,0 -60.777,45.674,0 -60.766,45.693,0 -60.759,45.694,0 -60.744,45.685,0 -60.732,45.684,0 -60.73,45.691,0 -60.742,45.704,0 -60.73,45.714,0 -60.733,45.725,0 -60.743,45.735,0 -60.749,45.745,0 -60.746,45.76,0 -60.737,45.774,0 -60.725,45.785,0 -60.715,45.793,0 -60.7,45.8,0 -60.669,45.81,0 -60.653,45.82,0 -60.644,45.831,0 -60.634,45.844,0 -60.623,45.856,0 -60.609,45.861,0 -60.599,45.866,0 -60.569,45.89,0 -60.541,45.901,0 -60.521,45.924,0 -60.478,45.937,0 -60.445,45.954,0 -60.416,45.976,0 -60.399,45.998,0 -60.42,45.993,0 -60.463,45.977,0 -60.497,45.957,0 -60.564,45.944,0 -60.621,45.92,0 -60.646,45.913,0 -60.665,45.899,0 -60.699,45.891,0 -60.71,45.89,0 -60.722,45.896,0 -60.731,45.905,0 -60.74,45.923,0 -60.749,45.93,0 -60.762,45.931,0 -60.776,45.929,0 -60.787,45.93,0 -60.791,45.94,0 -60.782,45.954,0 -60.715,45.985,0 -60.684,46.007,0 -60.666,46.015,0 -60.642,46.018,0 -60.622,46.024,0 -60.564,46.067,0 -60.508,46.091,0 -60.489,46.102,0 -60.431,46.149,0 -60.417,46.156,0 -60.405,46.164,0 -60.375,46.197,0 -60.355,46.205,0 -60.334,46.205,0 -60.315,46.209,0 -60.301,46.219,0 -60.297,46.238,0 -60.318,46.23,0 -60.338,46.226,0 -60.383,46.224,0 -60.401,46.218,0 -60.447,46.177,0 -60.607,46.077,0 -60.63,46.068,0 -60.639,46.067,0 -60.653,46.072,0 -60.655,46.082,0 -60.65,46.091,0 -60.642,46.095,0 -60.621,46.101,0 -60.601,46.116,0 -60.571,46.149,0 -60.502,46.201,0 -60.494,46.218,0 -60.475,46.234,0 -60.351,46.312,0 -60.283,46.328,0 -60.279,46.317,0 -60.259,46.279,0 -60.205,46.242,0 -60.212,46.224,0 -60.29,46.156,0 -60.278,46.159,0 -60.268,46.166,0 -60.261,46.173,0 -60.256,46.177,0 -60.244,46.176,0 -60.235,46.173,0 -60.221,46.162,0 -60.212,46.145,0 -60.205,46.142,0 -60.194,46.156,0 -60.192,46.166,0 -60.195,46.175,0 -60.199,46.184,0 -60.201,46.194,0 -60.193,46.212,0 -60.174,46.231,0 -60.152,46.246,0 -60.136,46.252,0 -60.109,46.251,0 -60.083,46.246,0 -60.059,46.238,0 -60.037,46.224,0 -60.091,46.211,0 -59.991,46.207,0 -59.944,46.196,0 -59.948,46.162,0 -59.934,46.159,0 -59.901,46.172,0 -59.882,46.177,0 -59.81,46.17,0 -59.836,46.156,0 -59.863,46.137,0 -59.882,46.111,0 -59.885,46.081,0 -59.871,46.094,0 -59.851,46.105,0 -59.829,46.112,0 -59.81,46.115,0 -59.81,46.108,0 -59.872,46.074,0 -59.896,46.05,0 -59.909,46.042,0 -59.954,46.036,0 -59.958,46.028,0 -59.95,46.016,0 -59.937,46.002,0 -59.921,45.995,0 -59.898,45.997,0 -59.858,46.005,0 -59.84,46.005,0 -59.832,46.003,0 -59.824,45.998,0 -59.83,45.999,0 -59.832,45.992,0 -59.83,45.978,0 -59.824,45.971,0 -59.807,45.961,0 -59.803,45.957,0 -59.802,45.945,0 -59.805,45.936,0 -59.812,45.931,0 -59.824,45.933,0 -59.862,45.936,0 -59.939,45.904,0 -59.968,45.91,0 -59.975,45.905,0 -59.98,45.901,0 -59.985,45.896,0 -59.989,45.889,0 -59.984,45.886,0 -59.98,45.88,0 -59.975,45.875,0 -60.127,45.87,0 -60.153,45.847,0 -60.155,45.838,0 -60.154,45.837,0 -60.147,45.838,0 -60.133,45.834,0 -60.112,45.824,0 -60.101,45.821,0 -60.088,45.82,0 -60.075,45.816,0 -60.072,45.806,0 -60.074,45.797,0 -60.081,45.793,0 -60.093,45.791,0 -60.178,45.767,0 -60.199,45.756,0 -60.208,45.741,0 -60.215,45.719,0 -60.235,45.707,0 -60.26,45.7,0 -60.283,45.697,0 -60.323,45.684,0 -60.395,45.643,0 -60.441,45.636,0 -60.462,45.636,0 -60.47,45.64,0 -60.475,45.649,0 -60.5,45.632,0 -60.512,45.627,0 -60.63,45.595,0 -60.662,45.578,0 -60.672,45.574,0 -60.704,45.573,0 -60.711,45.572,0 -60.719,45.568,0 -60.727,45.566,0 -60.736,45.567,0 -60.741,45.573,0 -60.742,45.582,0 -60.744,45.59,0 -60.752,45.594,0 -60.828,45.601,0 -60.844,45.605,0 -60.849,45.614,0 -60.85,45.627,0 -60.855,45.639,0 -60.871,45.646,0 -60.884,45.637,0 -60.895,45.624,0 -60.907,45.614,0 -60.916,45.621,0 -60.925,45.626,0 -60.936,45.628,0 -60.947,45.628,0 -60.946,45.612,0 -60.97,45.608,0 -61.024,45.614,0 -61.01,45.608,0 -61.016,45.595,0 -61.025,45.592,0 -61.047,45.594,0 -61.058,45.592,0 -61.085,45.573,0 -61.131,45.56,0 -61.157,45.557,0 -61.175,45.559,0 -61.157,45.565,0 -61.151,45.572,0 -61.155,45.579,0 -61.167,45.587,0 -61.182,45.59,0 -61.196,45.59,0 -61.205,45.593,0 -61.208,45.608,0 -61.215,45.6,0 -61.22,45.59,0 -61.225,45.582,0 -61.232,45.584,0 -61.241,45.585,0 -61.253,45.58,0 -61.266,45.572,0 -61.277,45.567,0 -61.27,45.548,0 -61.284,45.548,0 -61.322,45.559,0 -61.335,45.566,0 -61.363,45.611,0 -61.419,45.657,0 -61.442,45.682,0 -61.455,45.71,0 -61.465,45.776,0 -61.475,45.811,0 -61.492,45.827,0 -61.497,45.835,0 -61.489,45.889,0 -61.5,45.906,0 -61.514,45.919,0 -61.523,45.933,0 -61.516,45.951,0 -61.521,45.961,0 -61.521,45.981,0 -61.523,45.992,0 -61.529,45.997,0 -61.538,46.003,0 -61.547,46.012,0 -61.551,46.022,0 -61.541,46.041,0 -61.517,46.053,0 -61.491,46.063,0 -61.475,46.074,0 -61.47,46.093,0 -61.466,46.12,0 -61.459,46.145,0 -61.445,46.156,0 -61.431,46.163,0 -61.384,46.194,0 -61.289,46.243,0 -61.28,46.246,0 -61.278,46.255,0 -61.212,46.331,0 -61.191,46.367,0 -61.178,46.386,0 -61.095,46.454,0 -61.086,46.467,0 -61.08,46.481,0 -61.075,46.513,0 -61.066,46.527,0 -61.04,46.55,0 -61.03,46.568,0 -61.037,46.582,0 -61.05,46.592,0 -61.057,46.601,0 -61.054,46.612,0 -61.043,46.625,0 -61.029,46.637,0 -61.016,46.642,0 -61.03,46.612,0 -61.03,46.601,0 -61.024,46.593,0 -61.017,46.601,0 -61.012,46.614,0 -61.01,46.626,0 -61.005,46.633,0 -60.972,46.653,0 -60.965,46.662,0 -60.947,46.698,0 -60.899,46.769,0 -60.869,46.8,0 -60.832,46.821,0 -60.788,46.835,0 -60.769,46.844,0 -60.701,46.905,0 -60.651,46.982,0 -60.642,47.004,0 -60.633,47.011,0 -60.623,47.017,0 -60.603,47.034,0 -60.593,47.035,0 -60.571,47.026,0 -60.534,47.022,0 -60.523,47.019,0 -60.514,47.013,0 -60.509,47.007,0 -60.501,47.001,0 ",
+
+ "gpx" : "Nova Scotia #0name=Nova Scotia #0\nstroke=0000ff\nstroke-opacity=1\nstroke-width=1Nova Scotia #1name=Nova Scotia #1\nstroke=0000ff\nstroke-opacity=1\nstroke-width=1Nova Scotia #2name=Nova Scotia #2\nstroke=0000ff\nstroke-opacity=1\nstroke-width=1Nova Scotia #3name=Nova Scotia #3\nstroke=0000ff\nstroke-opacity=1\nstroke-width=1Nova Scotia #4name=Nova Scotia #4\nstroke=0000ff\nstroke-opacity=1\nstroke-width=1