Adding Where ToYour 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...
How to work withGeocoding 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 wholeDifficult Part
A wholeDifficult Part             Easy Part
A wholeEasy Part
Market
OpenSource             Grass GIS
ESRI for Ruby ?
ESRI for Ruby ?      #fail
ESRI for Ruby ?                      #failDesigned 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)usin...
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        @rpepatoJoin us to make GIS easier:   https://github.com/rgis
Adding where to your ruby apps
Adding where to your ruby apps
Adding where to your ruby apps
Adding where to your ruby apps
Upcoming SlideShare
Loading in …5
×

Adding where to your ruby apps

872 views

Published on

These are the slides of my presentation at RubyConfBr 2011

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
872
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
2
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

Adding where to your ruby apps

  1. 1. Adding Where ToYour Ruby Apps @bsao - Robson Junior @rpepato - Roberto Pepato
  2. 2. Who are these guys ?
  3. 3. GIS?
  4. 4. Why GIS?
  5. 5. Why GIS?
  6. 6. http://video.esri.com/watch/41/network-analysis
  7. 7. Soft Part
  8. 8. reverse geocoding reverse geocoding reverse geocoding reverse geocoding geocoding geocoding routing routing
  9. 9. How to work withGeocoding in Ruby ?
  10. 10. see => http://railscasts.com/episodes/273-geocoder
  11. 11. Utilities
  12. 12. Mining
  13. 13. Security
  14. 14. Oil & Gas
  15. 15. More Applications ?
  16. 16. More Applications ?
  17. 17. Hard Part
  18. 18. Many Projections
  19. 19. Many Zones
  20. 20. A whole
  21. 21. A wholeDifficult Part
  22. 22. A wholeDifficult Part Easy Part
  23. 23. A wholeEasy Part
  24. 24. Market
  25. 25. OpenSource Grass GIS
  26. 26. ESRI for Ruby ?
  27. 27. ESRI for Ruby ? #fail
  28. 28. ESRI for Ruby ? #failDesigned for C, C++, .Net, Java, Flex and Python*
  29. 29. ESRI guys told us:Don’t worry, we will provide you with a “REST” API{ :get, :put, :post, :delete }
  30. 30. Seriously ? REST ? No semantics No resources
  31. 31. rgis - hard (boring?) part made easy
  32. 32. 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); } }}
  33. 33. Project X,Y (rgis)point = RGis::Point.new(15,17)new_point = point.project(:from => 4326, :to => 102100)
  34. 34. https://github.com/rgis/rgis
  35. 35. Questions?https://github.com/rgis/rgis
  36. 36. Text @bsao @rpepatoJoin us to make GIS easier: https://github.com/rgis

×