Sha256: 82a8b07fb896b67f678ef1e780478ef1d84df25cfac3a89c00c2109934c0290b
Contents?: true
Size: 532 Bytes
Versions: 22
Compression:
Stored size: 532 Bytes
Contents
require 'open-uri' module SpatialFeatures module Importers class File < SimpleDelegator def initialize(data, *args) file = Download.open(data, unzip: %w(.kml .shp)) if file.path.end_with? '.kml' __setobj__(KMLFile.new(file, *args)) elsif file.path.end_with? '.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
22 entries across 22 versions & 1 rubygems