Sha256: a4901a10ea9e2d2eca05c122aac785b510d8d88095fd80000912ed7c09a0eb75
Contents?: true
Size: 539 Bytes
Versions: 12
Compression:
Stored size: 539 Bytes
Contents
require 'open-uri' module SpatialFeatures module Importers class File < SimpleDelegator def initialize(data, *args) file = Download.open(data, unzip: %w(.kml .shp)) case ::File.extname(file.path.downcase) when '.kml' __setobj__(KMLFile.new(file, *args)) when '.shp' __setobj__(Shapefile.new(file, *args)) else raise ImportError, "Could not import file. Supported formats are KMZ, KML, and zipped ArcGIS shapefiles" end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems