SlideShare ist ein Scribd-Unternehmen logo
1 von 49
http://en.wikipedia.org/wiki/
File:Bundesarchiv_Bild_102-08759,_Flugzeug_Junkers_G-24.jpg
Attribution: Bundesarchiv, Bild 102-08759 / Unknown / CC-BY-SA
No. 386
$KCODE = 'u'
require 'rubygems'
require 'sequel'
require 'geo_ruby'

DB = Sequel::connect('postgres://fitter:happier@localhost/more_productive',
  :encoding => 'UTF-8')

DB.create_table!(:japan_highway) do
  primary_key :gid
  String :type
  String :name
  boolean :oneway
  real :lanes
end
DB["SELECT AddGeometryColumn('', 'japan_highway', 'the_geom', '4326', 'MULTILINESTRING', 2);"].first

DB.transaction {
  GeoRuby::Shp4r::ShpFile.open('japan_highway.shp') {|shp|
    shp.each {|r|
      DB[:japan_highway].insert({
         :type => r.data['TYPE'],
         :name => r.data['NAME'],
         :oneway => r.data['ONEWAY'] == 'yes',
         :lanes => r.data['LANES'].to_f,
         :the_geom => :ST_GeomFromText.sql_function(r.geometry.as_wkt, 4326)
      })
    }
  }
}
class App < Sinatra::Base
  DB = Sequel::connect('postgres://fitter:happier@localhost/more_productive')

  get '/geohash/:file_name' do
    content_type 'text/html'
    geohash = params[:file_name].sub('.html', '')
    extent = GeoHash.decode(geohash)
    ...
    bbox = "ST_GeomFromText('POLYGON ((#{lng0} #{lat0}, #{lng1} #{lat0}, #{lng1} #{lat1}, #{lng0} #{lat1}, #{lng0} #{lat0}))', 4326)"
    @dataset = DB["SELECT ST_AsSVG(ST_Affine(ST_Intersection(the_geom, #{bbox}), #{a}, #{b}, #{d}, #{e}, #{x_off}, #{y_off}), 0, 0),
type, name FROM japan_highway WHERE ST_Intersects(the_geom, #{bbox});"]
    instr = []
    @dataset.each {|r|
       instr << "        r.path('#{r[:st_assvg]}').attr('stroke', '#{color}');n"
    }
    s = haml <<-EOS
!!!XML
%html
  ...
  %body
    :javascript
       window.onload = function() {
         ...
         });
         window.document.addEventListener('touchstart', function(evt) {
           ...
         }, false);
       ...
       }
    EOS
    File.open("public/geohash/#{geohash}.html", 'w') {|w|
       w.print s
    }
    s
  end
end

App.run! :port => 2010
require 'app'
run Sinatra::Application


require 'rubygems'
require 'sinatra'

get '/' do
  redirect '/geohash/xn77n.html'
end


require 'rubygems'
require 'pr_geohash'
require 'open-uri'

ALPHABET = "0123456789bcdefghjkmnpqrstuvwxyz"

def get(geohash)
  url = "http://localhost:2010/geohash/#{geohash}.html"
  print url, "n"
  open url
end

%w{xn7 xnk}.each {|seed|
  ALPHABET.each_char {|c1|
    ALPHABET.each_char {|c2|
      get(seed + c1 + c2)
    }
  }
}


$   sudo gem install heroku
$   heroku create degree-zero-web-mapping
$   git init
$   git add .
$   git commit
$   git push heroku master
Demo
Web+GISという視点から見たGISの方向性
Web+GISという視点から見たGISの方向性

Weitere ähnliche Inhalte

Was ist angesagt?

Nomethoderror talk
Nomethoderror talkNomethoderror talk
Nomethoderror talkJan Berdajs
 
AngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesAngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesEyal Vardi
 
Let's Build A Gutenberg Block | WordCamp Europe 2018
Let's Build A Gutenberg Block | WordCamp Europe 2018Let's Build A Gutenberg Block | WordCamp Europe 2018
Let's Build A Gutenberg Block | WordCamp Europe 2018Lara Schenck
 
Hacking the Internet of Things for Fun & Profit
Hacking the Internet of Things for Fun & ProfitHacking the Internet of Things for Fun & Profit
Hacking the Internet of Things for Fun & ProfitRuben van Vreeland
 
«Работа с базами данных с использованием Sequel»
«Работа с базами данных с использованием Sequel»«Работа с базами данных с использованием Sequel»
«Работа с базами данных с использованием Sequel»Olga Lavrentieva
 
Build web application by express
Build web application by expressBuild web application by express
Build web application by expressShawn Meng
 
hachioji.pm #40 : asynchronous in JS
hachioji.pm #40 : asynchronous in JShachioji.pm #40 : asynchronous in JS
hachioji.pm #40 : asynchronous in JSKotaro Kawashima
 
AngularJS Routing
AngularJS RoutingAngularJS Routing
AngularJS RoutingEyal Vardi
 
Desymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus BundlesDesymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus BundlesAlbert Jessurum
 
AngularJS Services
AngularJS ServicesAngularJS Services
AngularJS ServicesEyal Vardi
 
LINE iOS開発で実践しているGit tips
LINE iOS開発で実践しているGit tipsLINE iOS開発で実践しているGit tips
LINE iOS開発で実践しているGit tipsLINE Corporation
 
Vue.js SSR with Nuxt.js and Firebase
Vue.js SSR with Nuxt.js and Firebase Vue.js SSR with Nuxt.js and Firebase
Vue.js SSR with Nuxt.js and Firebase David Pichsenmeister
 
Java&Script
Java&ScriptJava&Script
Java&Scriptcarffuca
 
Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope RpxPlone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope RpxParis, France
 
Dion Almaer & Ben Galbraith - Build Once, Deploy Everywhere
Dion Almaer & Ben Galbraith - Build Once, Deploy EverywhereDion Almaer & Ben Galbraith - Build Once, Deploy Everywhere
Dion Almaer & Ben Galbraith - Build Once, Deploy EverywhereCarsonified Team
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xEyal Vardi
 
Как показать 90 млн картинок и сохранить жизнь диску
Как показать 90 млн картинок и сохранить жизнь дискуКак показать 90 млн картинок и сохранить жизнь диску
Как показать 90 млн картинок и сохранить жизнь дискуАндрей Шорин
 

Was ist angesagt? (20)

Nomethoderror talk
Nomethoderror talkNomethoderror talk
Nomethoderror talk
 
API Design
API DesignAPI Design
API Design
 
AngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesAngularJS - $http & $resource Services
AngularJS - $http & $resource Services
 
Let's Build A Gutenberg Block | WordCamp Europe 2018
Let's Build A Gutenberg Block | WordCamp Europe 2018Let's Build A Gutenberg Block | WordCamp Europe 2018
Let's Build A Gutenberg Block | WordCamp Europe 2018
 
Hacking the Internet of Things for Fun & Profit
Hacking the Internet of Things for Fun & ProfitHacking the Internet of Things for Fun & Profit
Hacking the Internet of Things for Fun & Profit
 
Expressを使ってみた
Expressを使ってみたExpressを使ってみた
Expressを使ってみた
 
«Работа с базами данных с использованием Sequel»
«Работа с базами данных с использованием Sequel»«Работа с базами данных с использованием Sequel»
«Работа с базами данных с использованием Sequel»
 
Build web application by express
Build web application by expressBuild web application by express
Build web application by express
 
hachioji.pm #40 : asynchronous in JS
hachioji.pm #40 : asynchronous in JShachioji.pm #40 : asynchronous in JS
hachioji.pm #40 : asynchronous in JS
 
Couchdb
CouchdbCouchdb
Couchdb
 
AngularJS Routing
AngularJS RoutingAngularJS Routing
AngularJS Routing
 
Desymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus BundlesDesymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus Bundles
 
AngularJS Services
AngularJS ServicesAngularJS Services
AngularJS Services
 
LINE iOS開発で実践しているGit tips
LINE iOS開発で実践しているGit tipsLINE iOS開発で実践しているGit tips
LINE iOS開発で実践しているGit tips
 
Vue.js SSR with Nuxt.js and Firebase
Vue.js SSR with Nuxt.js and Firebase Vue.js SSR with Nuxt.js and Firebase
Vue.js SSR with Nuxt.js and Firebase
 
Java&Script
Java&ScriptJava&Script
Java&Script
 
Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope RpxPlone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope Rpx
 
Dion Almaer & Ben Galbraith - Build Once, Deploy Everywhere
Dion Almaer & Ben Galbraith - Build Once, Deploy EverywhereDion Almaer & Ben Galbraith - Build Once, Deploy Everywhere
Dion Almaer & Ben Galbraith - Build Once, Deploy Everywhere
 
Angular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.xAngular 1.x vs. Angular 2.x
Angular 1.x vs. Angular 2.x
 
Как показать 90 млн картинок и сохранить жизнь диску
Как показать 90 млн картинок и сохранить жизнь дискуКак показать 90 млн картинок и сохранить жизнь диску
Как показать 90 млн картинок и сохранить жизнь диску
 

Ähnlich wie Web+GISという視点から見たGISの方向性

node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ioSteven Beeckman
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ EtsyNishan Subedi
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.jsWebsecurify
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsFrancois Zaninotto
 
Functional programming using underscorejs
Functional programming using underscorejsFunctional programming using underscorejs
Functional programming using underscorejs偉格 高
 
node.js practical guide to serverside javascript
node.js practical guide to serverside javascriptnode.js practical guide to serverside javascript
node.js practical guide to serverside javascriptEldar Djafarov
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)Igor Bronovskyy
 
Nodejs do teste de unidade ao de integração
Nodejs  do teste de unidade ao de integraçãoNodejs  do teste de unidade ao de integração
Nodejs do teste de unidade ao de integraçãoVinícius Pretto da Silva
 
An Introduction to Jquery
An Introduction to JqueryAn Introduction to Jquery
An Introduction to JqueryPhil Reither
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScriptersgerbille
 
Express Presentation
Express PresentationExpress Presentation
Express Presentationaaronheckmann
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch
 
How to Hack a Road Trip with a Webcam, a GSP and Some Fun with Node
How to Hack a Road Trip  with a Webcam, a GSP and Some Fun with NodeHow to Hack a Road Trip  with a Webcam, a GSP and Some Fun with Node
How to Hack a Road Trip with a Webcam, a GSP and Some Fun with Nodepdeschen
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JSMartin Rehfeld
 

Ähnlich wie Web+GISという視点から見たGISの方向性 (20)

node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.io
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
 
jQuery: Events, Animation, Ajax
jQuery: Events, Animation, AjaxjQuery: Events, Animation, Ajax
jQuery: Events, Animation, Ajax
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.js
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
Functional programming using underscorejs
Functional programming using underscorejsFunctional programming using underscorejs
Functional programming using underscorejs
 
node.js practical guide to serverside javascript
node.js practical guide to serverside javascriptnode.js practical guide to serverside javascript
node.js practical guide to serverside javascript
 
dojo.Patterns
dojo.Patternsdojo.Patterns
dojo.Patterns
 
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
09 - express nodes on the right angle - vitaliy basyuk - it event 2013 (5)
 
Nodejs do teste de unidade ao de integração
Nodejs  do teste de unidade ao de integraçãoNodejs  do teste de unidade ao de integração
Nodejs do teste de unidade ao de integração
 
Intro to Sail.js
Intro to Sail.jsIntro to Sail.js
Intro to Sail.js
 
An Introduction to Jquery
An Introduction to JqueryAn Introduction to Jquery
An Introduction to Jquery
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScripters
 
Express Presentation
Express PresentationExpress Presentation
Express Presentation
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
How to Hack a Road Trip with a Webcam, a GSP and Some Fun with Node
How to Hack a Road Trip  with a Webcam, a GSP and Some Fun with NodeHow to Hack a Road Trip  with a Webcam, a GSP and Some Fun with Node
How to Hack a Road Trip with a Webcam, a GSP and Some Fun with Node
 
Express JS
Express JSExpress JS
Express JS
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JS
 

Mehr von Hidenori Fujimura

150702 クライシスマッピングワークショップ@青山学院大学
150702 クライシスマッピングワークショップ@青山学院大学150702 クライシスマッピングワークショップ@青山学院大学
150702 クライシスマッピングワークショップ@青山学院大学Hidenori Fujimura
 
FOSS4G 2014 Tokyo 基調講演「GSI for All」
FOSS4G 2014 Tokyo 基調講演「GSI for All」FOSS4G 2014 Tokyo 基調講演「GSI for All」
FOSS4G 2014 Tokyo 基調講演「GSI for All」Hidenori Fujimura
 
140619 地理院ckanの舞台裏から
140619 地理院ckanの舞台裏から140619 地理院ckanの舞台裏から
140619 地理院ckanの舞台裏からHidenori Fujimura
 
JavaScriptでキャッシュつき地図(GEO x CODEライトニングトーク)
JavaScriptでキャッシュつき地図(GEO x CODEライトニングトーク)JavaScriptでキャッシュつき地図(GEO x CODEライトニングトーク)
JavaScriptでキャッシュつき地図(GEO x CODEライトニングトーク)Hidenori Fujimura
 
地図インフラのAPIからの独立について
地図インフラのAPIからの独立について地図インフラのAPIからの独立について
地図インフラのAPIからの独立についてHidenori Fujimura
 
FOSS4GとWebによる地図公開の共有
FOSS4GとWebによる地図公開の共有FOSS4GとWebによる地図公開の共有
FOSS4GとWebによる地図公開の共有Hidenori Fujimura
 
Sharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the WebSharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the WebHidenori Fujimura
 

Mehr von Hidenori Fujimura (8)

