Skip to content

Instantly share code, notes, and snippets.

mn_id,uf_id,uf,municipio,pop_2010,osm_node,x,y,capital,regional_pole
120001305,AC,Acre,Acrelândia,12538,332175620,-9.825808,-66.897166,0,0
120005405,AC,Acre,Assis Brasil,6075,,-10.9409203,-69.5672108,0,0
120010405,AC,Acre,Brasiléia,21438,,-11.0012764,-68.7487974,0,0
120013805,AC,Acre,Bujari,8474,,-9.8309656,-67.9520886,0,0
120017905,AC,Acre,Capixaba,8810,415524127,-10.5729683,-67.6760894,0,0
120020305,AC,Acre,Cruzeiro do Sul,78444,415520985,-7.6307956,-72.6703869,0,0
120025205,AC,Acre,Epitaciolândia,15126,416655389,-11.0289439,-68.7411519,0,0
120030205,AC,Acre,Feijó,32311,415521860,-8.1639128,-70.3541781,0,0
120032805,AC,Acre,Jordão,6531,415523049,-9.4338167,-71.8843997,0,0
@vgeorge
vgeorge / extract-outer.js
Created October 26, 2013 16:08
A NodeJS script to extract the outer ring of GeoJSON polygons
var fs = require('fs')
, _ = require('underscore')
, file = require('./input.json')
_.each(file.features, function(feature, index){
file.features[index].geometry.coordinates = [feature.geometry.coordinates[0]]
console.log(index)
})
fs.writeFile('output.geojson', JSON.stringify(file), function(err){
@vgeorge
vgeorge / sufixos
Last active May 2, 2020 08:39
Importação IBGE Censo 2010 - Resultados do Universo
AC
AL
AM
AP
BA
CE
DF
ES
GO
MA
@vgeorge
vgeorge / xingu-basin.geojson
Last active August 29, 2015 14:09
Xingu basin
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vgeorge
vgeorge / Oficina de Geojornalismo
Last active August 29, 2015 14:11
Oficina de Geojornalismo
Código para a oficina de geojornalismo
@vgeorge
vgeorge / query.overpass
Created January 15, 2015 19:54
Overpass query for bicycle infrastructure
/*
This shows cycleways, cycleroutes and other bicycle infra-structure.
*/
[out:json];
(
// Get cycle route relations
relation[route=bicycle]({{bbox}})->.cr;
// Get cycleways
@vgeorge
vgeorge / README.md
Last active February 10, 2016 20:21 — forked from anonymous/overpass.geojson
Cachoeiras do Brasil no OpenStreetMap

Consulta no Overpass que busca todas as cachoeiras e quedas d'água mapeadas no OpenStreetMap em território brasileiro:

[out:json];
{{geocodeArea:brazil}}->.searchArea;
( 
  way["natural"="cliff"](area.searchArea);
  node["waterway"="waterfall"](area.searchArea);
);
out body;
@vgeorge
vgeorge / overpass.geojson
Created February 10, 2016 20:21 — forked from anonymous/overpass.geojson
data exported by overpass turbo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vgeorge
vgeorge / index.html
Last active April 14, 2016 17:10
An example of using esri-leaflet plugin to display a map from a MapService
<html>
<head>
<meta charset=utf-8 />
<title>Example</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/1.0.0-beta.2/leaflet.css" />
<script src="https://cdn.jsdelivr.net/leaflet/1.0.0-beta.2/leaflet.js"></script>
@vgeorge
vgeorge / README.md
Last active August 2, 2016 14:10
Como baixar geojson transporte sobre trilhos de uma cidade no OpenStreetMap

A consulta a seguir busca relações do tipo "route"="train" e "route"="subway" na área identificada como geocodeArea:SP:

[out:json][timeout:900];
{{geocodeArea:SP}}->.searchArea;
(
  relation["route"="train"](area.searchArea);
  relation["route"="subway"](area.searchArea);
);
out body;