SlideShare a Scribd company logo
1 of 40
Download to read offline
Adding Where To
Your Ruby Apps




                     @bsao - Robson Junior
                  @rpepato - Roberto Pepato
Who are these guys ?
GIS?
Why GIS?
Why GIS?
http://video.esri.com/watch/41/network-analysis
Soft Part
reverse geocoding   reverse geocoding   reverse geocoding   reverse geocoding
    geocoding           geocoding
     routing             routing
How to work with
Geocoding in Ruby ?
see => http://railscasts.com/episodes/273-geocoder
Utilities
Mining
Security
Oil & Gas
More Applications ?
More Applications ?
Hard Part
Many Projections
Many Zones
A whole
A whole




Difficult Part
A whole




Difficult Part             Easy Part
A whole




Easy Part
Market
OpenSource


             Grass GIS
ESRI for Ruby ?
ESRI for Ruby ?




      #fail
ESRI for Ruby ?




                      #fail

Designed for C, C++, .Net, Java, Flex and Python*
ESRI guys told us:
Don’t worry, we will provide you with a
              “REST” API




{ :get, :put, :post, :delete }
Seriously ? REST ?




      No semantics
      No resources
rgis - hard (boring?)
  part made easy
using System.Windows.Controls;


                                                 Project X,Y (ESRI .Net Silverlight API)
using System.Windows;
using ESRI.ArcGIS.Client.Geometry;
using ESRI.ArcGIS.Client.Tasks;
using ESRI.ArcGIS.Client;
using System.Collections.Generic;
using ESRI.ArcGIS.Client.Symbols;

namespace ArcGISSilverlightSDK
{
  public partial class Project : UserControl
  {
    GeometryService geometryService;
    GraphicsLayer graphicsLayer;

        public Project()
        {
          InitializeComponent();

            geometryService = new GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
            geometryService.ProjectCompleted += geometryService_ProjectCompleted;
            geometryService.Failed += geometryService_Failed;

            graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
        }

        private void ProjectButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
           double x;
           double y;
           if (!double.TryParse(XTextBox.Text, out x) || !double.TryParse(YTextBox.Text, out y))
           {
               MessageBox.Show("Enter valid coordinate values.");
               return;
           }

            MapPoint inputMapPoint = new MapPoint(x, y, new SpatialReference(4326));

            geometryService.ProjectAsync(new List<Graphic>() { new Graphic() { Geometry = inputMapPoint } }, MyMap.SpatialReference, inputMapPoint);
        }

        void geometryService_ProjectCompleted(object sender, GraphicsEventArgs e)
        {
           Graphic resultGraphic = e.Results[0];

            if (resultGraphic.Geometry.Extent != null)
            {
                resultGraphic.Symbol = LayoutRoot.Resources["RoundMarkerSymbol"] as SimpleMarkerSymbol;

              MapPoint resultMapPoint = resultGraphic.Geometry as MapPoint;
              resultGraphic.Attributes.Add("Output_CoordinateX", resultMapPoint.X);
              resultGraphic.Attributes.Add("Output_CoordinateY", resultMapPoint.Y);

              MapPoint inputMapPoint = e.UserState as MapPoint;
              resultGraphic.Attributes.Add("Input_CoordinateX", inputMapPoint.X);
              resultGraphic.Attributes.Add("Input_CoordinateY", inputMapPoint.Y);

              graphicsLayer.Graphics.Add(resultGraphic);

               MyMap.PanTo(resultGraphic.Geometry);
            }
            else
            {
               MessageBox.Show("Invalid input coordinate, unable to project.");
            }

        }

        void geometryService_Failed(object sender, TaskFailedEventArgs e)
        {
           MessageBox.Show("Geometry Service error: " + e.Error);
        }
    }
}
Project X,Y (rgis)
point = RGis::Point.new(15,17)
new_point = point.project(:from => 4326, :to => 102100)
https://github.com/rgis/rgis
Questions?


https://github.com/rgis/rgis
Text
         @bsao
        @rpepato

Join us to make GIS easier:
   https://github.com/rgis

More Related Content

What's hot (6)

IGraph a tool to analyze your network
IGraph a tool to analyze your networkIGraph a tool to analyze your network
IGraph a tool to analyze your network
 
LIDAR-derived DTM for archaeology and landscape history research some recent ...
LIDAR-derived DTM for archaeology and landscape history research some recent ...LIDAR-derived DTM for archaeology and landscape history research some recent ...
LIDAR-derived DTM for archaeology and landscape history research some recent ...
 
Serverless+Redis!= Stateless Avner Braverman
Serverless+Redis!= Stateless Avner BravermanServerless+Redis!= Stateless Avner Braverman
Serverless+Redis!= Stateless Avner Braverman
 