150702 クライシスマッピングワークショップ@青山学院大学
150702 クライシスマッピングワークショップ@青山学院大学150702 クライシスマッピングワークショップ@青山学院大学
150702 クライシスマッピングワークショップ@青山学院大学
 
FOSS4G 2014 Tokyo 基調講演「GSI for All」
FOSS4G 2014 Tokyo 基調講演「GSI for All」FOSS4G 2014 Tokyo 基調講演「GSI for All」
FOSS4G 2014 Tokyo 基調講演「GSI for All」
 
140619 地理院ckanの舞台裏から
140619 地理院ckanの舞台裏から140619 地理院ckanの舞台裏から
140619 地理院ckanの舞台裏から
 
JavaScriptでキャッシュつき地図(GEO x CODEライトニングトーク)
JavaScriptでキャッシュつき地図(GEO x CODEライトニングトーク)JavaScriptでキャッシュつき地図(GEO x CODEライトニングトーク)
JavaScriptでキャッシュつき地図(GEO x CODEライトニングトーク)
 
FOSS4Gで地理院地図
FOSS4Gで地理院地図FOSS4Gで地理院地図
FOSS4Gで地理院地図
 
地図インフラのAPIからの独立について
地図インフラのAPIからの独立について地図インフラのAPIからの独立について
地図インフラのAPIからの独立について
 
FOSS4GとWebによる地図公開の共有
FOSS4GとWebによる地図公開の共有FOSS4GとWebによる地図公開の共有
FOSS4GとWebによる地図公開の共有
 
Sharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the WebSharing the Openness of the Maps via FOSS4G and the Web
Sharing the Openness of the Maps via FOSS4G and the Web
 

Kürzlich hochgeladen

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Kürzlich hochgeladen (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Web+GISという視点から見たGISの方向性

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43. $KCODE = 'u' require 'rubygems' require 'sequel' require 'geo_ruby' DB = Sequel::connect('postgres://fitter:happier@localhost/more_productive', :encoding => 'UTF-8') DB.create_table!(:japan_highway) do primary_key :gid String :type String :name boolean :oneway real :lanes end DB["SELECT AddGeometryColumn('', 'japan_highway', 'the_geom', '4326', 'MULTILINESTRING', 2);"].first DB.transaction { GeoRuby::Shp4r::ShpFile.open('japan_highway.shp') {|shp| shp.each {|r| DB[:japan_highway].insert({ :type => r.data['TYPE'], :name => r.data['NAME'], :oneway => r.data['ONEWAY'] == 'yes', :lanes => r.data['LANES'].to_f, :the_geom => :ST_GeomFromText.sql_function(r.geometry.as_wkt, 4326) }) } } }
  • 44. class App < Sinatra::Base DB = Sequel::connect('postgres://fitter:happier@localhost/more_productive') get '/geohash/:file_name' do content_type 'text/html' geohash = params[:file_name].sub('.html', '') extent = GeoHash.decode(geohash) ... bbox = "ST_GeomFromText('POLYGON ((#{lng0} #{lat0}, #{lng1} #{lat0}, #{lng1} #{lat1}, #{lng0} #{lat1}, #{lng0} #{lat0}))', 4326)" @dataset = DB["SELECT ST_AsSVG(ST_Affine(ST_Intersection(the_geom, #{bbox}), #{a}, #{b}, #{d}, #{e}, #{x_off}, #{y_off}), 0, 0), type, name FROM japan_highway WHERE ST_Intersects(the_geom, #{bbox});"] instr = [] @dataset.each {|r| instr << " r.path('#{r[:st_assvg]}').attr('stroke', '#{color}');n" } s = haml <<-EOS !!!XML %html ... %body :javascript window.onload = function() { ... }); window.document.addEventListener('touchstart', function(evt) { ... }, false); ... } EOS File.open("public/geohash/#{geohash}.html", 'w') {|w| w.print s } s end end App.run! :port => 2010
  • 45. require 'app' run Sinatra::Application require 'rubygems' require 'sinatra' get '/' do redirect '/geohash/xn77n.html' end require 'rubygems' require 'pr_geohash' require 'open-uri' ALPHABET = "0123456789bcdefghjkmnpqrstuvwxyz" def get(geohash) url = "http://localhost:2010/geohash/#{geohash}.html" print url, "n" open url end %w{xn7 xnk}.each {|seed| ALPHABET.each_char {|c1| ALPHABET.each_char {|c2| get(seed + c1 + c2) } } } $ sudo gem install heroku $ heroku create degree-zero-web-mapping $ git init $ git add . $ git commit $ git push heroku master
  • 46.
  • 47. Demo

Hinweis der Redaktion