class WorldPopExtract extends groovy.lang.Script
| Constructor and description |
|---|
WorldPopExtract() |
WorldPopExtract(groovy.lang.Binding context) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static java.lang.String |
buildSubset(java.lang.Object bbox)This method is used to build the subset filter used by the WCS request from bbox defined by a set of latitude and longitude coordinates |
|
java.lang.String |
createGridRequest(java.lang.String coverageId, java.lang.Object bbox)A method to create the WCS grid request |
|
java.lang.String |
extractWorldPopLayer(java.lang.String coverageId, java.util.List bbox)This process is used to extract a grid population data from https://www.worldpop.org The grid is stored in a tmp dir. |
|
boolean |
grid(java.lang.String coverageId, java.lang.Object bbox, java.io.File outputGridFile)Method to execute a query on the WorldPop Web Coverage Service and return grid coverage in ascii format |
|
boolean |
grid(java.lang.String wcsRequest, java.io.File outputGridFile)Method to execute a query on the WorldPop Web Coverage Service and return grid coverage in ascii format |
|
java.lang.String |
importAscGrid(JdbcDataSource datasource, java.lang.String worldPopFilePath, int epsg, java.lang.String tableName)Process to import and asc grid into the database |
|
boolean |
isCoverageAvailable(java.lang.String coverageId)A method to test if the coverageId is available |
|
static void |
main(java.lang.String[] args) |
|
java.lang.Object |
run() |
| Methods inherited from class | Name |
|---|---|
class groovy.lang.Script |
groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#run(), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#wait(long), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll() |
This method is used to build the subset filter used by the WCS request from bbox defined by a set of latitude and longitude coordinates See OGC® Web Coverage Service 2.0 Interface Standard - KVP Protocol Binding Extension The order of values in the bounding box is : south ,west, north, east south : float -> southern latitude of bounding box west : float -> western longitude of bounding box north : float -> northern latitude of bounding box east : float -> eastern longitude of bounding box So : minimum latitude, minimum longitude, maximum latitude, maximum longitude
bbox - 4 valuesA method to create the WCS grid request @return
coverageId - coverage identifier on the serverbbox - an array of coordinates in lat/longThis process is used to extract a grid population data from https://www.worldpop.org The grid is stored in a tmp dir. If the grid already exists the file is reused.
coverageId - coverage identifier on the serverbbox - an array of coordinates in lat/longMethod to execute a query on the WorldPop Web Coverage Service and return grid coverage in ascii format
coverageId - the name of the layer on the WCS servicebbox - to extract the dataepsg - output epsg code, default is 4326outputGridFile - the output fileMethod to execute a query on the WorldPop Web Coverage Service and return grid coverage in ascii format
wcsRequest - the worldpop WCS requestoutputGridFile - the output fileProcess to import and asc grid into the database
datasource - a connection to the databaseworldPopFilePath - the path of the gridepsg - SRID code set to the gridtableName - the name of table that contains the grid data in the databaseA method to test if the coverageId is available @return