Class: OpenPlaces::Geo

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Concerns::ReadOnlyModel
Defined in:
app/models/open_places/geo.rb

Direct Known Subclasses

Country, Lake, Park, Place, Province, River

Class Method Summary collapse

Class Method Details

.FIELDSObject



10
11
12
13
14
# File 'app/models/open_places/geo.rb', line 10

def self.FIELDS
  @fields ||= ["id","geotype", "subtype", "scalerank", "code", "name", "short_name", "long_name",
  "country_name", "country_code", "province_name", "province_code", "continent", "region_un", "subregion", "region_wb",
  "latitude", "longitude", "x_min", "y_min", "x_max", "y_max", "bbox","latlng", "geom", "tsvector","area", "slug", "path"]
end

.GEO_FIELDSObject



16
17
18
# File 'app/models/open_places/geo.rb', line 16

def self.GEO_FIELDS
  @geofields ||= ['geom', 'latlng', 'bbox', 'x_min', 'y_min', 'x_max', 'y_max', 'tsvector']
end

.IMPORT_FIELDSObject



20
21
22
# File 'app/models/open_places/geo.rb', line 20

def self.IMPORT_FIELDS
  @import_fields ||= self.FIELDS - ['geom', 'latlng', 'bbox', 'id', 'short_name', 'long_name', 'slug', 'path']
end