name | type | description |
---|---|---|
matched_points |
Array<Array<Number>> |
Coordinates the points snapped to the road network as latitude, longitude pairs. |
indices |
Array<Number> |
Array that gives the indices of the matched coordinates in the original trace. |
geometry |
String |
Geometry of the matched trace in the road network, compressed as a polyline with 6 decimals of precision. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var geojson2svg = require('geojson2svg'); | |
var turf = require('turf'); | |
var fs = require('fs') | |
var polys = require('polygons.json') // a featurecollection of geojson polygons with a name property | |
polys.features.forEach(function(poly){ | |
var extent = turf.bbox(poly) | |
var options = { | |
viewportSize: {width: 200, height: 100}, | |
mapExtent: {left: extent[0], bottom: extent[1], right: extent[2], top: extent[3]}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tileReduce = require('tile-reduce'); | |
var path = require('path'); | |
tileReduce({ | |
zoom: 14, | |
map: path.join(__dirname, '/process.js'), | |
sources: [ | |
{name: 'ways', mbtiles: 'ways.mbtiles')} | |
] | |
}); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var turf = require('turf') | |
var tilebelt = require('tilebelt') | |
// put your own data here | |
var stargazers = [<list of lat lons>] | |
// this sets the size of your grid cells; each grid cell is a map tile at the given zoom | |
var zoom = 12 | |
// tiles is a hash we can quickly add new tiles too and increment counts | |
var tiles = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var turf = require('turf') | |
var polys = //my polygon featurecollection | |
var edges = [] | |
polys.features.forEach(function(poly){ | |
for(var i = 0; i < poly.geometry.coordinates[0].length-1; i++){ | |
edges.push({ | |
start: turf.point(poly.geometry.coordinates[0][i]), | |
stop: turf.point(poly.geometry.coordinates[0][i+1]) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../wgrib2 000 -s | grep "TMP:surface" | ../wgrib2 -i 000 -csv out.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var poly = { | |
"type": "Feature", | |
"properties": {}, | |
"geometry": { | |
"type": "Polygon", | |
"coordinates": [ | |
[ | |
[ | |
51.17431640625, | |
47.025206001585396 |