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
# Copyright 2019 A. H. | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation | |
# the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the | |
# Software is furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
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
<template> | |
<div> | |
<div class="range_container"> | |
<div class="sliders_control"> | |
<input | |
id="fromSlider" | |
v-model="fromVal" | |
type="range" | |
:min="min" | |
:max="max" |
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
# on a Mac: brew install osmium-tool | |
# get relations with boundary=administrative tag, use -t to throw away unneeded tag info | |
# (otherwise a bunch of unneeded objects remain) | |
osmium tags-filter -t -o bound.osm.pbf planet-latest.osm.pbf r/boundary=administrative | |
# same, but filtering futher for admin_level=2 | |
osmium tags-filter -t -o admin_level_2.osm.pbf bound.osm.pbf r/admin_level=2 | |
#convert to geojson for further processing | |
osmium export admin_level_2.osm.pbf -o admin_level_2.geojson |
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.
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
import matplotlib | |
import numpy as np | |
import matplotlib.pyplot as plt | |
#https://scipy-cookbook.readthedocs.io/items/Matplotlib_ColormapTransformations.html | |
def cmap_map(function, cmap): | |
""" Applies function (which should operate on vectors of shape 3: [r, g, b]), on colormap cmap. | |
This routine will break any discontinuous points in a colormap. | |
""" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder