Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Geo on Rails
Search
Guilherme Vinicius Moreira
June 19, 2012
Programming
180
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Geo on Rails
Guilherme Vinicius Moreira
June 19, 2012
More Decks by Guilherme Vinicius Moreira
See All by Guilherme Vinicius Moreira
Introdução ao conceito de Gamificação
guivinicius
0
320
Other Decks in Programming
See All in Programming
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
550
Railsバージョンを4倍にした話
optim
0
350
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
460
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
640
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
300
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
JIS keyboard support in Omarchy
lef237
0
110
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
290
ChromeでローカルLLM
ryu1013
0
140
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
Paper Plane (Part 1)
katiecoart
PRO
2
12k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Prompt Engineering for Job Search
mfonobong
0
520
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
Balancing Empowerment & Direction
lara
6
1.3k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
820
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
Transcript
Geo On Rails Um guia para manter o seu cabelo.
por @guivinicius
whoami Guilherme || Harry Desenvolvedor na Novakoasin Um dos fundadores
do GURU Sorocaba
Motivo
Objetivo Dar uma visão e as ferramentas para um estudo
detalhado.
Metas - Explicar os termos - Mostrar ferramentas para Ruby
/ Rails - Um pouco código.
Programação Espacial
Programação Espacial Tratar espaços e objetos físicos no contexto de
programação. Interação e relacionamento entre esses objetos físicos.
Programação Espacial Me ache as linhas de ônibus que coincidam
o trajeto em uma percentagem maior que 60%. Me retorne todos os veículos que passaram num raio de 10km da usina nuclear XYZ no dia 10/11/2012.
Termos Importantes GIS: Geographical Information System Layers: Camadas WMS: Web
Mapping Service. Projeção: Representação plana do globo. Geometria: Tipo de dados em um GIS.
GIS Sistemas que representam dados geográficos.
GIS Sistemas que representam dados geográficos.
Layers Camadas que podem agrupar dados. RASTER VECTOR
Layers
WMS http://openstreetmap.org
WMS http://worldwind.arc.nasa.gov/java/
WMS http://maps.yahoo.com/
WMS http://br.bing.com/maps/
WMS http://www.mapmatters.org/ ou Mapserver http://mapserver.org/ ou $$ Soluções Privadas $$
Projeções Meio de representar uma superfície esférica (Terra) em uma
superfície plana.
Projeções
Projeções SRID: Como a projeção é identificada dentro de um
banco espacial. (System Reference ID) EPSG: 4326 / EPSG: 900913 (Google) http://spatialreference.org/
Geometrias Point Line Polygon • Multiline Multipolygon
Geometrias Geometry Collection • •
Geometrias ESRI Shapefile Mapinfo Formato de dados mais utilizados. .shp
.shx .dbf .tab Contém geometrias e muitas outras informações, como índices e etc.
Ferramentas Bancos da Dados - PostgreSQL + PostGIS - MongoDB
- MySQL - Oracle Spatial the best *PostGIS é uma extensão para o PostgreSQL que adiciona habilidades espaciais.
Ferramentas • Habilidade de armazenar geometrias nas tabelas. • Disponibiliza
funções espaciais como distance() ou intersection() • Implementa índices espaciais. O que eles fazem de diferente ?
Ferramentas Ruby Gems - RGeo - RGeo-geojson - RGeo-shapefile -
ffi-geos - GeoRuby - SpatialAdapter - Ruby geocoder - Squeel
Ferramentas Client-side http://openlayers.org/
Ferramentas Client-side Heatmaps https://github.com/pa7/heatmap.js https://github.com/dazuma/thermo.js https://github.com/sunng87/heatcanvas
Ferramentas
Ferramentas http://www.qgis.org/
Ferramentas http://mapserver.org/ http://www.pgrouting.org/ Publicar dados espaciais na web, criar seu
próprio WMS. Estende o PostgreSQL + PostGIS para algoritmos de roteamento.
Meu ‘stack’ atual PostgreSQL + PostGIS + PgRouting GeoRuby +
SpatialAdapter OpenLayers Mapserver
Código !! gemfile
Código !! database.yml * Documentado na gem activerecord-postgis-adapter
Código !! tipo point! <RGeo::Geographic::SphericalPointImpl:0x806532d8 "POINT (-47.45590989999999 -23.5062288)">
Código !! p1.latlon.distance(p2.latlon) => 3802.0170205027907 (miles)
Pra onde ir daqui. • Instale alguns bancos espaciais (PostgreSQL)
• gem install nas gems mencionadas. • Crie uma app Rails e com objetos espaciais • Utilize o OpenLayers e mostre alguns dados.
Fontes de dados. http://www.naturalearthdata.com/downloads/ http://geocommons.com/ http://dados.gov.br/ http://www.ibge.gov.br/mapas_ibge/bases.php
Obrigado! @guivinicius @gurusorocaba Perguntas ?