Skip to content

Commit

Permalink
Fix BDTopo columns
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed Dec 19, 2024
1 parent f4af217 commit 24874da
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 @@ -107,7 +107,7 @@ def filterLinkedShapeFiles(def location, float distance, LinkedHashMap inputTabl
WHERE the_geom && 'SRID=$sourceSRID;$geomToExtract'::GEOMETRY
AND ST_INTERSECTS(the_geom, 'SRID=$sourceSRID;$geomToExtract'::GEOMETRY)
AND NATURE NOT IN ('Bac ou liaison maritime', 'Escalier')
""".toString())
""")
} else {
throw new Exception("The troncon_de_route table must be provided")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ Map loadV3(JdbcDataSource datasource,
datasource.execute("""DROP TABLE IF EXISTS $troncon_de_route;
CREATE TABLE $troncon_de_route (THE_GEOM geometry(linestring, $srid), ID varchar,
LARGEUR DOUBLE PRECISION, NATURE varchar, POS_SOL integer, FRANCHISST varchar, SENS varchar,
IMPORTANCE VARCHAR, CL_ADMIN VARCHAR, NAT_RESTR VARCHAR);""".toString())
IMPORTANCE VARCHAR, CL_ADMIN VARCHAR, NAT_RESTR VARCHAR, NB_VOIES INTEGER);""".toString())
}

String troncon_de_voie_ferree = tablesExist.get("troncon_de_voie_ferree")
Expand Down Expand Up @@ -561,7 +561,7 @@ Map loadV3(JdbcDataSource datasource,
DROP TABLE IF EXISTS INPUT_ROAD;
CREATE TABLE INPUT_ROAD (THE_GEOM geometry, ID_SOURCE varchar(24), WIDTH DOUBLE PRECISION,
TYPE varchar, ZINDEX integer, CROSSING varchar, DIRECTION varchar,
RANK INTEGER, ADMIN_SCALE VARCHAR)
RANK INTEGER, ADMIN_SCALE VARCHAR, NB_VOIES INTEGER)
AS SELECT ST_FORCE2D(a.THE_GEOM) as the_geom, a.ID, a.LARGEUR,
CASE WHEN a.NAT_RESTR = 'Piste cyclable' then a.NAT_RESTR else a.NATURE end,
CASE WHEN a.POS_SOL='Gué ou radier' THEN 0 ELSE CAST(a.POS_SOL AS INT ) END AS POS_SOL,
Expand All @@ -573,7 +573,7 @@ Map loadV3(JdbcDataSource datasource,
WHEN a.SENS='Sens inverse' THEN 'Inverse'
ELSE null END AS SENS,
CASE WHEN a.IMPORTANCE IN ('1', '2', '3', '4', '5', '6') THEN CAST (a.IMPORTANCE AS INTEGER) ELSE NULL END ,
a.CL_ADMIN
a.CL_ADMIN, a.NB_VOIES
FROM $troncon_de_route a,
ZONE_EXTENDED b WHERE a.the_geom && b.the_geom AND ST_INTERSECTS(a.the_geom, b.the_geom)
and a.POS_SOL not in ('-4' , '-3' ,'-2' ,'-1');
Expand Down

0 comments on commit 24874da

Please sign in to comment.