Class: Geoloader::Loaders::GeotiffGeoserver
- Defined in:
- lib/geoloader/loaders/geotiff_geoserver.rb
Instance Attribute Summary collapse
-
#geoserver ⇒ Object
readonly
Returns the value of attribute geoserver.
-
#geotiff ⇒ Object
readonly
Returns the value of attribute geotiff.
Instance Method Summary collapse
-
#initialize(*args) ⇒ GeotiffGeoserver
constructor
Configure the asset, connect to Geoserver.
-
#load ⇒ Object
Push a GeoTIFF to Geoserver.
Methods inherited from Loader
Constructor Details
#initialize(*args) ⇒ GeotiffGeoserver
Configure the asset, connect to Geoserver.
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/geoloader/loaders/geotiff_geoserver.rb', line 14 def initialize(*args) super # Create and configure the asset. @geotiff = Geoloader::Assets::Asset.new(@file_path, @workspace, @desc_path) @geotiff.extend(Geoloader::Assets::Geotiff) # Connect to Geoserver, create the workspace. @geoserver = Geoloader::Services::Geoserver.new @geoserver.ensure_workspace(@workspace) end |
Instance Attribute Details
#geoserver ⇒ Object (readonly)
Returns the value of attribute geoserver.
7 8 9 |
# File 'lib/geoloader/loaders/geotiff_geoserver.rb', line 7 def geoserver @geoserver end |
#geotiff ⇒ Object (readonly)
Returns the value of attribute geotiff.
7 8 9 |
# File 'lib/geoloader/loaders/geotiff_geoserver.rb', line 7 def geotiff @geotiff end |
Instance Method Details
#load ⇒ Object
Push a GeoTIFF to Geoserver.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/geoloader/loaders/geotiff_geoserver.rb', line 31 def load @geotiff.stage do # Prepare the file. @geotiff.make_borders_transparent @geotiff.reproject # Push to Geoserver. @geoserver.create_coveragestore(@geotiff) end end |