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
// ==UserScript== | |
// @name Wiki tags | |
// @namespace maxerickson | |
// @version 0.1 | |
// @description Add osm style key=value tags to wikipedia pages. | |
// @author Max Erickson | |
// @match *://*.wikipedia.org/* | |
// @grant none | |
// ==/UserScript== |
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
def filterTags(tags): | |
if tags is None: | |
return | |
newtags = {} | |
if tags["STREETNAME"]!="": | |
newtags["addr:street"]=tags["STREETNAME"].title() | |
if tags["STATE"]!="": | |
newtags["addr:state"]=tags["STATE"] | |
if tags["ZIPCODE"]!="": | |
newtags["addr:postcode"]=tags["ZIPCODE"] |
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
FeatureName | ID | Class | County | State | Latitude | Longitude | Ele(ft) | Map | BGN Date | Entry Date | wikidata | wikipedia | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Groveland Township | 1625796 | Civil | Oakland | MI | 42.8139171 | -83.5471684 | 1004 | Davisburg | 01-AUG-1995 |
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
# -*- coding: utf8 -*- | |
# mapping for Carreteras estatales found | |
# at http://www2.pr.gov/agencias/gis/descargaGeodatos/Infraestructuras/Pages/Transportaci%C3%B3n.aspx | |
# more documentation at http://wiki.openstreetmap.org/wiki/Puerto_Rico_Projects/Puerto_Rico_TIGER_Fixup | |
# | |
# need to delete one feature because of character encoding issues. | |
# ogrinfo -dialect SQLite -sql "delete from g35_viales_carreteras_estatales_julio_2015 where objectid==2022" /share/gis/prhta | |
road_map={ | |
"Red Primaria Urbana Paseo Peatonal":"footway", |
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
( | |
way(5610940); | |
way(5613614); | |
way(5628515); | |
way(5668989); | |
way(5669355); | |
way(5669945); | |
way(5670127); | |
way(5670485); | |
way(5670627); |
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
/* JOSM Validator rules for flagging potential issues with US highways */ | |
way[highway=unclassified][!name][!ref]{ | |
group: tr("US Highways - Tagging"); | |
throwWarning: tr("Unnamed highway=unclassified"); | |
} | |
way!:closed[highway=~/ry/]>[index=1] node!:connection:in-downloaded-area, | |
way!:closed[highway=~/ry/]>[index=-1] node!:connection:in-downloaded-area{ | |
group: tr("US Highways - Geometry"); |
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
#!/bin/python3 | |
import json | |
import os | |
import argparse | |
def make_parser(): | |
parser = argparse.ArgumentParser(description='Clean up tags.') | |
parser.add_argument('input', type=str, |
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
Existing height for 261458936 125 14.0 | |
Existing height for 261458937 107 125.0 | |
Existing height for 261458938 110 125.0 | |
Existing height for 261458939 46 125.0 | |
Existing height for 261458940 121 125.0 | |
Existing height for 261458941 121 125.0 | |
Existing height for 261458942 110 125.0 | |
Existing height for 261458943 114 125.0 | |
Existing height for 261458944 118 125.0 | |
Existing height for 261458945 23 125.0 |
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
#! /bin/bash -x | |
# transform USFS tag scheme to osm tags | |
INFILE=$1 | |
OUTFILE=$2 | |
INLAYER=$(basename $INFILE) | |
INLAYER=${INLAYER%.*} | |
OUTLAYER=$(basename $OUTFILE) | |
OUTLAYER=${OUTLAYER%.*} | |
# select interesting columns, create osm fields | |
ogr2ogr -overwrite -sql "select 'FS ' + ID as ref, NAME as name, SYMBOL_COD as fscode, '' as highway, '' as surface from $INLAYER" -f "ESRI Shapefile" $OUTFILE $INFILE |
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
node:modified < way[natural=coastline]{ | |
throwWarning: tr("Outdated coastline source="); | |
fixAdd: "source=kartverket n50"; | |
} |