Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
/************************************************************************** | |
* OSM2GEO - OSM to GeoJSON converter | |
* OSM to GeoJSON converter takes in a .osm XML file as input and produces | |
* corresponding GeoJSON object. | |
* | |
* AUTHOR: P.Arunmozhi <aruntheguy@gmail.com> | |
* DATE : 26 / Nov / 2011 | |
* LICENSE : WTFPL - Do What The Fuck You Want To Public License | |
* LICENSE URL: http://sam.zoy.org/wtfpl/ | |
* |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
# Animated dplyr joins with gganimate | |
# * Garrick Aden-Buie | |
# * garrickadenbuie.com | |
# * MIT License: https://opensource.org/licenses/MIT | |
# Note: I used Fira Sans and Fira Mono fonts. | |
# Use search and replace to use a different font if Fira is not available. | |
library(tidyverse) | |
library(gganimate) |
if ( | |
distance( | |
overlay_nearest( | |
layer:='poligono', | |
expression:= $geometry )[0], $geometry) < | |
distance( | |
overlay_nearest( | |
layer:='linea', | |
expression:= $geometry )[0], $geometry),overlay_nearest( | |
layer:='poligono', |
# MultiPolygon output
ogr2ogr -f GeoJSON /tmp/mairies_multipolygons.geojson "/vsicurl/https://labs.webgeodatavore.com/partage/bdtopo.gpkg" \
-lco RFC7946=YES \
-sql "SELECT code_insee, nom_officiel, liens_vers_autorite_administrative, zone_d_activite_ou_d_interet.* FROM commune LEFT JOIN zone_d_activite_ou_d_interet ON liens_vers_autorite_administrative = zone_d_activite_ou_d_interet.cleabs"
# Point output
ogr2ogr -f GeoJSON /tmp/mairies_points.geojson "/vsicurl/https://labs.webgeodatavore.com/partage/bdtopo.gpkg" \