Skip to content

Instantly share code, notes, and snippets.

View timwaters's full-sized avatar
💭
Set your status

Tim Waters timwaters

💭
Set your status
View GitHub Profile
@timwaters
timwaters / gist:1206922
Created September 9, 2011 18:12
live blog attempt openstreetmap sotm 2011
friday openstreetmap conference - state of the map 2011
panel discussion about getting osm with business
how to build software to get data into osm. needs millions of people. So need apps that are different thaneditor - gmaes, fun stuff, that happen inciodentally to add stuff to map.
philip - scobbler
good and painful experiences
germany - very good data
how can we close gap, spotting errors on map, and pro mappier fixing them
parti plats lat long
SDP A 60.2452640095735 24.906005859375
SDP B 60.3323860724971 25.400390625
Kok C 60.2234472043989 24.27978515625
Kok D 60.4084276004575 24.58740234375
require 'rubygems'
require 'qusion'
begin
Qusion.start(ENV)
rescue => e
raise "Failed to start Qusion: #{e}"
end
#start listening.
@timwaters
timwaters / gist:639346
Created October 21, 2010 20:59
batch import of control points into mapwarper
require 'fastercsv'
namespace :import do
desc "Imports GCP from a CSV file"
task :gcps_from_csv => :environment do
filename = "/path/to/lovely.csv"
puts "This imports a load of points from a csv file."
puts "WARNING: This may bugger up the system, especially if you have a lot of points!"
puts "Using File #{filename}"
<wfs:FeatureCollection xmlns:wfs='http://www.opengis.net/wfs'><gml:featureMember xmlns:gml='http://www.opengis.net/gml'><feature:features xmlns:feature='http://mapserver.gis.umn.edu/map
server' fid='OpenLayers.Feature.Vector_376'><feature:geometry><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates cs=',' ts=' ' decimal='.'>386.1038331111523,430.56381244
0417 8662.60570320745,453.291312440417 8648.969203207427,6256.97686852735 347.9197403869348,6216.06736852735 386.1038331111523,430.563812440417</gml:coordinates></gml:LinearRing></gml:o
uterBoundaryIs></gml:Polygon></feature:geometry></feature:features></gml:featureMember></wfs:FeatureCollection>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"><gml:featureMember xmlns:gml="http://www.opengis.net/gml"><feature:features xmlns:feature="http://mapserver.gis.umn.edu/map
server" fid="OpenLayers.Feature.Vector_376"><feature:geometry><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal="." cs="," ts=" ">386.10383311
<WMT_MS_Capabilities version="1.1.1">
<Service>
<Name>OGC:WMS</Name>
<Title/>
<OnlineResource xlink:href="http://localhost/cgi-bin/tilecache/tilecache.cgi?"/>
</Service>
<Capability>
<?xml version="1.0" ?><Map bgcolor="rgb(255,255,255)" srs="+init=epsg:4326">
<Style name="NYC_Structures4326_style">
<Rule>
<PolygonSymbolizer>
<CssParameter name="fill">rgb(78,110,187)</CssParameter>
<CssParameter name="gamma">0.7</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke-width">0.96</CssParameter>
</LineSymbolizer>
#tried this with ` Kernel.system IO.popen and open3:popen3
p "mkdir -p tmp/demo/{first/{app,views},second}" #works on command line tmp/demo/first/app /views tmp/demp/second
`mkdir -p tmp/demo/{first/{app,views},second}` #doesnt - literally creates tmp/demo/{first/{app,views},second}/
#sh -c "/bin/mkdir -p tmp/demo/{first/{app,views},second}" on command line also creates the same error, if that helps
`bash -c "mkdir -p tmp/demo/{first/{app,views},second}"` DOES WORK