Class: Geoloader::CLI::Geoserver

Inherits:
Thor
  • Object
show all
Includes:
Tasks
Defined in:
lib/geoloader/cli/geoserver.rb

Instance Method Summary collapse

Instance Method Details

#clear(workspace) ⇒ Object



29
30
31
# File 'lib/geoloader/cli/geoserver.rb', line 29

def clear(workspace)
  Geoloader::Tasks::Geoserver.clear(workspace) rescue nil
end

#load(*files) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/geoloader/cli/geoserver.rb', line 15

def load(*files)

  files.each { |file_path|
    case File.extname(file_path)
    when ".tif" # GEOTIFF
      Geoloader::Loaders::GeotiffGeoserver.load_or_enqueue(file_path, options)
    when ".shp" # SHAPEFILE
      Geoloader::Loaders::ShapefileGeoserver.load_or_enqueue(file_path, options)
    end
  }

end