Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply rounding correctly to calculated area when calculating initial cost surface [MARXAN-1798] #1251

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class TypeormCostSurface implements CostSurfacePersistencePort {
await this.entityManager.query(
`
INSERT INTO scenarios_pu_cost_data (scenarios_pu_data_id, cost)
SELECT spd.id, round(pug.area) / 1000000 as area
SELECT spd.id, round(pug.area / 1000000) as area
FROM scenarios_pu_data spd
INNER JOIN projects_pu ppu ON ppu.id = spd.project_pu_id
INNER JOIN planning_units_geom pug ON pug.id = ppu.geom_id
Expand Down