StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/@mapbox/vector-tile/fixtures.js

157 lines
4.3 KiB

var mapnik = require('mapnik');
var path = require('path');
var fs = require('fs');
mapnik.register_datasource(path.join(mapnik.settings.paths.input_plugins, 'geojson.input'));
var fixtures = {
"zero-point": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPoint",
"coordinates": []
},
"properties": {}
}
]
},
"zero-line": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiLineString",
"coordinates": []
},
"properties": {}
}
]
},
"zero-polygon": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": []
},
"properties": {}
}
]
},
"singleton-multi-point": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPoint",
"coordinates": [[1, 2]]
},
"properties": {}
}
]
},
"singleton-multi-line": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiLineString",
"coordinates": [[[1, 2], [3, 4]]]
},
"properties": {}
}
]
},
"singleton-multi-polygon": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[[0, 0], [1, 0], [1, 1], [0, 0]]]]
},
"properties": {}
}
]
},
"multi-point": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPoint",
"coordinates": [[1, 2], [3, 4]]
},
"properties": {}
}
]
},
"multi-line": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiLineString",
"coordinates": [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
},
"properties": {}
}
]
},
"multi-polygon": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[[0, 0], [1, 0], [1, 1], [0, 0]]], [[[0, 0], [-1, 0], [-1, -1], [0, 0]]]]
},
"properties": {}
}
]
},
"polygon-with-inner": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[-2, 2], [2, 2], [2, -2], [-2, -2], [-2, 2]], [[-1, 1], [1, 1], [1, -1], [-1, -1], [-1, 1]]]
},
"properties": {}
}
]
},
"stacked-multipolygon": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [[[[-2, 2], [2, 2], [2, -2], [-2, -2], [-2, 2]]], [[[-1, 1], [1, 1], [1, -1], [-1, -1], [-1, 1]]]]
},
"properties": {}
}
]
}
}
for (var fixture in fixtures) {
var vtile = new mapnik.VectorTile(0, 0, 0);
vtile.addGeoJSON(JSON.stringify(fixtures[fixture]), "geojson");
fs.writeFileSync('./test/fixtures/' + fixture + '.pbf', vtile.getData());
}