Fix geo areas computations
This commit is contained in:
parent
569433bacb
commit
4dfc1c719f
4 changed files with 75 additions and 7 deletions
|
@ -1305,7 +1305,7 @@ describe Dossier do
|
|||
'type' => 'Polygon'
|
||||
},
|
||||
properties: {
|
||||
area: 219.0,
|
||||
area: 103.6,
|
||||
champ_id: champ_carte.stable_id,
|
||||
dossier_id: dossier.id,
|
||||
id: geo_area.id,
|
||||
|
|
|
@ -2,15 +2,13 @@ RSpec.describe GeoArea, type: :model do
|
|||
describe '#area' do
|
||||
let(:geo_area) { build(:geo_area, :polygon) }
|
||||
|
||||
it { expect(geo_area.area).to eq(219.0) }
|
||||
it { expect(geo_area.area).to eq(103.6) }
|
||||
end
|
||||
|
||||
describe '#area (hourglass polygon)' do
|
||||
let(:geo_area) { build(:geo_area, :hourglass_polygon) }
|
||||
|
||||
# This test fails in my local environement end the problem exists in production.
|
||||
# Must be some mismatch between CI/production. I still want this fix in production.
|
||||
it.pending { expect(geo_area.area).to be_nil }
|
||||
it { expect(geo_area.area).to eq(32.4) }
|
||||
end
|
||||
|
||||
describe '#length' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue