Class: SpatialFeatures::Importers::KMLFileArcGIS
- Defined in:
- lib/spatial_features/importers/kml_file_arcgis.rb
Constant Summary
Constants inherited from KML
SpatialFeatures::Importers::KML::COORDINATES_WITH_ALTITUDE, SpatialFeatures::Importers::KML::IMAGE_METADATA_KEYS
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(data, **options) ⇒ KMLFileArcGIS
constructor
A new instance of KMLFileArcGIS.
Methods inherited from KMLFile
Methods inherited from Base
#cache_key, create_all, #features
Constructor Details
#initialize(data, **options) ⇒ KMLFileArcGIS
Returns a new instance of KMLFileArcGIS.
6 7 8 9 10 11 12 13 14 |
# File 'lib/spatial_features/importers/kml_file_arcgis.rb', line 6 def initialize(data, **) super rescue SocketError, Errno::ECONNREFUSED url = URI(data) raise ImportError, "ArcGIS Server is not responding. Ensure ArcGIS Server is running and accessible at #{[url.scheme, "//#{url.host}", url.port].select(&:present?).join(':')}." rescue OpenURI::HTTPError raise ImportError, "ArcGIS Map Service not found. Ensure ArcGIS Server is running and accessible at #{path_or_url}." end |