gis on rails by oleksandr kychun

12
GIS on Rails Integrate GIS into your Rails application using OpenGeo Suite

Upload: pivorak-meetup

Post on 21-Mar-2017

50 views

Category:

Software


3 download

TRANSCRIPT

Page 1: GIS on Rails by Oleksandr Kychun

GIS on RailsIntegrate GIS into your Rails application using OpenGeo

Suite

Page 2: GIS on Rails by Oleksandr Kychun

GIS

Page 3: GIS on Rails by Oleksandr Kychun

Data representation

Raster vs Vector● Points

● Lines

● Polygons

Page 4: GIS on Rails by Oleksandr Kychun

● Ubuntu 12.04, 14.04

● Mac OS X● Red Hat

Enterprise Linux and CentOS.

● Windows

Page 5: GIS on Rails by Oleksandr Kychun

Problem: Store and serve data that comes in shapefiles

Postgis Geoserver OpenLayers

provides spatial objects for PostgreSQL

provides advanced web mapping capabilities

powerful map and feature server for sharing,

analyzing, and editing geospatial data

Page 6: GIS on Rails by Oleksandr Kychun

GeoServer Web interface

Typically, to create layer that could be presented to the end user, you’ll need to complete 3 steps

● Create a workspace. ● Create storage.(Shapefile vs Postgis)● Publish a layer

Page 7: GIS on Rails by Oleksandr Kychun

Public APIGeoserver Configuration Api Composer Api

Page 8: GIS on Rails by Oleksandr Kychun

Postman probes

Page 9: GIS on Rails by Oleksandr Kychun

Requirements

● simple curl based communicator○ wrapper around curb gem

● postgresql client○ pg gem

● background processing lib○ resque gem

● unzipper○ rubyzip and zip-zip gems

● shapefile import tool○ shp2pgsql

Page 10: GIS on Rails by Oleksandr Kychun

Import process

● submit form● active record saves the object and triggers callback after commit● callback adds GeoserverTask to the queue ● resque worker initializes the handler(layer_creator)● handler processes the request

○ creates workspace○ creates storage○ creates database if missing○ unpacks zip file○ imports data from shapefile to created table○ publishes layer

Page 11: GIS on Rails by Oleksandr Kychun

Results

Page 12: GIS on Rails by Oleksandr Kychun