Class: OvertureMaps::Models::Base
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- OvertureMaps::Models::Base
show all
- Defined in:
- lib/overture_maps/models/base.rb
Instance Method Summary
collapse
Instance Method Details
#to_geojson ⇒ Object
28
29
30
31
32
33
34
35
36
|
# File 'lib/overture_maps/models/base.rb', line 28
def to_geojson
return nil unless geometry
{
type: "Feature",
geometry: RGeo::GeoJSON.encode(geometry),
properties: attributes.except("geometry", "created_at", "updated_at")
}
end
|