Sha256: f37038fa5c9900c36bccf1ba2248dc0202bd800f534f92e84dcff52c662aef05

Contents?: true

Size: 471 Bytes

Versions: 71

Compression:

Stored size: 471 Bytes

Contents

module SpatialFeatures
  module Importers
    class KMLFile < KML
      def initialize(path_or_url, *args)
        super Download.read(path_or_url, unzip: '.kml'), *args

      rescue SocketError, Errno::ECONNREFUSED, OpenURI::HTTPError
        url = URI(path_or_url)
        raise ImportError, "KML server is not responding. Ensure server is running and accessible at #{[url.scheme, "//#{url.host}", url.port].select(&:present?).join(':')}."
      end
    end
  end
end

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
spatial_features-2.19.1 lib/spatial_features/importers/kml_file.rb
spatial_features-2.19.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.18.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.17.3 lib/spatial_features/importers/kml_file.rb
spatial_features-2.17.2 lib/spatial_features/importers/kml_file.rb
spatial_features-2.17.1 lib/spatial_features/importers/kml_file.rb
spatial_features-2.17.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.16.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.15.1 lib/spatial_features/importers/kml_file.rb
spatial_features-2.15.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.14.1 lib/spatial_features/importers/kml_file.rb
spatial_features-2.14.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.13.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.12.3 lib/spatial_features/importers/kml_file.rb
spatial_features-2.12.2 lib/spatial_features/importers/kml_file.rb
spatial_features-2.12.1 lib/spatial_features/importers/kml_file.rb
spatial_features-2.12.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.11.1 lib/spatial_features/importers/kml_file.rb
spatial_features-2.11.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.10.9 lib/spatial_features/importers/kml_file.rb