Skip to content

Instantly share code, notes, and snippets.

View MateoV's full-sized avatar

Matt Greene MateoV

  • West Bloomfield, MI
View GitHub Profile
from decimal import Decimal, getcontext
getcontext().prec = 16
foo = str(Decimal(1)/Decimal(7))
print foo
bar = str(float(1)/float(7))
print bar

Hi XXX,

Your readers at XXX would be interested to know that it is now possible for any golfer to map and add details about his or her favorite courses online, with features that include fairways, greens, tees, cart paths, and hole numbers. This is done through OpenStreetMap (OSM), an open mapping community with an easy-to-use editor for adding or updating courses.

You can see how beautiful and accurate the user-interface of the maps are here.

The process is really simple; players and golf courses can easily trace satellite imagery from web-browsers, so that their course can be mapped in just 15 to 20 minutes. You can see a 60 second video of how this works here: http://player.vimeo.com/video/80284165. Moreover, golfers will find these maps available in mobile apps as early as 2014.

Please feel free to contact me with any questions. I look forward to speaking with you soon.

Description and workflow to be opened on tasks.openstreetmap.us

Description

DO NOT USE. Task not yet open to public, if you'd like to join effort, please post to GitHub.

Import of NYC building building perimeter outlines and addresses. For details, refer to related proposal.

Workflow

@MateoV
MateoV / custom-interaction.js
Created March 12, 2012 18:41 — forked from tristen/custom-interaction.js
Custom wax formatter
var mm = com.modestmaps;
var url = 'http://api.tiles.mapbox.com/v3/tristen.map-h7dkbvxx.jsonp';
// ## Map Implementation
wax.tilejson(url, function(tilejson) {
// By default, MapBox hosting adds
// templating markup to uploaded .mbtiles.
// In wax we want to remove the tilejson.template object
// so we can default to tilejson.formatter instead.
@MateoV
MateoV / index.html
Created January 20, 2012 23:09
Layer Switcher Example
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Tornadoes in the U.S.</title>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js' type='text/javascript'></script>
<script src='http://mapbox.com/wax/dist/modestmaps.js' type='text/javascript'></script>
<script src='http://mapbox.com/wax/dist/wax.mm.min.js' type='text/javascript'></script>
<link href='http://mapbox.com/wax/css/controls.css' rel='stylesheet' type='text/css' />
<script type='text/javascript'>
// Declare variables
var m, mm, interaction;
// Set initial map layer
var layer = 'mapbox.tornadoes-2010';
// Static part of the map url
var urlBase = 'http://api.tiles.mapbox.com/v3/mapbox.blue-marble-topo-jul,mapbox.world-borders-light,';
// Full map url
var url = urlBase + layer + '.jsonp';
@MateoV
MateoV / index.html
Created January 19, 2012 21:43
Microsite Example
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Tornadoes in the U.S. - 2010</title>
<script src='http://mapbox.com/wax/dist/modestmaps.js' type='text/javascript'></script>
<script src='http://mapbox.com/wax/dist/wax.mm.min.js' type='text/javascript'></script>
<link href='http://mapbox.com/wax/css/controls.css' rel='stylesheet' type='text/css' />
<style type='text/css'>
<script type='text/javascript'>
// Your map's TileJSON url. Define your map layers here.
var url = 'http://api.tiles.mapbox.com/v3/mapbox.blue-marble-topo-jul,mapbox.world-borders-light,mapbox.tornadoes-2010.jsonp';
// Shortening of 'com.modestmaps'
var mm = com.modestmaps;
wax.tilejson(url, function(tilejson) {
// Set up a new map in a div with id 'mymap'
var m = new mm.Map('mymap',
// Add a new map layer with Wax's connector
#mymap {
position: absolute;
top: 0;
right: 400px;
bottom: 0;
left: 0;
}
#sidebar {
position: absolute;
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
p {
line-height: 20px;
}