Class: FeatureScraper
- Inherits:
-
Object
- Object
- FeatureScraper
- Defined in:
- lib/gis_scraper/feature_scraper.rb
Overview
scrapes feature layers
Defined Under Namespace
Classes: Ogr2ogrVersionError
Constant Summary collapse
- ESRIFIELDTYPEOID =
'esriFieldTypeOID'
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(url:, arcrest_opts: {}) ⇒ FeatureScraper
constructor
A new instance of FeatureScraper.
- #json_data ⇒ Object
Constructor Details
#initialize(url:, arcrest_opts: {}) ⇒ FeatureScraper
Returns a new instance of FeatureScraper.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gis_scraper/feature_scraper.rb', line 11 def initialize(url:, arcrest_opts: {}) @url = url @arcrest_opts = arcrest_opts # e.g. headers: { referer: '...' } @layer = layer @json = json @name = @layer.name @pk = pk @max_record_count = max_record_count @loops = loops @threads = GisScraper.config[:threads] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/gis_scraper/feature_scraper.rb', line 9 def name @name end |
Instance Method Details
#json_data ⇒ Object
23 24 25 |
# File 'lib/gis_scraper/feature_scraper.rb', line 23 def json_data query_layer.merge('features' => all_features(@threads)).to_json end |