Modeling Count-based Raster Data with ArcGIS and R
Modeling Count-based Raster Data with ArcGIS and RModeling Count-based Raster Data with ArcGIS and R
Modeling Count-based Raster Data with ArcGIS and R
 
KliqMap 1.0 english v4
KliqMap 1.0 english v4KliqMap 1.0 english v4
KliqMap 1.0 english v4
 
OpenWebGlobe - GeoSharing Bern
OpenWebGlobe - GeoSharing BernOpenWebGlobe - GeoSharing Bern
OpenWebGlobe - GeoSharing Bern
 

Viewers also liked

METACOM - Um Método para Análise de Correlação entre Métricas de Produto de S...
METACOM - Um Método para Análise de Correlação entre Métricas de Produto de S...METACOM - Um Método para Análise de Correlação entre Métricas de Produto de S...
METACOM - Um Método para Análise de Correlação entre Métricas de Produto de S...
Roberto Pepato
 

Viewers also liked (9)

Haskell 101
Haskell 101Haskell 101
Haskell 101
 
Be Agile, Stay Agile
Be Agile, Stay AgileBe Agile, Stay Agile
Be Agile, Stay Agile
 
METACOM - Um Método para Análise de Correlação entre Métricas de Produto de S...
METACOM - Um Método para Análise de Correlação entre Métricas de Produto de S...METACOM - Um Método para Análise de Correlação entre Métricas de Produto de S...
METACOM - Um Método para Análise de Correlação entre Métricas de Produto de S...
 
Adding where to your ruby apps lt - (q con)
Adding where to your ruby apps   lt -  (q con)Adding where to your ruby apps   lt -  (q con)
Adding where to your ruby apps lt - (q con)
 
Continuous Inspection - Uma abordagem efetiva para melhoria contínua da quali...
Continuous Inspection - Uma abordagem efetiva para melhoria contínua da quali...Continuous Inspection - Uma abordagem efetiva para melhoria contínua da quali...
Continuous Inspection - Uma abordagem efetiva para melhoria contínua da quali...
 
An investigation of extreme programming practices and its impact on software ...
An investigation of extreme programming practices and its impact on software ...An investigation of extreme programming practices and its impact on software ...
An investigation of extreme programming practices and its impact on software ...
 
A Importância do Código Limpo na Perspectiva dos Desenvolvedores e Empresas d...
A Importância do Código Limpo na Perspectiva dos Desenvolvedores e Empresas d...A Importância do Código Limpo na Perspectiva dos Desenvolvedores e Empresas d...
A Importância do Código Limpo na Perspectiva dos Desenvolvedores e Empresas d...
 
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika AldabaLightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
Lightning Talk #9: How UX and Data Storytelling Can Shape Policy by Mika Aldaba
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 

Similar to Adding where to your ruby apps

Sapo GIS Hands-On
Sapo GIS Hands-OnSapo GIS Hands-On
Sapo GIS Hands-On
codebits
 
Gis SAPO Hands On
Gis SAPO Hands OnGis SAPO Hands On
Gis SAPO Hands On
codebits
 
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Aaron Parecki
 
Mapping For Sharepoint T11 Peter Smith
Mapping For Sharepoint T11 Peter SmithMapping For Sharepoint T11 Peter Smith
Mapping For Sharepoint T11 Peter Smith
SpatialSmith
 
Geolocation on Rails
Geolocation on RailsGeolocation on Rails
Geolocation on Rails
nebirhos
 
Hands on with the Google Maps Data API
Hands on with the Google Maps Data APIHands on with the Google Maps Data API
Hands on with the Google Maps Data API
ss318
 

Similar to Adding where to your ruby apps (20)

Sapo GIS Hands-On
Sapo GIS Hands-OnSapo GIS Hands-On
Sapo GIS Hands-On
 
Gis SAPO Hands On
Gis SAPO Hands OnGis SAPO Hands On
Gis SAPO Hands On
 
INAC Online Hazards Database App
INAC Online Hazards Database AppINAC Online Hazards Database App
INAC Online Hazards Database App
 
