class Geoloader::Loaders::ShapefileGeoserver
Attributes
geoserver[R]
shapefile[R]
Public Class Methods
new(*args)
click to toggle source
Configure the asset, connect to Geoserver.
Calls superclass method
Geoloader::Loaders::Loader::new
# File lib/geoloader/loaders/shapefile_geoserver.rb, line 14 def initialize(*args) super # Create and configure the asset. @shapefile = Geoloader::Assets::Asset.new(@file_path, @workspace, @desc_path) @shapefile.extend(Geoloader::Assets::Shapefile) # Connect to Geoserver, create the workspace. @geoserver = Geoloader::Services::Geoserver.new @geoserver.ensure_workspace(@workspace) end
Public Instance Methods
load()
click to toggle source
Push a Shapefile to Geoserver.
# File lib/geoloader/loaders/shapefile_geoserver.rb, line 31 def load @shapefile.stage do @geoserver.create_datastore(@shapefile) end end