Skip to content

Commit

Permalink
Drop osm_transportation_name_network table before recreation. (openma…
Browse files Browse the repository at this point in the history
…ptiles#1653)

Drop the main table for layer `transportation_name` layer before creation.

For the first SQL import, it is OK, but for the second import (e.g. for a different country by `import-osm area=yyy`) without dropping the whole database it will keep `osm_transportation_name_network` filled with data from the first import (after first `import-sql` step)

This PR will drop the already-filled table from the first import and insert data from the reimported area.
  • Loading branch information
TomPohys authored Apr 3, 2024
1 parent 5969265 commit 382b12a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layers/transportation/update_transportation_merge.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ $$ LANGUAGE SQL IMMUTABLE

-- etldoc: osm_highway_linestring -> osm_transportation_name_network
-- etldoc: transportation_route_member_coalesced -> osm_transportation_name_network
CREATE TABLE IF NOT EXISTS osm_transportation_name_network AS
DROP TABLE IF EXISTS osm_transportation_name_network;
CREATE TABLE osm_transportation_name_network AS
SELECT
geometry,
osm_id,
Expand Down

0 comments on commit 382b12a

Please sign in to comment.