ArcGIS JavaScript API (build a web layer-based map application with html5 and...
ArcGIS JavaScript API (build a web layer-based map application with html5 and...ArcGIS JavaScript API (build a web layer-based map application with html5 and...
ArcGIS JavaScript API (build a web layer-based map application with html5 and...
 
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with easeGDG Devfest 2019 - Build go kit microservices at kubernetes with ease
GDG Devfest 2019 - Build go kit microservices at kubernetes with ease
 
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to heroBuilding a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
Building a ArcGIS mobile, cloud, checkin app in 75 minutes - zero to hero
 
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
 
Sirius Web Advanced : Customize and Extend the Platform
Sirius Web Advanced : Customize and Extend the PlatformSirius Web Advanced : Customize and Extend the Platform
Sirius Web Advanced : Customize and Extend the Platform
 
Leveraging ArcGIS Online for Public Utility Data
Leveraging ArcGIS Online for Public Utility DataLeveraging ArcGIS Online for Public Utility Data
Leveraging ArcGIS Online for Public Utility Data
 
Gmaps Railscamp2008
Gmaps Railscamp2008Gmaps Railscamp2008
Gmaps Railscamp2008
 
ArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialArcGIS API for Javascript Tutorial
ArcGIS API for Javascript Tutorial
 
Creating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with googleCreating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with google
 
Developing web-apps like it's 2013
Developing web-apps like it's 2013Developing web-apps like it's 2013
Developing web-apps like it's 2013
 
React Native: Developing an app similar to Uber in JavaScript
React Native: Developing an app similar to Uber in JavaScriptReact Native: Developing an app similar to Uber in JavaScript
React Native: Developing an app similar to Uber in JavaScript
 
Google Maps API 101
Google Maps API 101Google Maps API 101
Google Maps API 101
 
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
Building Web Apps with the Esri-Leaflet Plugin - Dubai DevSummit 2013
 
Mapping For Sharepoint T11 Peter Smith
Mapping For Sharepoint T11 Peter SmithMapping For Sharepoint T11 Peter Smith
Mapping For Sharepoint T11 Peter Smith
 
Geolocation on Rails
Geolocation on RailsGeolocation on Rails
Geolocation on Rails
 
Hands on with the Google Maps Data API
Hands on with the Google Maps Data APIHands on with the Google Maps Data API
Hands on with the Google Maps Data API
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Adding where to your ruby apps

  • 1. Adding Where To Your Ruby Apps @bsao - Robson Junior @rpepato - Roberto Pepato
  • 2. Who are these guys ?
  • 8. reverse geocoding reverse geocoding reverse geocoding reverse geocoding geocoding geocoding routing routing
  • 9. How to work with Geocoding in Ruby ?
  • 11.
  • 26. OpenSource Grass GIS
  • 27.
  • 29. ESRI for Ruby ? #fail
  • 30. ESRI for Ruby ? #fail Designed for C, C++, .Net, Java, Flex and Python*
  • 31. ESRI guys told us: Don’t worry, we will provide you with a “REST” API { :get, :put, :post, :delete }
  • 32. Seriously ? REST ? No semantics No resources
  • 33. rgis - hard (boring?) part made easy
  • 34.
  • 35. using System.Windows.Controls; Project X,Y (ESRI .Net Silverlight API) using System.Windows; using ESRI.ArcGIS.Client.Geometry; using ESRI.ArcGIS.Client.Tasks; using ESRI.ArcGIS.Client; using System.Collections.Generic; using ESRI.ArcGIS.Client.Symbols; namespace ArcGISSilverlightSDK { public partial class Project : UserControl { GeometryService geometryService; GraphicsLayer graphicsLayer; public Project() { InitializeComponent(); geometryService = new GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); geometryService.ProjectCompleted += geometryService_ProjectCompleted; geometryService.Failed += geometryService_Failed; graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; } private void ProjectButton_Click(object sender, System.Windows.RoutedEventArgs e) { double x; double y; if (!double.TryParse(XTextBox.Text, out x) || !double.TryParse(YTextBox.Text, out y)) { MessageBox.Show("Enter valid coordinate values."); return; } MapPoint inputMapPoint = new MapPoint(x, y, new SpatialReference(4326)); geometryService.ProjectAsync(new List<Graphic>() { new Graphic() { Geometry = inputMapPoint } }, MyMap.SpatialReference, inputMapPoint); } void geometryService_ProjectCompleted(object sender, GraphicsEventArgs e) { Graphic resultGraphic = e.Results[0]; if (resultGraphic.Geometry.Extent != null) { resultGraphic.Symbol = LayoutRoot.Resources["RoundMarkerSymbol"] as SimpleMarkerSymbol; MapPoint resultMapPoint = resultGraphic.Geometry as MapPoint; resultGraphic.Attributes.Add("Output_CoordinateX", resultMapPoint.X); resultGraphic.Attributes.Add("Output_CoordinateY", resultMapPoint.Y); MapPoint inputMapPoint = e.UserState as MapPoint; resultGraphic.Attributes.Add("Input_CoordinateX", inputMapPoint.X); resultGraphic.Attributes.Add("Input_CoordinateY", inputMapPoint.Y); graphicsLayer.Graphics.Add(resultGraphic); MyMap.PanTo(resultGraphic.Geometry); } else { MessageBox.Show("Invalid input coordinate, unable to project."); } } void geometryService_Failed(object sender, TaskFailedEventArgs e) { MessageBox.Show("Geometry Service error: " + e.Error); } } }
  • 36.
  • 37. Project X,Y (rgis) point = RGis::Point.new(15,17) new_point = point.project(:from => 4326, :to => 102100)
  • 40. Text @bsao @rpepato Join us to make GIS easier: https://github.com/rgis