Skip to content

Commit

Permalink
Fix postgis connection
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed Jul 20, 2023
1 parent 6deb95e commit cd9c21f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ abstract class AbstractBDTopoWorkflow extends BDTopoUtils {
* @param inputDatasource database where the tables are
* @return true is succeed, false otherwise
*/
abstract boolean loadDataFromPostGIS(def input_database_properties, def code, def distance, def inputTables, def inputSRID, H2GIS h2gis_datasource);
abstract Integer loadDataFromPostGIS(def input_database_properties, def code, def distance, def inputTables, def inputSRID, H2GIS h2gis_datasource);


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import java.sql.SQLException


@Override
boolean loadDataFromPostGIS(Object input_database_properties, Object code, Object distance, Object inputTables, Object inputSRID, H2GIS h2gis_datasource) {
Integer loadDataFromPostGIS(Object input_database_properties, Object code, Object distance, Object inputTables, Object inputSRID, H2GIS h2gis_datasource) {
def commune_location = inputTables.commune
if (!commune_location) {
logger.error "The commune table must be specified to run Geoclimate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def filterLinkedShapeFiles(def location, float distance, LinkedHashMap inputTabl
}

@Override
boolean loadDataFromPostGIS(Object input_database_properties, Object code, Object distance, Object inputTables, Object inputSRID, H2GIS h2gis_datasource) {
Integer loadDataFromPostGIS(Object input_database_properties, Object code, Object distance, Object inputTables, Object inputSRID, H2GIS h2gis_datasource) {
def commune_location = inputTables.commune
if (!commune_location) {
logger.error "The commune table must be specified to run Geoclimate"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ String formatBuildingLayer(JdbcDataSource datasource, String building, String zo
"Bâtiment industriel" : ["light_industry": "industrial"],
"Serre" : ["greenhouse": "agricultural"],
"Silo" : ["silo": "agricultural"],
"Aérogare" : ["terminal": "transportation"],
"Aérogare" : ["terminal": "transport"],
"Arc de triomphe" : ["monument": "heritage"],
"Arène ou théâtre antique" : ["monument": "monument"],
"Bâtiment religieux divers" : ["religious": "religious"],
Expand All @@ -78,10 +78,10 @@ String formatBuildingLayer(JdbcDataSource datasource, String building, String zo
"Château" : ["castle": "heritage"],
"Eglise" : ["church": "religious"],
"Fort, blockhaus, casemate" : ["military": "military"],
"Gare" : ["train_station": "transportation"],
"Gare" : ["train_station": "transport"],
"Mairie" : ["townhall": "government"],
"Monument" : ["monument": "monument"],
"Péage" : ["toll_booth": "transportation"],
"Péage" : ["toll_booth": "transport"],
"Préfecture" : ["government": "government"],
"Sous-préfecture" : ["government": "government"],
"Tour, donjon, moulin" : ["historic": "heritage"],
Expand Down Expand Up @@ -122,7 +122,7 @@ String formatBuildingLayer(JdbcDataSource datasource, String building, String zo
"sport" : 0,
"sports_centre" : 0,
"grandstand" : 0,
"transportation" : 0,
"transport" : 0,
"train_station" : 0,
"toll_booth" : 0,
"terminal" : 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def loadV2(
WHEN a.CATEGORIE= 'Enseignement' THEN 'education'
WHEN a.CATEGORIE='Santé' THEN 'healthcare'
WHEN a.CATEGORIE ='Culture et loisirs' THEN 'entertainment_arts_culture'
WHEN a.CATEGORIE ='Transport' THEN 'transportation'
WHEN a.CATEGORIE ='Transport' THEN 'transport'
WHEN a.CATEGORIE ='Industriel ou commercial' THEN 'commercial'
WHEN a.CATEGORIE ='Gestion des eaux' THEN 'industrial'
WHEN a.CATEGORIE ='Sport' THEN 'sport'
Expand Down Expand Up @@ -619,7 +619,7 @@ Map loadV3(JdbcDataSource datasource,
WHEN a.CATEGORIE= 'Science et enseignement' THEN 'education'
WHEN a.CATEGORIE='Santé' THEN 'healthcare'
WHEN a.CATEGORIE ='Culture et loisirs' THEN 'entertainment_arts_culture'
WHEN a.CATEGORIE ='Transport' THEN 'transportation'
WHEN a.CATEGORIE ='Transport' THEN 'transport'
WHEN a.CATEGORIE ='Industriel et commercial' and a.NATURE IN ( 'Divers commercial' , 'Marché') THEN 'commercial'
WHEN a.CATEGORIE ='Industriel et commercial'
and a.NATURE IN ('Aquaculture', 'Carrière' ,'Centrale électrique' , 'Déchèterie' ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(18, 'industrial', 'Building where
INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(19, 'sport', 'Buildings, constructions, installations, organized areas and equipment for indoor and outdoor sport activities', 'https://wiki.openstreetmap.org/wiki/Tag:building=sport');
INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(20, 'sports_centre', 'Building that is designed for sports, e.g. for school sports, university or club sports', 'https://wiki.openstreetmap.org/wiki/Tag:building=sports_centre');
INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(21, 'grandstand', 'Building for the main stand, usually roofed, commanding the best view for spectators at racecourses or sports grounds', 'https://wiki.openstreetmap.org/wiki/Tag:building=grandstand');
INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(22, 'transportation', 'Building, construction, installation, organized areas and equipment for transportation', 'https://wiki.openstreetmap.org/wiki/Tag:building=transportation');
INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(22, 'transport', 'Building, construction, installation, organized areas and equipment for transportation', 'https://wiki.openstreetmap.org/wiki/Tag:building=transportation');
INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(23, 'train_station', 'Train station building', 'https://wiki.openstreetmap.org/wiki/Tag:building=train_station');
INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(24, 'toll_booth', 'Toll roads charge money for some or all traffic', 'https://wiki.openstreetmap.org/wiki/Tag:barrier=toll_booth');
INSERT INTO $BUILDING_ABSTRACT_USE_TYPE VALUES(25, 'terminal', 'Airport passenger building', 'https://wiki.openstreetmap.org/wiki/Tag:aeroway=terminal');
Expand Down Expand Up @@ -103,7 +103,7 @@ INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(18, 'industrial', 0);
INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(19, 'sport', 0);
INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(20, 'sports_centre', 0);
INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(21, 'grandstand', 0);
INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(22, 'transportation', 0);
INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(22, 'transport', 0);
INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(23, 'train_station', 0);
INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(24, 'toll_booth', 0);
INSERT INTO $BUILDING_ABSTRACT_PARAMETERS VALUES(25, 'terminal', 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"sport": 0,
"sports_centre": 0,
"grandstand": 0,
"transportation": 0,
"transport": 0,
"train_station": 0,
"toll_booth": 0,
"toll": 0,
Expand All @@ -89,7 +89,7 @@
"parking": 1
},
"type": {
"terminal:transportation": {
"terminal:transport": {
"aeroway": [
"terminal",
"airport_terminal"
Expand All @@ -103,7 +103,7 @@
"airport_terminal"
]
},
"parking:transportation": {
"parking:transport": {
"building": [
"parking"
]
Expand Down Expand Up @@ -247,7 +247,7 @@
"military"
]
},
"train_station:transportation": {
"train_station:transport": {
"building": [
"train_station"
],
Expand All @@ -270,7 +270,7 @@
"townhall"
]
},
"toll:transportation": {
"toll:transport": {
"barrier": [
"toll_booth"
],
Expand Down Expand Up @@ -519,7 +519,7 @@
"! no"
]
},
"transportation": {
"transport": {
"building": [
"train_station",
"transportation",
Expand Down

0 comments on commit cd9c21f

Please sign in to comment.