fix id missing in clip table and skipping importing shapefiles with g… (#76)

* fix clip id error in the sql
pull/77/head
mazano 2018-10-14 03:18:14 +02:00 zatwierdzone przez Etienne Trimaille
rodzic f0702acd49
commit 4cda435850
2 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -91,7 +91,7 @@ import_clip:
@echo "------------------------------------------------------------------"
@echo "Importing clip shapefile into the database"
@echo "------------------------------------------------------------------"
@docker exec -t -i $(PROJECT_ID)_imposm /usr/bin/ogr2ogr -lco GEOMETRY_NAME=geom -nlt PROMOTE_TO_MULTI -f PostgreSQL PG:"host=db user=docker password=docker dbname=gis" /home/settings/clip/clip.shp
@docker exec -t -i $(PROJECT_ID)_imposm /usr/bin/ogr2ogr -progress -skipfailures -lco GEOMETRY_NAME=geom -nlt PROMOTE_TO_MULTI -f PostgreSQL PG:"host=db user=docker password=docker dbname=gis" /home/settings/clip/clip.shp
remove_clip:
@echo

Wyświetl plik

@ -11,8 +11,7 @@ BEGIN
EXECUTE 'DELETE FROM ' || quote_ident(osm_table.table_name) || ' WHERE osm_id IN (
SELECT DISTINCT osm_id
FROM ' || quote_ident(osm_table.table_name) || '
LEFT JOIN clip ON ST_Intersects(geometry, geom)
WHERE clip.id IS NULL)
LEFT JOIN clip ON ST_Intersects(geometry, geom))
;';
END LOOP;
END;