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.2.2 lib/spatial_features/importers/kml_file.rb
spatial_features-2.2.1 lib/spatial_features/importers/kml_file.rb
spatial_features-2.2.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.1.7 lib/spatial_features/importers/kml_file.rb
spatial_features-2.1.6 lib/spatial_features/importers/kml_file.rb
spatial_features-2.1.5 lib/spatial_features/importers/kml_file.rb
spatial_features-2.1.4 lib/spatial_features/importers/kml_file.rb
spatial_features-2.1.2 lib/spatial_features/importers/kml_file.rb
spatial_features-2.1.1 lib/spatial_features/importers/kml_file.rb
spatial_features-2.1.0 lib/spatial_features/importers/kml_file.rb
spatial_features-2.0.0 lib/spatial_features/importers/kml_file.rb