Skip to content

Commit

Permalink
Merge pull request #723 from ebocher/worldpop_epsg
Browse files Browse the repository at this point in the history
Use the input data srid when the worldpop grid is empty
  • Loading branch information
j3r3m1 authored Apr 12, 2022
2 parents 704f702 + 02e316a commit 1b80994
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1441,15 +1441,15 @@ def bdtopo_processing(def h2gis_datasource, def processing_parameters,def id_zo
info "Create a default empty worldpop table"
def outputTableWorldPopName = postfix "world_pop"
h2gis_datasource.execute("""drop table if exists $outputTableWorldPopName;
create table $outputTableWorldPopName (the_geom GEOMETRY(POLYGON, $epsg), ID_POP INTEGER, POP FLOAT);""".toString())
create table $outputTableWorldPopName (the_geom GEOMETRY(POLYGON, $srid), ID_POP INTEGER, POP FLOAT);""".toString())
results.put("populationTableName", outputTableWorldPopName)
}

}else {
info "Cannot find the population grid $coverageId \n Create a default empty worldpop table"
def outputTableWorldPopName = postfix "world_pop"
h2gis_datasource.execute("""drop table if exists $outputTableWorldPopName;
create table $outputTableWorldPopName (the_geom GEOMETRY(POLYGON, $epsg), ID_POP INTEGER, POP FLOAT);""".toString())
create table $outputTableWorldPopName (the_geom GEOMETRY(POLYGON, $srid), ID_POP INTEGER, POP FLOAT);""".toString())
results.put("populationTableName", outputTableWorldPopName)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,15 +744,15 @@ IProcess osm_processing() {
info "Create a default empty worldpop table"
def outputTableWorldPopName = postfix "world_pop"
h2gis_datasource.execute("""drop table if exists $outputTableWorldPopName;
create table $outputTableWorldPopName (the_geom GEOMETRY(POLYGON, $epsg), ID_POP INTEGER, POP FLOAT);""".toString())
create table $outputTableWorldPopName (the_geom GEOMETRY(POLYGON, $srid), ID_POP INTEGER, POP FLOAT);""".toString())
results.put("populationTableName", outputTableWorldPopName)
}

}else {
info "Cannot find the population grid $coverageId \n Create a default empty worldpop table"
def outputTableWorldPopName = postfix "world_pop"
h2gis_datasource.execute("""drop table if exists $outputTableWorldPopName;
create table $outputTableWorldPopName (the_geom GEOMETRY(POLYGON, $epsg), ID_POP INTEGER, POP FLOAT);""".toString())
create table $outputTableWorldPopName (the_geom GEOMETRY(POLYGON, $srid), ID_POP INTEGER, POP FLOAT);""".toString())
results.put("populationTableName", outputTableWorldPopName)
}
}
Expand Down

0 comments on commit 1b80994

Please # to comment.