feat(export): add GeoJSON export
This commit is contained in:
parent
d70db8cc05
commit
0c0618aa79
13 changed files with 91 additions and 34 deletions
|
@ -1144,6 +1144,13 @@ class Dossier < ApplicationRecord
|
|||
}
|
||||
end
|
||||
|
||||
def self.to_feature_collection
|
||||
{
|
||||
type: 'FeatureCollection',
|
||||
features: GeoArea.joins(:champ).where(champ: { dossier: ids }).map(&:to_feature)
|
||||
}
|
||||
end
|
||||
|
||||
def log_api_entreprise_job_exception(exception)
|
||||
exceptions = self.api_entreprise_job_exceptions ||= []
|
||||
exceptions << exception.inspect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue