From b864017955168a4f7a583cb4eaebeee72c8db731 Mon Sep 17 00:00:00 2001 From: MaelREBOUX Date: Fri, 11 Mar 2022 16:11:44 +0100 Subject: [PATCH] =?UTF-8?q?suppression=20du=20r=C3=A9pertoire=20v1=20des?= =?UTF-8?q?=20scripts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/backup_umap.sh | 71 - scripts/config.ini | 8 - scripts/create_database.sh | 52 - scripts/create_osm_roads.sh | 136 - scripts/create_osm_roads.sql | 101 - scripts/create_osm_roads_pgr.sh | 44 - scripts/create_tables.sh | 29 - scripts/create_tables.sql | 755 -- scripts/drop_tables.sql | 41 - scripts/export_prefecture_liste_voies.fmw | 722 -- scripts/load_communes_osm_br.sh | 40 - scripts/load_communes_osm_fr.sh | 44 - scripts/load_osm_municipalities.fmw | 2310 ----- scripts/patch_osm_roads.sh | 34 - scripts/patch_osm_roads_pgr.sql | 40 - scripts/path_lines_to_patch_masks.fmw | 2065 ---- scripts/phase_5 snap.fmw | 1124 --- scripts/phase_5.sql | 128 - scripts/reload_osm_patch_from_gml.fmw | 1924 ---- scripts/routing.sql | 125 - scripts/synchronize_routing_tables.sh | 34 - scripts/traitements_phase_1.py | 82 - scripts/traitements_phase_1.sh | 102 - scripts/traitements_phase_1.sql | 81 - scripts/traitements_phase_2.1.sql | 104 - scripts/traitements_phase_2.2 troncons.sql | 79 - scripts/traitements_phase_2.2.sql | 69 - scripts/traitements_phase_2.sh | 271 - scripts/traitements_phase_3.sh | 84 - .../traitements_phase_3_decoupage v1 2018.fmw | 7213 -------------- .../traitements_phase_3_decoupage v2 2018.fmw | 7574 --------------- scripts/traitements_phase_3_decoupage.fmw | 8268 ----------------- scripts/traitements_phase_4.sh | 76 - scripts/traitements_phase_5.sh | 296 - scripts/traitements_phase_5.sql | 37 - scripts/traitements_phase_5_push_trace.sh | 67 - scripts/traitements_phase_5_recalage.fmw | 2644 ------ scripts/update_all.sh | 32 - scripts/update_osm_roads_pgr.sh | 80 - scripts/update_osm_roads_pgr.sql | 62 - 40 files changed, 37048 deletions(-) delete mode 100755 scripts/backup_umap.sh delete mode 100644 scripts/config.ini delete mode 100755 scripts/create_database.sh delete mode 100755 scripts/create_osm_roads.sh delete mode 100644 scripts/create_osm_roads.sql delete mode 100755 scripts/create_osm_roads_pgr.sh delete mode 100755 scripts/create_tables.sh delete mode 100644 scripts/create_tables.sql delete mode 100644 scripts/drop_tables.sql delete mode 100644 scripts/export_prefecture_liste_voies.fmw delete mode 100755 scripts/load_communes_osm_br.sh delete mode 100755 scripts/load_communes_osm_fr.sh delete mode 100644 scripts/load_osm_municipalities.fmw delete mode 100755 scripts/patch_osm_roads.sh delete mode 100644 scripts/patch_osm_roads_pgr.sql delete mode 100644 scripts/path_lines_to_patch_masks.fmw delete mode 100644 scripts/phase_5 snap.fmw delete mode 100644 scripts/phase_5.sql delete mode 100644 scripts/reload_osm_patch_from_gml.fmw delete mode 100644 scripts/routing.sql delete mode 100755 scripts/synchronize_routing_tables.sh delete mode 100644 scripts/traitements_phase_1.py delete mode 100755 scripts/traitements_phase_1.sh delete mode 100644 scripts/traitements_phase_1.sql delete mode 100644 scripts/traitements_phase_2.1.sql delete mode 100644 scripts/traitements_phase_2.2 troncons.sql delete mode 100644 scripts/traitements_phase_2.2.sql delete mode 100755 scripts/traitements_phase_2.sh delete mode 100755 scripts/traitements_phase_3.sh delete mode 100644 scripts/traitements_phase_3_decoupage v1 2018.fmw delete mode 100644 scripts/traitements_phase_3_decoupage v2 2018.fmw delete mode 100644 scripts/traitements_phase_3_decoupage.fmw delete mode 100755 scripts/traitements_phase_4.sh delete mode 100755 scripts/traitements_phase_5.sh delete mode 100644 scripts/traitements_phase_5.sql delete mode 100755 scripts/traitements_phase_5_push_trace.sh delete mode 100644 scripts/traitements_phase_5_recalage.fmw delete mode 100755 scripts/update_all.sh delete mode 100755 scripts/update_osm_roads_pgr.sh delete mode 100755 scripts/update_osm_roads_pgr.sql diff --git a/scripts/backup_umap.sh b/scripts/backup_umap.sh deleted file mode 100755 index cc07cf7..0000000 --- a/scripts/backup_umap.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -cd /data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/backup/ -#cd backup/ - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# on récupère les couches geojson depuis umap pour sauvegarde au cas où - -# carte phase 1 -# le tracé manuel -#curl -sS http://umap.openstreetmap.fr/fr/datalayer/746021/ > "phase_1/$(date +%Y%m%d)_$(date +%H%M)_phase_1_trace.geojson" -# PK VIP -#curl -sS http://umap.openstreetmap.fr/fr/datalayer/715179/ > "phase_1/$(date +%Y%m%d)_$(date +%H%M)_phase_1_pk_vip.geojson" - - -# carte phase 2 -# PK secteur -#curl -sS http://umap.openstreetmap.fr/fr/datalayer/817220/ > "phase_2/$(date +%Y%m%d)_$(date +%H%M)_phase_2_pk_secteur.geojson" -# PK technique / PK tecknikel -#curl -sS http://umap.openstreetmap.fr/fr/datalayer/817221/ > "phase_2/$(date +%Y%m%d)_$(date +%H%M)_phase_2_pk_techniques.geojson" -# points coupe tracé -#curl -sS http://umap.openstreetmap.fr/fr/datalayer/861810/ > "phase_2/$(date +%Y%m%d)_$(date +%H%M)_phase_2_points_coupe_trace.geoson" - - -# on remonte d'un niveau ceux cd 06h 13h et 18h - -# si le nom du fichier matche le motif regexp -# on copie le fichier dans un autre répertoire - -# for f in jour_courant/*.geojson -# do -# #if [[ $f =~ [0-9]{8}_(0600|1300|1800)_* ]] -# if [[ $f =~ [0-9]{8}_(1200)_* ]] -# then cp $f ./ -# fi -# done - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - -# cartes phase 5 - -# on sauvegarde les couches de PK gérés manuellement par secteurs -# secteur 1 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027042/ > "phase_5/phase_5_pk_secteur_01_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 2 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027081/ > "phase_5/phase_5_pk_secteur_02_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 3 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027101/ > "phase_5/phase_5_pk_secteur_03_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 4 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027104/ > "phase_5/phase_5_pk_secteur_04_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 5 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027107/ > "phase_5/phase_5_pk_secteur_05_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 6 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027110/ > "phase_5/phase_5_pk_secteur_06_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 7 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027114/ > "phase_5/phase_5_pk_secteur_07_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 8 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027117/ > "phase_5/phase_5_pk_secteur_08_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 9 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027120/ > "phase_5/phase_5_pk_secteur_09_$(date +%Y%m%d)_$(date +%H%M).geojson" -# secteur 10 -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027123/ > "phase_5/phase_5_pk_secteur_10_$(date +%Y%m%d)_$(date +%H%M).geojson" - - -# la couche des PK assemblés -cp ../data/phase_5_pk.geojson "phase_5/phase_5_pk_$(date +%Y%m%d)_$(date +%H%M).geojson" - - - - diff --git a/scripts/config.ini b/scripts/config.ini deleted file mode 100644 index 7238462..0000000 --- a/scripts/config.ini +++ /dev/null @@ -1,8 +0,0 @@ - -[pg_redadeg] -host = bed110.bedniverel.bzh -port = 55432 -db = redadeg -schema = public -user = redadeg -passwd = redadeg diff --git a/scripts/create_database.sh b/scripts/create_database.sh deleted file mode 100755 index 01f32ce..0000000 --- a/scripts/create_database.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -# exit dès que qqch se passe mal -#set -e -# ? -set -u - -# utiliser un compte SUPERUSER pour exécuter ce script - -# argument 1 = millesime redadeg -millesime=$1 - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_NAME=redadeg_$millesime - - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Création de la base de données $DB_NAME" -echo "" -echo "" - - -echo "La base de données $DB_NAME va être supprimée !!" - -if [ ! -t 0 ]; then x-terminal-emulator -e "$0"; exit 0; fi -read -r -p "Appuyer sur n'importe quelle touche pour continuer..." key - -# suppression de la base de données existantes -echo "DROP DATABASE $DB_NAME ;" | psql -U postgres -w - -# create role -psql -h $DB_HOST -d postgres -c "CREATE USER redadeg WITH PASSWORD 'redadeg' SUPERUSER;" - -# create database with owner redadeg -psql -h $DB_HOST -d postgres -c "CREATE DATABASE $DB_NAME WITH OWNER = redadeg ENCODING = 'UTF8';" - -# extensions postgis -psql -h $DB_HOST -d $DB_NAME -c "CREATE EXTENSION postgis;" -psql -h $DB_HOST -d $DB_NAME -c "CREATE EXTENSION postgis_topology;" -psql -h $DB_HOST -d $DB_NAME -c "CREATE EXTENSION pgrouting;" - -# permissions -psql -h $DB_HOST -d $DB_NAME -c "ALTER SCHEMA public OWNER TO redadeg;" -psql -h $DB_HOST -d $DB_NAME -c "ALTER TABLE topology.layer OWNER TO redadeg ;" -psql -h $DB_HOST -d $DB_NAME -c "ALTER TABLE topology.topology OWNER TO redadeg ;" - -# vérifications -psql -h $DB_HOST -d $DB_NAME -c "SELECT * FROM postgis_version();" -psql -h $DB_HOST -d $DB_NAME -c "SELECT * FROM pgr_version();" - diff --git a/scripts/create_osm_roads.sh b/scripts/create_osm_roads.sh deleted file mode 100755 index 5104f6c..0000000 --- a/scripts/create_osm_roads.sh +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/bash - -set -e -set -u - -# argument 1 = millesime redadeg -millesime=$1 - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Création de la couche osm_roads" -echo "" -echo "" - -PSQL=/usr/bin/psql -HOST_DB_redadeg=localhost -HOST_DB_osm=localhost -DB_REDADEG=redadeg_$millesime -DB_OSM=osm -DB_USER=redadeg -DB_PASSWD=redadeg - -rep_scripts='/data/projets/ar_redadeg/scripts/' -echo "rep_scripts = $rep_scripts" -# variables liées au millésimes -echo "millesime de travail = $1" -rep_data=../data/$millesime -echo "rep_data = $rep_data" - -echo "" -echo "import phase_1_trace dans la base OSM" -echo "" - -# 1. export du tracé phase 1 depuis la base redadeg -pg_dump --dbname=postgresql://$DB_USER:$DB_PASSWD@$HOST_DB_redadeg/$DB_REDADEG \ - --format=p --no-owner --section=pre-data --section=data --no-privileges --no-tablespaces --no-unlogged-table-data --no-comments \ - --table phase_1_trace \ - --file $rep_data/redadeg_trace.sql - - -# 2. import dans la base OSM -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_osm -U $DB_USER -d $DB_OSM -c "DROP TABLE IF EXISTS phase_1_trace_$millesime ;" -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_osm -U $DB_USER -d $DB_OSM < $rep_data/redadeg_trace.sql -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_osm -U $DB_USER -d $DB_OSM -c "ALTER TABLE phase_1_trace RENAME TO phase_1_trace_$millesime ;" - -echo "" -echo "fait" -echo "" - - -# 3. calcul de la couche osm_roads = intersection buffer trace et routes OSM - -echo ">> calcul de la couche osm_roads" -echo "" - -# on supprime puis on recrée la table -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_osm -U $DB_USER -d $DB_OSM -c "DROP TABLE IF EXISTS osm_roads_$millesime ;" -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_osm -U $DB_USER -d $DB_OSM -c " -CREATE TABLE osm_roads_$millesime -( - uid bigint NOT NULL, - osm_id bigint, - highway text, - type text, - oneway text, - ref text, - name_fr text, - name_br text, - the_geom geometry, - CONSTRAINT osm_roads_pkey PRIMARY KEY (uid), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -);" - -echo "" -echo " table osm_roads_$millesime créée" -echo "" -echo " extraction du filaire de voies OSM le long du tracé fourni" -echo "" - -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_osm -U $DB_USER -d $DB_OSM -c "WITH trace_buffer AS ( - SELECT - secteur_id, - ST_Union(ST_Buffer(the_geom, 25, 'quad_segs=2')) AS the_geom - FROM phase_1_trace_$millesime - GROUP BY secteur_id - ORDER BY secteur_id -) -INSERT INTO osm_roads_$millesime -( - SELECT - row_number() over() as id, - osm_id, - highway, - CASE - WHEN highway IN ('motorway', 'trunk') THEN 'motorway' - WHEN highway IN ('primary', 'secondary') THEN 'mainroad' - WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad' - WHEN highway IN ('service', 'track') THEN 'service' - WHEN highway IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto' - ELSE 'other' - END AS type, - oneway, - ref, - name AS name_fr, - COALESCE(tags -> 'name:br'::text) as name_br, - ST_Intersection(ST_Transform(o.way,2154), t.the_geom) AS the_geom - FROM planet_osm_line o, trace_buffer t - WHERE highway IS NOT NULL AND ST_INTERSECTS(t.the_geom, ST_Transform(o.way,2154)) -) ;" - -echo "" -echo "fait" -echo "" - - -# 4. export de osm_roads depuis la base OSM - -echo "transfert de osm_roads_$millesime depuis la base OSM vers la base redadeg" -echo "" - -pg_dump --dbname=postgresql://$DB_USER:$DB_PASSWD@$HOST_DB_osm/$DB_OSM \ - --format=p --no-owner --section=pre-data --section=data --no-privileges --no-tablespaces --no-unlogged-table-data --no-comments \ - --table osm_roads_$millesime \ - --file $rep_data/osm_roads.sql - -# 5. import dans la base redadeg -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_redadeg -U $DB_USER -d $DB_REDADEG -c "DROP TABLE IF EXISTS osm_roads;" -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_redadeg -U $DB_USER -d $DB_REDADEG < $rep_data/osm_roads.sql -PGPASSWORD=$DB_PASSWD $PSQL -h $HOST_DB_redadeg -U $DB_USER -d $DB_REDADEG -c "ALTER TABLE osm_roads_$millesime RENAME TO osm_roads ;" - -echo "" -echo "fait" -echo "" - -echo "fini" - diff --git a/scripts/create_osm_roads.sql b/scripts/create_osm_roads.sql deleted file mode 100644 index 8a8f66d..0000000 --- a/scripts/create_osm_roads.sql +++ /dev/null @@ -1,101 +0,0 @@ -/* -========================================================================== - - OpenStreetMap : création de la couche du réseau routier OSM - pour le calcul d'itinéraires - -========================================================================== -*/ - --- A faire dans une base OSM contenant un import osm2pgsql - --- Le but est de créer une table osm_roads qui contiendra --- le réseau routier dans une zone-tampon de 500 autour du tracé. - --- on fait ça dans une base à part à cause de la volumétrie des données OSM - - - --- 1. import du tracé dans la base OSM - --- export du tracé depuis la base redadeg --- pg_dump --file redadeg_trace.sql --host localhost --username redadeg --no-password --format=p --no-owner --section=pre-data --section=data --no-privileges --no-tablespaces --no-unlogged-table-data --no-comments --table public.phase_1_trace redadeg - --- import dans la base osm --- psql -U osmbr -d osm -c "DROP TABLE public.phase_1_trace;" --- psql -U osmbr -d osm < redadeg_trace.sql - - - - --- 2. création de la table qui va accueillir les tronçons de routes - --- la table qui contient le graphe routier de OSM -DROP TABLE IF EXISTS osm_roads ; -CREATE TABLE osm_roads -( - uid bigint, - osm_id bigint, - highway text, - type text, - oneway text, - ref text, - name_fr text, - name_br text, - the_geom geometry, - CONSTRAINT osm_roads_pkey PRIMARY KEY (uid), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); - - - --- 3. remplissage de la table à l'aide d'un requête --- qui va faire un buffer de 25 m autour du tracé --- environ 5 min de traitement - -TRUNCATE TABLE osm_roads ; -WITH trace_buffer AS ( - SELECT - secteur_id, - ST_Union(ST_Buffer(the_geom, 25, 'quad_segs=2')) AS the_geom - FROM phase_1_trace - GROUP BY secteur_id - ORDER BY secteur_id -) -INSERT INTO osm_roads -( - SELECT - row_number() over() as id, - osm_id, - highway, - CASE - WHEN highway IN ('motorway', 'trunk') THEN 'motorway' - WHEN highway IN ('primary', 'secondary') THEN 'mainroad' - WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad' - WHEN highway IN ('service', 'track') THEN 'service' - WHEN highway IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto' - ELSE 'other' - END AS type, - oneway, - ref, - name AS name_fr, - COALESCE(tags -> 'name:br'::text) as name_br, - ST_Intersection(ST_Transform(o.way,2154), t.the_geom) AS the_geom - FROM planet_osm_line o, trace_buffer t - WHERE highway IS NOT NULL AND ST_INTERSECTS(t.the_geom, ST_Transform(o.way,2154)) -) ; - - --- 4. on l'exporte pour la recharger dans la base redadeg - --- commande d'export --- pg_dump --file osm_roads.sql --host localhost --username osmbr --no-password --format=p --no-owner --section=pre-data --section=data --no-privileges --no-tablespaces --no-unlogged-table-data --no-comments --table public.osm_roads osm - --- commande d'import --- psql -U redadeg -d redadeg -c "DROP TABLE public.osm_roads;" --- psql -U redadeg -d redadeg < osm_roads.sql - - - - diff --git a/scripts/create_osm_roads_pgr.sh b/scripts/create_osm_roads_pgr.sh deleted file mode 100755 index 18460a3..0000000 --- a/scripts/create_osm_roads_pgr.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -set -e -set -u - -# argument 1 = millesime redadeg -millesime=$1 - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Création de la couche osm_roads_pgr" -echo "" -echo "" - -# suppose le le .pgpass est correctement configuré pour le compte qui lance ce script - - -echo ">> suppression de la topologie existante" -echo "" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT DropTopology('osm_roads_topo') ;" || true -echo "" - -# création d'un schéma qui va accueillir le réseau topologique de la couche osm_roads -echo ">> création d'une nouvelle topologie" -echo "" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT topology.CreateTopology('osm_roads_topo', 2154);" - - -echo ">> ajout d'un nouvel attribut sur la table osm_roads" -echo "" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT topology.AddTopoGeometryColumn('osm_roads_topo', 'public', 'osm_roads', 'topo_geom', 'LINESTRING');" -echo "" -echo "fait" -echo "" - - -echo "fini >> exécuter update_osm_roads_pgr.sh " -echo "" diff --git a/scripts/create_tables.sh b/scripts/create_tables.sh deleted file mode 100755 index 294d819..0000000 --- a/scripts/create_tables.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -e -set -u - -# argument 1 = millesime redadeg -millesime=$1 - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Création des tables dans la base de données $DB_NAME" -echo "" -echo "" - -# suppression d'abord -psql -h $DB_HOST -U redadeg -d $DB_NAME < drop_tables.sql - -# création -psql -h $DB_HOST -U redadeg -d $DB_NAME < create_tables.sql - -# initialisation de la table de référence des secteurs pour le millésime -psql -h $DB_HOST -U redadeg -d $DB_NAME < ../data/$millesime/update_infos_secteurs.sql - diff --git a/scripts/create_tables.sql b/scripts/create_tables.sql deleted file mode 100644 index 8f50525..0000000 --- a/scripts/create_tables.sql +++ /dev/null @@ -1,755 +0,0 @@ - - -/* -========================================================================== - - phase 1 : récupération des données depuis umap et calcul des PK auto - -========================================================================== -*/ - --- voir la documentation pour la création de la base de données - --- on est obligé de créer des tables en Lambert 93 (EPSG:2154) (ou une CC conforme) --- car même si les tables originales sont déclarées en 3857 --- en fait les géoémtries sont en 4326 --- donc les calculs de longueur sont faux --- au moins en créant une table en dur en Lambert 93 / 2154 on est sûr des longueurs - - --- la table secteur gère les grands découpage de gestion -DROP TABLE IF EXISTS secteur CASCADE ; -CREATE TABLE secteur -( - id integer, - nom_br text, - nom_fr text, - objectif_km integer, - km_redadeg integer -); - -ALTER TABLE secteur OWNER to redadeg; - - - -DROP TABLE IF EXISTS phase_1_trace_3857 ; -CREATE TABLE phase_1_trace_3857 -( - fake_column integer -); -ALTER TABLE phase_1_trace_3857 OWNER to redadeg; - -DROP TABLE IF EXISTS phase_1_pk_vip_3857 ; -CREATE TABLE phase_1_pk_vip_3857 -( - fake_column integer -); -ALTER TABLE phase_1_pk_vip_3857 OWNER to redadeg; - - - -DROP TABLE IF EXISTS phase_1_trace CASCADE ; -CREATE TABLE phase_1_trace -( - ogc_fid integer, - secteur_id int, - ordre int, - longueur numeric, - the_geom geometry(LineString,2154), - CONSTRAINT phase_1_trace_pkey PRIMARY KEY (ogc_fid), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_1_trace OWNER to redadeg; - - -DROP TABLE IF EXISTS phase_1_pk_vip CASCADE ; -CREATE TABLE phase_1_pk_vip -( - ogc_fid integer, - name text, - description text, - the_geom geometry(Point,2154), - CONSTRAINT phase_1_pk_vip_pkey PRIMARY KEY (ogc_fid), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_1_pk_vip OWNER to redadeg; - - --- on crée aussi une version correcte en 4326 pour export vers umap -DROP TABLE IF EXISTS phase_1_trace_4326 ; -CREATE TABLE phase_1_trace_4326 -( - ogc_fid integer, - name text, -- = section_nom - secteur_id int, - ordre int, - longueur numeric, - the_geom geometry(LineString,4326), - CONSTRAINT phase_1_trace_4326_pkey PRIMARY KEY (ogc_fid), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326) -); -ALTER TABLE phase_1_trace_4326 OWNER to redadeg; - - --- table des tronçons créés à partir des longs tracés -DROP TABLE IF EXISTS phase_1_trace_troncons CASCADE ; -CREATE TABLE phase_1_trace_troncons -( - uid bigint, - secteur_id int, - ordre bigint, - km bigint, - km_reel bigint, - longueur integer, - the_geom geometry(LineString,2154), - CONSTRAINT phase_1_trace_troncons_pkey PRIMARY KEY (uid), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_1_trace_troncons OWNER to redadeg; - - - --- vue des PK auto en fin de tronçon -DROP VIEW IF EXISTS phase_1_pk_auto ; -CREATE VIEW phase_1_pk_auto AS - SELECT - uid, secteur_id, ordre, km, km_reel, - ST_Line_Interpolate_Point(the_geom, 1)::geometry(Point, 2154) AS the_geom - FROM phase_1_trace_troncons - ORDER BY secteur_id ASC, ordre ASC, km ASC ; -ALTER TABLE phase_1_pk_auto OWNER to redadeg; - --- la même mais en 4326 pour export -DROP VIEW IF EXISTS phase_1_pk_auto_4326 ; -CREATE VIEW phase_1_pk_auto_4326 AS - SELECT - uid, secteur_id, ordre, km, km_reel, - ST_Transform(the_geom,4326)::geometry(Point, 4326) AS the_geom - FROM phase_1_pk_auto - ORDER BY secteur_id ASC, ordre ASC, km ASC ; -ALTER TABLE phase_1_pk_auto_4326 OWNER to redadeg; - --- vue tableau de bord de synthèse -DROP VIEW IF EXISTS phase_1_tdb ; -CREATE VIEW phase_1_tdb AS - SELECT - t.secteur_id, s.nom_br, s.nom_fr, - TRUNC( SUM(t.longueur)::numeric , 3) AS longueur_km, - ROUND( SUM(t.longueur)::numeric ) AS longueur_km_arrondi - FROM phase_1_trace t JOIN secteur s ON t.secteur_id = s.id - GROUP BY secteur_id, nom_br, nom_fr - ORDER BY secteur_id ; -ALTER TABLE phase_1_tdb OWNER to redadeg; - - - - -/* -========================================================================== - - phase 2 : calcul d'itinéraires en appui du réseau routier OSM - -========================================================================== -*/ - --- les couches PK venant de umap - -DROP TABLE IF EXISTS phase_2_pk_secteur_3857 ; -CREATE TABLE phase_2_pk_secteur_3857 -( - fake_column integer -); -ALTER TABLE phase_2_pk_secteur_3857 OWNER to redadeg; - -DROP TABLE IF EXISTS phase_2_point_nettoyage_3857 ; -CREATE TABLE phase_2_point_nettoyage_3857 -( - fake_column integer -); -ALTER TABLE phase_2_point_nettoyage_3857 OWNER to redadeg; - - -DROP TABLE IF EXISTS phase_2_pk_secteur CASCADE ; -CREATE TABLE phase_2_pk_secteur -( - id integer, - name text, - pgr_node_id integer, - secteur_id integer, - the_geom geometry(Point,2154), - CONSTRAINT phase_2_pk_secteur_pkey PRIMARY KEY (id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_2_pk_secteur OWNER to redadeg; - - --- une vue en 4326 pour export -DROP VIEW IF EXISTS phase_2_pk_secteur_4326 CASCADE ; -CREATE VIEW phase_2_pk_secteur_4326 AS - SELECT - pk.id, pk.name, s.id AS secteur_id, replace(s.nom_fr,' ','') AS nom_fr, replace(s.nom_br,' ','') AS nom_br, - ST_Transform(pk.the_geom,4326)::geometry(Point, 4326) AS the_geom - FROM phase_2_pk_secteur pk JOIN secteur s ON pk.id = s.id - ORDER BY pk.id ; -ALTER TABLE phase_2_pk_secteur_4326 OWNER to redadeg; - - --- les polygones des communes source OSM France -DROP TABLE IF EXISTS osm_communes CASCADE ; -CREATE TABLE osm_communes -( - gid serial, - insee character varying(80), - nom character varying(80), - wikipedia character varying(80), - surf_ha numeric, - the_geom geometry, - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POLYGON'::text OR geometrytype(the_geom) = 'MULTIPOLYGON'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154), - CONSTRAINT osm_communes_pkey PRIMARY KEY (gid) -); -CREATE INDEX osm_communes_geom_idx ON osm_communes USING gist(the_geom); -ALTER TABLE osm_communes OWNER to redadeg; - - --- la couche avec les info langue minoritaire -DROP TABLE IF EXISTS osm_municipalities CASCADE ; -CREATE TABLE osm_municipalities -( - id serial, - osm_id bigint, - type text, - admin_level text, - name text, - name_fr text, - name_br text, - source_name_br text, - admincode text, - postcode text, - wikidata text, - surf_ha numeric, - x numeric, - y numeric, - the_geom geometry, - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POLYGON'::text OR geometrytype(the_geom) = 'MULTIPOLYGON'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154), - CONSTRAINT osm_municipalities_pkey PRIMARY KEY (id) -); -CREATE INDEX osm_municipalities_geom_idx ON osm_municipalities USING gist(the_geom); -CREATE INDEX osm_municipalities_admincode_idx ON osm_municipalities(admincode); -ALTER TABLE osm_municipalities OWNER to redadeg; - - - - - --- la couche qui contient les lignes des routes venant de OSM -DROP TABLE IF EXISTS osm_roads CASCADE ; -CREATE TABLE osm_roads -( - uid bigint NOT NULL, - osm_id bigint, - highway text, - type text, - oneway text, - ref text, - name_fr text, - name_br text, - the_geom geometry, - CONSTRAINT osm_roads_pkey PRIMARY KEY (uid), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -CREATE INDEX osm_roads_geom_idx ON osm_roads USING gist(the_geom); -ALTER TABLE osm_roads OWNER to redadeg; - - --- la couche en version routable -DROP TABLE IF EXISTS osm_roads_pgr CASCADE ; -CREATE TABLE osm_roads_pgr -( - id bigint, - osm_id bigint, - highway text, - type text, - oneway text, - ref text, - name_fr text, - name_br text, - source bigint, - target bigint, - cost double precision, - reverse_cost double precision, - the_geom geometry, - CONSTRAINT osm_roads_pgr_pkey PRIMARY KEY (id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -CREATE INDEX osm_roads_pgr_source_idx ON osm_roads_pgr (source); -CREATE INDEX osm_roads_pgr_target_idx ON osm_roads_pgr (target); -ALTER TABLE osm_roads_pgr OWNER to redadeg; - - --- la couche des points pour nettoyer la couche de routage -DROP TABLE IF EXISTS phase_2_point_nettoyage CASCADE ; -CREATE TABLE phase_2_point_nettoyage -( - id serial, - pt_id bigint, - edge_id bigint, - distance numeric, - the_geom geometry, - CONSTRAINT phase_2_point_nettoyage_pkey PRIMARY KEY (id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_2_point_nettoyage OWNER to redadeg; - - --- couche de polygones pour supprimer le contenu de osm_roads_pgr pour la gestion des boucles -DROP TABLE IF EXISTS osm_roads_pgr_patch_mask CASCADE ; -CREATE TABLE osm_roads_pgr_patch_mask -( - id serial, - name text, - the_geom geometry, - CONSTRAINT osm_roads_pgr_patch_mask_pkid PRIMARY KEY (id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POLYGON'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE osm_roads_pgr_patch_mask OWNER to redadeg; - - --- couche jumelle de osm_roads mais avec des lignes gérées à la main pour les boucles -DROP TABLE IF EXISTS osm_roads_pgr_patch CASCADE ; -CREATE TABLE osm_roads_pgr_patch -( - id serial, - osm_id bigint, - highway text, - type text, - oneway text, - ref text, - name_fr text, - name_br text, - source bigint, - target bigint, - cost double precision, - reverse_cost double precision, - the_geom geometry, - CONSTRAINT osm_roads_pgr_patch_pkey PRIMARY KEY (id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE osm_roads_pgr_patch OWNER to redadeg; --- la séquence doit commencer à un chiffre supérieur à 1 car sinon ça fiche la pagaille sur le calcul de routage -ALTER SEQUENCE osm_roads_pgr_patch_id_seq START WITH 1000 ; - - - --- la table qui va recevoir le résultat du calcul d'itinéraire -DROP TABLE IF EXISTS phase_2_trace_pgr CASCADE ; -CREATE TABLE phase_2_trace_pgr -( - secteur_id integer, - -- info de routage - path_seq bigint, - node bigint, - cost double precision, - agg_cost double precision, - -- info OSM - osm_id bigint, - highway text, - type text, - oneway text, - ref text, - name_fr text, - name_br text, - the_geom geometry, - --CONSTRAINT phase_2_trace_pkey PRIMARY KEY (secteur_id, path_seq), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_2_trace_pgr OWNER to redadeg; - --- une vue en 4326 pour export -DROP VIEW IF EXISTS phase_2_trace_pgr_4326 ; -CREATE VIEW phase_2_trace_pgr_4326 AS - SELECT - secteur_id, - path_seq, node, cost, agg_cost, - osm_id, highway, type, oneway, ref, name_fr, name_br, - ST_Transform(the_geom,4326)::geometry(LineString, 4326) AS the_geom - FROM phase_2_trace_pgr ; -ALTER TABLE phase_2_trace_pgr_4326 OWNER to redadeg; - - - --- couche qui contient 1 ligne par secteur -DROP TABLE IF EXISTS phase_2_trace_secteur CASCADE ; -CREATE TABLE phase_2_trace_secteur -( - secteur_id int, - nom_fr text, - nom_br text, - longueur int, - longueur_km numeric, - the_geom geometry, - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_2_trace_secteur OWNER to redadeg; - --- une vue en 4326 pour export -DROP VIEW IF EXISTS phase_2_trace_secteur_4326 ; -CREATE VIEW phase_2_trace_secteur_4326 AS - SELECT - secteur_id, nom_fr, nom_br, - longueur, longueur_km, - ST_Transform(the_geom,4326)::geometry(MultiLineString, 4326) AS the_geom - FROM phase_2_trace_secteur ; -ALTER TABLE phase_2_trace_secteur_4326 OWNER to redadeg; - - --- ça sert à quoi ça ? -DROP TABLE IF EXISTS phase_2_trace_trous CASCADE ; -CREATE TABLE phase_2_trace_trous -( - id serial, - secteur_id int, - the_geom geometry, - CONSTRAINT phase_2_trace_trous_pkid PRIMARY KEY (id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_2_trace_trous OWNER to redadeg; - - - - - - - --- la table qui va contenir des tronçons de x m -DROP TABLE IF EXISTS phase_2_trace_troncons CASCADE ; -CREATE TABLE phase_2_trace_troncons -( - uid bigint, - secteur_id int, - ordre bigint, - km bigint, - km_reel bigint, - longueur integer, - -- info OSM - osm_id bigint, - highway text, - type text, - oneway text, - ref text, - name_fr text, - name_br text, - the_geom geometry, - CONSTRAINT phase_2_trace_troncons_pkey PRIMARY KEY (uid), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_2_trace_troncons OWNER to redadeg; - - -DROP VIEW IF EXISTS phase_2_tdb ; -CREATE VIEW phase_2_tdb AS - WITH total AS - ( - SELECT - 0 AS secteur_id, 'Total' AS nom_fr, 'Hollad' AS nom_br, - SUM(longueur_km) AS longueur_km - FROM public.phase_2_trace_secteur - GROUP BY 1 - ) - SELECT - a.secteur_id, a.nom_fr, a.nom_br, - a.longueur_km, - -- b.km_reels AS longueur_km_attendu, << vérifier si ça sert - -- -(b.km_reels - a.longueur_km) AS difference, << vérifier si ça sert - TRUNC(a.longueur_km / (SELECT longueur_km FROM total) * 2020, 0) AS nb_km_redadeg - --TRUNC((a.longueur_km / (SELECT longueur_km FROM total) * 2020) / b.km_reels, 3) AS longueur_km_redadeg - FROM phase_2_trace_secteur a JOIN secteur b ON a.secteur_id = b.id - UNION - SELECT - 0 AS secteur_id, 'Total' AS nom_fr, 'Hollad' AS nom_br, - SUM(longueur_km) AS longueur_km, - 0 - -- 0,0,0 - FROM public.phase_2_trace_secteur - GROUP BY 1 - ORDER BY secteur_id ASC ; -ALTER TABLE phase_2_tdb OWNER TO redadeg; - - - - -/* -========================================================================== - - phase 3 : calcul des PK auto - -========================================================================== -*/ - -DROP TABLE IF EXISTS phase_3_trace_troncons CASCADE ; -CREATE TABLE phase_3_trace_troncons -( - troncon_id bigint, - secteur_id int, - the_geom geometry, - CONSTRAINT phase_3_trace_troncons_pkey PRIMARY KEY (troncon_id), - --CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text), - --CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_3_trace_troncons OWNER TO redadeg; - --- la même couche en 4326 -DROP VIEW IF EXISTS phase_3_trace_troncons_4326 ; -CREATE VIEW phase_3_trace_troncons_4326 AS - SELECT - troncon_id, - secteur_id, - ST_Transform(the_geom,4326) AS the_geom - FROM phase_3_trace_troncons ; -ALTER TABLE phase_3_trace_troncons_4326 OWNER TO redadeg; - - - -DROP TABLE IF EXISTS phase_3_trace_secteurs CASCADE ; -CREATE TABLE phase_3_trace_secteurs -( - secteur_id int, - nom_fr text, - nom_br text, - km_reels numeric(8,2), - the_geom geometry, - CONSTRAINT phase_3_trace_secteurs_pkey PRIMARY KEY (secteur_id), - --CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text OR geometrytype(the_geom) = 'MULTILINESTRING'::text), - --CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_3_trace_secteurs OWNER TO redadeg; - --- la même couche en 4326 -DROP VIEW IF EXISTS phase_3_trace_secteurs_4326 ; -CREATE VIEW phase_3_trace_secteurs_4326 AS - SELECT - secteur_id, nom_fr, nom_br, - km_reels, - ST_Transform(the_geom,4326) AS the_geom - FROM phase_3_trace_secteurs ; -ALTER TABLE phase_3_trace_secteurs_4326 OWNER TO redadeg; - - - --- la couche des PK calculés automatiquement -DROP TABLE IF EXISTS phase_3_pk_auto CASCADE ; -CREATE TABLE phase_3_pk_auto -( - pk_id integer, - pk_x numeric(8,1), - pk_y numeric(8,1), - pk_long numeric(10,8), - pk_lat numeric(10,8), - length_real numeric(6,2), - length_theorical integer, - secteur_id integer, - municipality_admincode text, - municipality_postcode text, - municipality_name_fr text, - municipality_name_br text, - way_osm_id bigint, - way_highway text, - way_type text, - way_oneway text, - way_ref text, - way_name_fr text, - way_name_br text, - the_geom geometry, - CONSTRAINT phase_3_pk_auto_pkey PRIMARY KEY (pk_id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -) ; -ALTER TABLE phase_3_pk_auto OWNER TO redadeg; - - --- la même couche en 4326 -DROP VIEW IF EXISTS phase_3_pk_auto_4326 ; -CREATE VIEW phase_3_pk_auto_4326 AS - SELECT - pk_id, - pk_x, pk_y, pk_long, pk_lat, - length_real, length_theorical, - secteur_id, - municipality_admincode, municipality_postcode, - municipality_name_fr, municipality_name_br, - way_osm_id, way_highway, way_type, way_oneway, way_ref, - way_name_fr, way_name_br, - ST_Transform(the_geom,4326)::geometry(Point, 4326) AS the_geom - FROM phase_3_pk_auto ; -ALTER TABLE phase_3_pk_auto_4326 OWNER TO redadeg; - - --- couche de lignes simples directes de PK à PK -DROP TABLE IF EXISTS phase_3_pk_sens_verif ; -CREATE TABLE phase_3_pk_sens_verif -( - secteur_id integer, - the_geom geometry, - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'LINESTRING'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -) ; -ALTER TABLE phase_3_pk_sens_verif OWNER TO redadeg; - - --- la même couche en 4326 -DROP VIEW IF EXISTS phase_3_pk_sens_verif_4326 ; -CREATE VIEW phase_3_pk_sens_verif_4326 AS - SELECT - secteur_id, - ST_Transform(the_geom,4326)::geometry(LineString, 4326) AS the_geom - FROM phase_3_pk_sens_verif ; -ALTER TABLE phase_3_pk_sens_verif_4326 OWNER TO redadeg; - - - - -/* -========================================================================== - - phase 4 : création de la couche des PK à charger dans umap pour la phase 5 - -========================================================================== -*/ - - -DROP VIEW IF EXISTS phase_4_pk_auto_4326 CASCADE ; -CREATE VIEW phase_4_pk_auto_4326 AS - SELECT - pk_id, - secteur_id, - ST_Transform(the_geom,4326)::geometry(Point, 4326) AS the_geom - FROM phase_3_pk_auto ; -ALTER TABLE phase_4_pk_auto_4326 OWNER TO redadeg; - - - - -/* -========================================================================== - - phase 5 : gestion manuelle - -========================================================================== -*/ - --- la table des PK avant modifications manuelles = PK de référence = phase_3_pk_auto -DROP TABLE IF EXISTS phase_5_pk_ref CASCADE ; -CREATE TABLE phase_5_pk_ref -( - pk_id integer, - pk_x numeric(8,1), - pk_y numeric(8,1), - pk_long numeric(10,8), - pk_lat numeric(10,8), - length_real numeric(6,2), - length_theorical integer, - secteur_id integer, - municipality_admincode text, - municipality_postcode text, - municipality_name_fr text, - municipality_name_br text, - way_osm_id bigint, - way_highway text, - way_type text, - way_oneway text, - way_ref text, - way_name_fr text, - way_name_br text, - the_geom geometry, - CONSTRAINT phase_5_pk_ref_pkey PRIMARY KEY (pk_id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -) ; -ALTER TABLE phase_5_pk_ref OWNER TO redadeg; - --- on charge cette table avec les données finales de la phase 3 -TRUNCATE TABLE phase_5_pk_ref ; -INSERT INTO phase_5_pk_ref SELECT * FROM phase_3_pk_auto ; - - --- on définit manuellement la couche avec un type mixte parce qu'on a des lignes dans la couche de points… -DROP TABLE IF EXISTS phase_5_pk_umap_4326 CASCADE ; -CREATE TABLE phase_5_pk_umap_4326 -( - ogc_fid integer, - pk_id integer, - secteur_id integer, - the_geom geometry, - --CONSTRAINT phase_5_pk_umap_pkey PRIMARY KEY (ogc_fid), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 4326) -); -ALTER TABLE phase_5_pk_umap_4326 OWNER TO redadeg; - --- la table en 2154 pour travailler -DROP TABLE IF EXISTS phase_5_pk_umap CASCADE ; -CREATE TABLE phase_5_pk_umap -( - pk_id integer, - secteur_id integer, - the_geom geometry, - CONSTRAINT phase_5_pk_umap_pkey PRIMARY KEY (pk_id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -); -ALTER TABLE phase_5_pk_umap OWNER TO redadeg; - - --- la table finale -DROP TABLE IF EXISTS phase_5_pk CASCADE ; -CREATE TABLE phase_5_pk -( - pk_id integer, - pk_x numeric(8,1), - pk_y numeric(8,1), - pk_long numeric(10,8), - pk_lat numeric(10,8), - length_real numeric(6,2), - length_theorical integer, - secteur_id integer, - municipality_admincode text, - municipality_postcode text, - municipality_name_fr text, - municipality_name_br text, - way_osm_id bigint, - way_highway text, - way_type text, - way_oneway text, - way_ref text, - way_name_fr text, - way_name_br text, - the_geom geometry, - CONSTRAINT phase_5_pk_pkey PRIMARY KEY (pk_id), - CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'POINT'::text), - CONSTRAINT enforce_srid_the_geom CHECK (st_srid(the_geom) = 2154) -) ; -ALTER TABLE phase_5_pk OWNER TO redadeg; - - - - - - - - - diff --git a/scripts/drop_tables.sql b/scripts/drop_tables.sql deleted file mode 100644 index bb5b903..0000000 --- a/scripts/drop_tables.sql +++ /dev/null @@ -1,41 +0,0 @@ -/* - -SELECT 'DROP TABLE ' || TABLE_NAME || ' CASCADE ;' AS SQL -FROM information_schema.tables -WHERE - table_schema = 'public' - AND table_type = 'BASE TABLE' - AND TABLE_NAME NOT IN ('geography_columns','geometry_columns','raster_columns','raster_overviews','spatial_ref_sys') -ORDER BY TABLE_NAME - -*/ - - -DROP TABLE osm_communes CASCADE ; -DROP TABLE osm_roads CASCADE ; -DROP TABLE osm_roads_pgr CASCADE ; -DROP TABLE osm_roads_pgr_patch CASCADE ; -DROP TABLE osm_roads_pgr_patch_mask CASCADE ; -DROP TABLE phase_1_pk_vip CASCADE ; -DROP TABLE phase_1_pk_vip_3857 CASCADE ; -DROP TABLE phase_1_trace CASCADE ; -DROP TABLE phase_1_trace_3857 CASCADE ; -DROP TABLE phase_1_trace_4326 CASCADE ; -DROP TABLE phase_1_trace_troncons CASCADE ; -DROP TABLE phase_2_pk_secteur CASCADE ; -DROP TABLE phase_2_pk_secteur_3857 CASCADE ; -DROP TABLE phase_2_point_nettoyage CASCADE ; -DROP TABLE phase_2_point_nettoyage_3857 CASCADE ; -DROP TABLE phase_2_trace_pgr CASCADE ; -DROP TABLE phase_2_trace_secteur CASCADE ; -DROP TABLE phase_2_trace_troncons CASCADE ; -DROP TABLE phase_2_trace_trous CASCADE ; -DROP TABLE phase_3_pk_auto CASCADE ; -DROP TABLE phase_3_pk_sens_verif CASCADE ; -DROP TABLE phase_3_trace_secteurs CASCADE ; -DROP TABLE phase_3_trace_troncons CASCADE ; -DROP TABLE phase_5_pk CASCADE ; -DROP TABLE phase_5_pk_ref CASCADE ; -DROP TABLE phase_5_pk_umap CASCADE ; -DROP TABLE phase_5_pk_umap_4326 CASCADE ; -DROP TABLE secteur CASCADE ; diff --git a/scripts/export_prefecture_liste_voies.fmw b/scripts/export_prefecture_liste_voies.fmw deleted file mode 100644 index bbef3d5..0000000 --- a/scripts/export_prefecture_liste_voies.fmw +++ /dev/null @@ -1,722 +0,0 @@ -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 38 -ARCGIS_COMPATIBILITY ARCGIS_AUTO -GUI IGNORE DestDataset_CSV2_1,CSV2_OUT_DATASET_GROUP_CSV2_1,CSV2_OUT_EXTENSION_CSV2_1,CSV2_OUT_FIELDS_GROUP_CSV2_1,CSV2_OUT_DELIMITER_CSV2_1,CSV2_OUT_ENCODING_GROUP_CSV2_1,CSV2_OUT_ENCODING_CSV2_1,CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_1,CSV2_OUT_ADVANCED_GROUP_CSV2_1,CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_1,CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_1,CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_1,CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_1,CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1,CSV2_OUT_ROW_TERMINATION_CSV2_1,CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_1,CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_1 -# ============================================================================ -DEFAULT_MACRO DestDataset_CSV2 /Volumes/ker/mael/projets/osm_bzh/github/ar_redadeg/data/2021 -# ============================================================================ -GUI DIRNAME DestDataset_CSV2 Destination CSV (Comma Separated Value) Folder: -# ============================================================================ -USER_PARAMETERS eyJwYXJhbWV0ZXJzIjpbeyJhY2Nlc3NNb2RlIjoid3JpdGUiLCJkZWZhdWx0VmFsdWUiOiIvVm9sdW1lcy9rZXIvbWFlbC9wcm9qZXRzL29zbV9iemgvZ2l0aHViL2FyX3JlZGFkZWcvZGF0YS8yMDIxIiwiaXRlbXNUb1NlbGVjdCI6ImZvbGRlcnMiLCJuYW1lIjoiRGVzdERhdGFzZXRfQ1NWMiIsInByb21wdCI6IkRlc3RpbmF0aW9uIENTViAoQ29tbWEgU2VwYXJhdGVkIFZhbHVlKSBGb2xkZXI6IiwicmVxdWlyZWQiOnRydWUsInNlbGVjdE11bHRpcGxlIjpmYWxzZSwidHlwZSI6ImZpbGUiLCJ2YWxpZGF0ZUV4aXN0ZW5jZSI6ZmFsc2UsInZhbHVlVHlwZSI6InN0cmluZyJ9XX0= -# ============================================================================ -INCLUDE [ if {{$(DestDataset_CSV2)} == {}} { puts_real {Parameter 'DestDataset_CSV2' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -WRITER_TYPE MULTI_WRITER -MULTI_WRITER_DATASET_ORDER BY_ID -MULTI_WRITER_FIRST_WRITER_ID 0 -MULTI_WRITER_TYPE{0} CSV2 -MULTI_WRITER_KEYWORD{0} CSV2_1 -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "CSV2_1" -#! END_WB_HEADER -#! START_DEST_HEADER CSV2 CSV2_1 -# ===================================================================== -# The following GUI line prompts for a folder where the -# CSV files will be stored -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_CSV2_1 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER CSV2 CSV2_1 -DEFAULT_MACRO DestDataset_CSV2_1 $(DestDataset_CSV2) -GUI DIRNAME DestDataset_CSV2_1 Destination CSV (Comma Separated Value) Folder: -DEFAULT_MACRO CSV2_OUT_DATASET_GROUP_CSV2_1 -GUI OPTIONAL DISCLOSUREGROUP CSV2_OUT_DATASET_GROUP_CSV2_1 CSV2_OUT_EXTENSION_CSV2_1%CSV2_OUT_EXISTING_FILE_HANDLING Dataset -DEFAULT_MACRO CSV2_OUT_EXTENSION_CSV2_1 csv -CSV2_1_EXTENSION "$(CSV2_OUT_EXTENSION_CSV2_1)" -GUI OPTIONAL TEXT CSV2_OUT_EXTENSION_CSV2_1 Extension: -DEFAULT_MACRO CSV2_OUT_EXISTING_FILE_HANDLING_CSV2_1 Yes -CSV2_1_EXISTING_FILE_HANDLING "$(CSV2_OUT_EXISTING_FILE_HANDLING_CSV2_1)" -DEFAULT_MACRO CSV2_OUT_FIELDS_GROUP_CSV2_1 -GUI OPTIONAL DISCLOSUREGROUP CSV2_OUT_FIELDS_GROUP_CSV2_1 CSV2_OUT_DELIMITER_CSV2_1%CSV2_OUT_WRITE_FIELD_NAMES Fields -DEFAULT_MACRO CSV2_OUT_DELIMITER_CSV2_1 -CSV2_1_DELIMITER "$(CSV2_OUT_DELIMITER_CSV2_1)" -GUI STRING_OR_CHOICE_ENCODED CSV2_OUT_DELIMITER_CSV2_1 ,%;%|%space%tab Delimiter Character: -DEFAULT_MACRO CSV2_OUT_WRITE_FIELD_NAMES_CSV2_1 firstrow -CSV2_1_WRITE_FIELD_NAMES "$(CSV2_OUT_WRITE_FIELD_NAMES_CSV2_1)" -DEFAULT_MACRO CSV2_OUT_ENCODING_GROUP_CSV2_1 -GUI OPTIONAL DISCLOSUREGROUP CSV2_OUT_ENCODING_GROUP_CSV2_1 CSV2_OUT_ENCODING_CSV2_1%CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_1 Encoding -DEFAULT_MACRO CSV2_OUT_ENCODING_CSV2_1 UTF-8 -CSV2_1_ENCODING "$(CSV2_OUT_ENCODING_CSV2_1)" -GUI STRING_OR_ENCODING CSV2_OUT_ENCODING_CSV2_1 fme-system%* Character Encoding: -DEFAULT_MACRO CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_1 Yes -CSV2_1_WRITE_BOM_FOR_UNICODE "$(CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_1)" -GUI CHOICE CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_1 Yes%No Write Byte Order Mark for Unicode: -DEFAULT_MACRO CSV2_OUT_ADVANCED_GROUP_CSV2_1 -GUI OPTIONAL DISCLOSUREGROUP CSV2_OUT_ADVANCED_GROUP_CSV2_1 FME_DISCLOSURE_CLOSED%CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_1%CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_1%CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_1%CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_1%CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1%CSV2_OUT_ROW_TERMINATION_CSV2_1%CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_1 Advanced -DEFAULT_MACRO CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_1 if_needed -CSV2_1_QUALIFY_FIELD_NAMES "$(CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_1)" -GUI LOOKUP_CHOICE CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_1 Yes,yes%No,no%IfNeeded,if_needed Qualify Field Names: -DEFAULT_MACRO CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_1 if_needed -CSV2_1_QUALIFY_FIELD_VALUES "$(CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_1)" -GUI ACTIVECHOICE_LOOKUP CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_1 Yes,yes,CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_1%No,no%IfNeeded,if_needed,CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_1 Qualify Field Values: -DEFAULT_MACRO CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_1 -CSV2_1_UNQUALIFIED_FIELD_VALUE_HANDLING "$(CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_1)" -GUI LOOKUP_CHOICE CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_1 RemoveUnsafeCharacters,remove_unsafe%PreserveUnsafeCharacters,preserve_unsafe Unqualified Field Value Handling: -DEFAULT_MACRO CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_1 -CSV2_1_FIELD_QUALIFIER_CHARACTER "$(CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_1)" -GUI STRING_ENCODED CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_1 Field Qualifier Character: -DEFAULT_MACRO CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1 -CSV2_1_FIELD_QUALIFIER_ESCAPE_CHARACTER "$(CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1)" -GUI STRING_ENCODED CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1 Field Qualifier Escape Character: -DEFAULT_MACRO CSV2_OUT_ROW_TERMINATION_CSV2_1 System -CSV2_1_ROW_TERMINATION "$(CSV2_OUT_ROW_TERMINATION_CSV2_1)" -GUI CHOICE CSV2_OUT_ROW_TERMINATION_CSV2_1 System%Windows%Unix%Macintosh Row Termination: -DEFAULT_MACRO CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_1 NO -CSV2_1_WRITE_SCHEMA_FILE "$(CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_1)" -GUI ACTIVEDISCLOSUREGROUP CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_1 FME_DISCLOSURE_CLOSED%CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_1 Write Schema Configuration File -DEFAULT_MACRO CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_1 -CSV2_1_EXISTING_SCHEMA_FILE_HANDLING "$(CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_1)" -GUI CHOICE CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_1 Overwrite%Prepend Existing Schema File Handling: -DEFAULT_MACRO CSV2_OUT_COORDINATE_SYSTEM_GRANULARITY_CSV2_1 FEATURE_TYPE -CSV2_1_COORDINATE_SYSTEM_GRANULARITY "$(CSV2_OUT_COORDINATE_SYSTEM_GRANULARITY_CSV2_1)" -# ============================================================================ -CSV2_1_GENERATE_FME_BUILD_NUM 21306 -CSV2_1_DATASET "$(DestDataset_CSV2_1)" -#! END_DEST_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)export_prefecture_liste_voies.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -FME_NAMES_ENCODING UTF-8 -DEFAULT_MACRO DATASET_KEYWORD_CSV2_1 CSV2_1 -# ------------------------------------------------------------------------- - -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME export_prefecture_liste_voies -MACRO FME_VIEWER_APP fmedatainspector -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -MACRO SQLCreator_DIRECTIVES NAMED_CONNECTION bed110redadeg_2021redadeg -FACTORY_DEF {*} CreationFactory FACTORY_NAME { SQLCreator_Creator } OUTPUT { FEATURE_TYPE _____CREATED______ } -FACTORY_DEF {*} QueryFactory FACTORY_NAME { SQLCreator } INPUT FEATURE_TYPE _____CREATED______ QUERY_SQL { SELECTleftcom.insee2asdptcom.inseecom.nompk.pk_idpk.way_refasvoie_refCASEWHENway_name_frISNULLTHENvoienondnommeELSEway_name_frENDasvoie_nomFROMphase_3_pk_autopkosm_communescomWHEREST_Intersectspk.the_geomcom.the_geomORDERBYpk_id } COMBINE_ATTRIBUTES RESULT_ONLY COMBINE_GEOMETRY RESULT_ONLY READER_TYPE { POSTGRES } READER_DATASET { "bed110redadeg_2021redadeg" } READER_PARAMS { $(SQLCreator_DIRECTIVES) } QUERYFCT_PROPAGATE_IDS_ON_SQL_EXECUTE YES CONTINUE_ON_READER_ERROR YES OUTPUT { RESULT FEATURE_TYPE SQLCreator_RESULT @SupplyAttributes(fme_feature_type,SQLCreator) } OUTPUT { READER_ERROR FEATURE_TYPE SQLCreator_ } -FACTORY_DEF * BranchingFactory FACTORY_NAME "SQLCreator_RESULT Brancher -1 5" INPUT FEATURE_TYPE SQLCreator_RESULT TARGET_FACTORY "$(WB_CURRENT_CONTEXT)_CREATOR_BRANCH_TARGET" MAXIMUM_COUNT None OUTPUT PASSED FEATURE_TYPE * -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME SQLCreator_ INPUT FEATURE_TYPE SQLCreator_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, SQLCreatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "$(WB_CURRENT_CONTEXT)_CREATOR_BRANCH_TARGET" INPUT FEATURE_TYPE * OUTPUT FEATURE_TYPE * -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC SQLCreator_RESULT TO CSV2 __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__ar_redadeg_prefecture GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- -CSV2_1_DEF ar_redadeg_prefecture csv_existing_file_handling Yes csv_write_field_names firstrow dpt string insee string nom string pk_id string voie_ref string voie_nom string diff --git a/scripts/load_communes_osm_br.sh b/scripts/load_communes_osm_br.sh deleted file mode 100755 index b25ece5..0000000 --- a/scripts/load_communes_osm_br.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -set -e -set -u - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - -# ce script récupère une couche des communes de France et la charge dans la base de données - -cd data - -# récupérer la couche communales OSM -# https://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap/ -wget http://tile.openstreetmap.bzh/data/br/osm_br_municipalities.geojson -#wget pour voir la progression - -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" osm_br_municipalities.geojson -nln osm_communes_4326 -lco GEOMETRY_NAME=the_geom -explodecollections -overwrite - - -# passer la couche de WGS84 en Lambert93 -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "TRUNCATE TABLE osm_communes ;" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c " -INSERT INTO osm_communes - SELECT - ogc_fid, - insee, - nom, - wikipedia, - surf_ha, - ST_Transform(ST_SetSRID(the_geom,4326),2154) AS the_geom - FROM osm_communes_4326 - WHERE left(insee,2) IN ('22','29','35','44','56') - ORDER BY insee ASC ;" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "VACUUM FULL osm_communes;" - - diff --git a/scripts/load_communes_osm_fr.sh b/scripts/load_communes_osm_fr.sh deleted file mode 100755 index 54540f3..0000000 --- a/scripts/load_communes_osm_fr.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -set -e -set -u - -millesime=2022 - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - -# ce script récupère une couche des communes de France et la charge dans la base de données - -cd ../data/$millesime/ - -# récupérer la couche communales OSM -# https://www.data.gouv.fr/fr/datasets/decoupage-administratif-communal-francais-issu-d-openstreetmap/ -#curl -sS http://osm13.openstreetmap.fr/~cquest/openfla/export/communes-20210101-shp.zip > communes-20210101-shp.zip -wget http://osm13.openstreetmap.fr/~cquest/openfla/export/communes-20210101-shp.zip - -unzip -o communes-20210101-shp.zip - -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" communes-20210101.shp -nln osm_communes_4326 -lco GEOMETRY_NAME=the_geom -explodecollections -overwrite - - -# passer la couche de WGS84 en Lambert93 -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "TRUNCATE TABLE osm_communes ;" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c " -INSERT INTO osm_communes - SELECT - ogc_fid, - insee, - nom, - wikipedia, - surf_ha, - ST_Transform(ST_SetSRID(the_geom,4326),2154) AS the_geom - FROM osm_communes_4326 - WHERE left(insee,2) IN ('22','29','35','44','56') - ORDER BY insee ASC ;" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "VACUUM FULL osm_communes;" - - diff --git a/scripts/load_osm_municipalities.fmw b/scripts/load_osm_municipalities.fmw deleted file mode 100644 index bf49774..0000000 --- a/scripts/load_osm_municipalities.fmw +++ /dev/null @@ -1,2310 +0,0 @@ -#! -#! redadeg" -# --SourceDataset_POSTGIS_3 "breizhpolenovoredadeg" -# --DestDataset_POSTGIS "breizhpolenovoredadeg" -# -#! ATTR_TYPE_ENCODING="SDF" -#! BEGIN_PYTHON="" -#! BEGIN_TCL="" -#! CATEGORY="" -#! DESCRIPTION="" -#! DESTINATION="NONE" -#! DESTINATION_ROUTING_FILE="" -#! DOC_EXTENTS="3770.01 2162.51" -#! DOC_TOP_LEFT="-17.0008 -2223.51" -#! END_PYTHON="" -#! END_TCL="" -#! EXPLICIT_BOOKMARK_ORDER="false" -#! FME_BUILD_NUM="18592" -#! FME_DOCUMENT_GUID="87f0b89a-cf35-4310-89da-a0e5e277513a" -#! FME_DOCUMENT_PRIORGUID="5468dab7-2274-445b-b04d-4c151b68e682" -#! FME_GEOMETRY_HANDLING="Enhanced" -#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" -#! FME_REPROJECTION_ENGINE="FME" -#! FME_SERVER_SERVICES="" -#! FME_STROKE_MAX_DEVIATION="0" -#! HISTORY="" -#! IGNORE_READER_FAILURE="No" -#! LAST_SAVE_BUILD="FME(R) 2018.1.2.1 (20190319 - Build 18592 - macosx)" -#! LAST_SAVE_DATE="2020-02-15T15:36:55" -#! LOG_FILE="" -#! LOG_MAX_RECORDED_FEATURES="200" -#! MARKDOWN_DESCRIPTION="" -#! MARKDOWN_USAGE="" -#! MAX_LOG_FEATURES="200" -#! MULTI_WRITER_DATASET_ORDER="BY_ID" -#! PASSWORD="" -#! PYTHON_COMPATIBILITY="27" -#! REDIRECT_TERMINATORS="NONE" -#! SHOW_ANNOTATIONS="true" -#! SHOW_INFO_NODES="true" -#! SOURCE="NONE" -#! SOURCE_ROUTING_FILE="" -#! TERMINATE_REJECTED="YES" -#! TITLE="" -#! USAGE="" -#! USE_MARKDOWN="" -#! VIEW_POSITION="1338.01 99.001" -#! WARN_INVALID_XFORM_PARAM="Yes" -#! WORKSPACE_VERSION="1" -#! ZOOM_SCALE="100" -#! > -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 27 -GUI IGNORE SourceDataset_GEOJSON_1,GEOJSON_IN_USE_SEARCH_ENVELOPE_GEOJSON_1,GEOJSON_IN_SEARCH_ENVELOPE_MINX_GEOJSON_1,GEOJSON_IN_SEARCH_ENVELOPE_MINY_GEOJSON_1,GEOJSON_IN_SEARCH_ENVELOPE_MAXX_GEOJSON_1,GEOJSON_IN_SEARCH_ENVELOPE_MAXY_GEOJSON_1,GEOJSON_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GEOJSON_1,GEOJSON_IN_CLIP_TO_ENVELOPE_GEOJSON_1,GEOJSON_IN_NETWORK_AUTHENTICATION_GEOJSON_1,SourceDataset_POSTGIS_1,POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_METHOD_POSTGIS_1,POSTGIS_IN_ADVANCED_POSTGIS_1,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1,POSTGIS_IN_BEGIN_SQL_POSTGIS_1,POSTGIS_IN_END_SQL_POSTGIS_1,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1,SourceDataset_POSTGIS_2,POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_2,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_2,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_2,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_2,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_2,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_2,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_2,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_2,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_2,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_2,POSTGIS_IN_SEARCH_METHOD_POSTGIS_2,POSTGIS_IN_ADVANCED_POSTGIS_2,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_2,POSTGIS_IN_BEGIN_SQL_POSTGIS_2,POSTGIS_IN_END_SQL_POSTGIS_2,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_2,DestDataset_POSTGIS_3,POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_3,POSTGIS_OUT_ADVANCED_POSTGIS_3,POSTGIS_OUT_BULK_COPY_POSTGIS_3,POSTGIS_OUT_START_TRANSACTION_POSTGIS_3,POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_3,POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_3,POSTGIS_OUT_BEGIN_SQL_POSTGIS_3,POSTGIS_OUT_END_SQL_POSTGIS_3 -DEFAULT_MACRO SourceDataset_GEOJSON http://tile.openstreetmap.bzh/data/br/osm_br_municipalities.geojson -GUI FILE_OR_URL SourceDataset_GEOJSON GeoJSON_Documents(*.json;*.geojson)|*.json;*.geojson|All_Files|* Source GeoJSON File or URL: -DEFAULT_MACRO SourceDataset_POSTGIS breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO SourceDataset_POSTGIS_3 breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_3 FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO DestDataset_POSTGIS breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -INCLUDE [ if {{$(SourceDataset_GEOJSON)} == {}} { puts_real {Parameter 'SourceDataset_GEOJSON' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGIS)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGIS_3)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS_3' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_POSTGIS)} == {}} { puts_real {Parameter 'DestDataset_POSTGIS' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -MULTI_READER_TYPE{0} GEOJSON -MULTI_READER_KEYWORD{0} GEOJSON_1 -MULTI_READER_GEN_DIRECTIVES{0} EXPOSE_ATTRS_GROUP,,USE_SEARCH_ENVELOPE,NO,CLIP_TO_ENVELOPE,NO,FLATTEN_MODE,ALL_LEVELS,SEARCH_ENVELOPE_MAXY,0,NETWORK_AUTHENTICATION,,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,GEOJSON_EXPOSE_FORMAT_ATTRS,,USE_BASENAME_AS_DEFAULT_FEATURE_TYPE,Yes,_MERGE_SCHEMAS,YES,SEARCH_ENVELOPE_MINX,0,SEARCH_ENVELOPE_MINY,0,SEARCH_ENVELOPE_MAXX,0 -MULTI_READER_TYPE{1} POSTGIS -MULTI_READER_KEYWORD{1} POSTGIS_1 -MULTI_READER_GEN_DIRECTIVES{1} USE_TRUE_POSTGIS_TYPES,yes,CLIP_TO_ENVELOPE,NO,SEARCH_ENVELOPE_MAXY,0,POSTGIS_EXPOSE_FORMAT_ATTRS,,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,ADVANCED,,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,USE_SEARCH_ENVELOPE,NO,FEATURES_PER_FETCH,10000,DISABLE_COLLECTION_SPLITTING,yes,SEARCH_ENVELOPE_MINX,0,SEARCH_ENVELOPE_MINY,0,EXPOSE_ATTRS_GROUP,,SEARCH_METHOD,MBR_OVERLAPS,NAMED_CONNECTION,breizhpolenovoatredadeg,SEARCH_ENVELOPE_MAXX,0,READ_TIME_WITH_TIMEZONE,Yes,TABLELIST,public.osm_communes,END_SQL,,WHERE_CLAUSE,,_MERGE_SCHEMAS,YES,SCHEMAS_FOR_TABLE_LISTING,public,BEGIN_SQL, -MULTI_READER_TYPE{2} NULL -MULTI_READER_FORMAT{2} POSTGIS -MULTI_READER_KEYWORD{2} POSTGIS_2 -MULTI_READER_GEN_DIRECTIVES{2} USE_TRUE_POSTGIS_TYPES,yes,CLIP_TO_ENVELOPE,NO,SEARCH_ENVELOPE_MAXY,0,POSTGIS_EXPOSE_FORMAT_ATTRS,,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,ADVANCED,,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,USE_SEARCH_ENVELOPE,NO,FEATURES_PER_FETCH,10000,DISABLE_COLLECTION_SPLITTING,yes,SEARCH_ENVELOPE_MINX,0,SEARCH_ENVELOPE_MINY,0,EXPOSE_ATTRS_GROUP,,SEARCH_METHOD,MBR_OVERLAPS,NAMED_CONNECTION,breizhpolenovoatredadeg,SEARCH_ENVELOPE_MAXX,0,READ_TIME_WITH_TIMEZONE,Yes,TABLELIST,public.osm_municipalities,END_SQL,,WHERE_CLAUSE,,_MERGE_SCHEMAS,YES,SCHEMAS_FOR_TABLE_LISTING,public,BEGIN_SQL, -WRITER_TYPE MULTI_WRITER -MULTI_WRITER_DATASET_ORDER BY_ID -MULTI_WRITER_FIRST_WRITER_ID 0 -MULTI_WRITER_TYPE{0} POSTGIS -MULTI_WRITER_KEYWORD{0} POSTGIS_3 -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER GEOJSON GEOJSON_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_GEOJSON_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER GEOJSON GEOJSON_1 -DEFAULT_MACRO SourceDataset_GEOJSON_1 $(SourceDataset_GEOJSON) -GUI FILE_OR_URL SourceDataset_GEOJSON_1 GeoJSON_Documents(*.json;*.geojson)|*.json;*.geojson|All_Files|* Source GeoJSON File or URL: -DEFAULT_MACRO GEOJSON_IN_FLATTEN_MODE_GEOJSON_1 ALL_LEVELS -GEOJSON_1_FLATTEN_MODE "$(GEOJSON_IN_FLATTEN_MODE_GEOJSON_1)" -DEFAULT_MACRO GEOJSON_IN_EXPOSE_ATTRS_GROUP_GEOJSON_1 -GEOJSON_1_EXPOSE_ATTRS_GROUP "$(GEOJSON_IN_EXPOSE_ATTRS_GROUP_GEOJSON_1)" -DEFAULT_MACRO GEOJSON_IN_USE_BASENAME_AS_DEFAULT_FEATURE_TYPE_GEOJSON_1 Yes -GEOJSON_1_USE_BASENAME_AS_DEFAULT_FEATURE_TYPE "$(GEOJSON_IN_USE_BASENAME_AS_DEFAULT_FEATURE_TYPE_GEOJSON_1)" -# Include this file in source setting section to add external search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO GEOJSON_IN_USE_SEARCH_ENVELOPE_GEOJSON_1 NO -GEOJSON_1_USE_SEARCH_ENVELOPE "$(GEOJSON_IN_USE_SEARCH_ENVELOPE_GEOJSON_1)" -GUI ACTIVEDISCLOSUREGROUP GEOJSON_IN_USE_SEARCH_ENVELOPE_GEOJSON_1 GEOJSON_IN_SEARCH_ENVELOPE_MINX_GEOJSON_1%GEOJSON_IN_SEARCH_ENVELOPE_MINY_GEOJSON_1%GEOJSON_IN_SEARCH_ENVELOPE_MAXX_GEOJSON_1%GEOJSON_IN_SEARCH_ENVELOPE_MAXY_GEOJSON_1%GEOJSON_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GEOJSON_1%GEOJSON_IN_CLIP_TO_ENVELOPE_GEOJSON_1%GEOJSON_IN_SEARCH_METHOD%GEOJSON_IN_SEARCH_METHOD_FILTER%GEOJSON_IN_SEARCH_ORDER%GEOJSON_IN_SEARCH_FEATURE%GEOJSON_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP GEOJSON_IN_SEARCH_ENVELOPE_MINX_GEOJSON_1 ,0 -DEFAULT_MACRO GEOJSON_IN_SEARCH_ENVELOPE_MINX_GEOJSON_1 0 -GEOJSON_1_SEARCH_ENVELOPE "$(GEOJSON_IN_SEARCH_ENVELOPE_MINX_GEOJSON_1)" -GUI OPTIONAL FLOAT GEOJSON_IN_SEARCH_ENVELOPE_MINX_GEOJSON_1 Minimum X: -# =========================================================================== -GUI LOOKUP GEOJSON_IN_SEARCH_ENVELOPE_MINY_GEOJSON_1 ,0 -DEFAULT_MACRO GEOJSON_IN_SEARCH_ENVELOPE_MINY_GEOJSON_1 0 -GEOJSON_1_SEARCH_ENVELOPE "$(GEOJSON_IN_SEARCH_ENVELOPE_MINY_GEOJSON_1)" -GUI OPTIONAL FLOAT GEOJSON_IN_SEARCH_ENVELOPE_MINY_GEOJSON_1 Minimum Y: -# =========================================================================== -GUI LOOKUP GEOJSON_IN_SEARCH_ENVELOPE_MAXX_GEOJSON_1 ,0 -DEFAULT_MACRO GEOJSON_IN_SEARCH_ENVELOPE_MAXX_GEOJSON_1 0 -GEOJSON_1_SEARCH_ENVELOPE "$(GEOJSON_IN_SEARCH_ENVELOPE_MAXX_GEOJSON_1)" -GUI OPTIONAL FLOAT GEOJSON_IN_SEARCH_ENVELOPE_MAXX_GEOJSON_1 Maximum X: -# =========================================================================== -GUI LOOKUP GEOJSON_IN_SEARCH_ENVELOPE_MAXY_GEOJSON_1 ,0 -DEFAULT_MACRO GEOJSON_IN_SEARCH_ENVELOPE_MAXY_GEOJSON_1 0 -GEOJSON_1_SEARCH_ENVELOPE "$(GEOJSON_IN_SEARCH_ENVELOPE_MAXY_GEOJSON_1)" -GUI OPTIONAL FLOAT GEOJSON_IN_SEARCH_ENVELOPE_MAXY_GEOJSON_1 Maximum Y: -# =========================================================================== -GUI LOOKUP GEOJSON_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GEOJSON_1 , -DEFAULT_MACRO GEOJSON_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GEOJSON_1 -GEOJSON_1_SEARCH_ENVELOPE "$(GEOJSON_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GEOJSON_1)" -GUI OPTIONAL COORDSYS GEOJSON_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GEOJSON_1 Search Envelope Coordinate System: -# =========================================================================== -# BUG18999: We now have a soft clip to fall back on like native spatial index -# thus we are reintroducing the clip to envelop as an option for users. -# Defualt to soft clip as per the existing database readers we are emulating -GUI LOOKUP GEOJSON_IN_CLIP_TO_ENVELOPE_GEOJSON_1 ,NO -DEFAULT_MACRO GEOJSON_IN_CLIP_TO_ENVELOPE_GEOJSON_1 NO -GEOJSON_1_CLIP_TO_ENVELOPE "$(GEOJSON_IN_CLIP_TO_ENVELOPE_GEOJSON_1)" -GUI OPTIONAL CHECKBOX GEOJSON_IN_CLIP_TO_ENVELOPE_GEOJSON_1 YES%NO Clip to Search Envelope -# =========================================================================== -DEFAULT_MACRO GEOJSON_IN_NETWORK_AUTHENTICATION_GEOJSON_1 -GEOJSON_1_NETWORK_AUTHENTICATION "$(GEOJSON_IN_NETWORK_AUTHENTICATION_GEOJSON_1)" -GUI OPTIONAL AUTHENTICATOR GEOJSON_IN_NETWORK_AUTHENTICATION_GEOJSON_1 CONTAINER%GROUP%CONTAINER_TITLE%"Network Authentication"%PROMPT_TYPE%NETWORK Network Authentication -# ============================================================================ -DEFAULT_MACRO GEOJSON_IN_ATTRIBUTE_READING_GEOJSON_1 ALL -GEOJSON_1_ATTRIBUTE_READING "$(GEOJSON_IN_ATTRIBUTE_READING_GEOJSON_1)" -# ============================================================================ -GEOJSON_1_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_1_DATASET "$(SourceDataset_GEOJSON_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FMT:POSTGIS Connection: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1 Yes -POSTGIS_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1 Yes -POSTGIS_1_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1 yes -POSTGIS_1_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1 yes -POSTGIS_1_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 -POSTGIS_1_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1 -POSTGIS_1_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBR_OVERLAPS -POSTGIS_1_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_1)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_1 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1%POSTGIS_IN_BEGIN_SQL_POSTGIS_1%POSTGIS_IN_END_SQL_POSTGIS_1 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 10000 -POSTGIS_1_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_1 -POSTGIS_1_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_1 -POSTGIS_1_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1 DEFLINE_ATTRS -POSTGIS_1_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1)" -# ============================================================================ -POSTGIS_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 public -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Schemas for Table Listing: -POSTGIS_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1) -POSTGIS_1_DATASET "$(SourceDataset_POSTGIS_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_2" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_2 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_2 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_2 -DEFAULT_MACRO SourceDataset_POSTGIS_2 $(SourceDataset_POSTGIS_3) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_2 FMT:POSTGIS Connection: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_2 Yes -POSTGIS_2_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_2 Yes -POSTGIS_2_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_2 yes -POSTGIS_2_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_2 yes -POSTGIS_2_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_2 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_2 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_2 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_2 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_2 -POSTGIS_2_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_2 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_2 -POSTGIS_2_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_2)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_2 NO -POSTGIS_2_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_2)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_2 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_2%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_2%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_2%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_2%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_2%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_2%POSTGIS_IN_SEARCH_METHOD_POSTGIS_2%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_2 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_2 0 -POSTGIS_2_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_2)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_2 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_2 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_2 0 -POSTGIS_2_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_2)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_2 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_2 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_2 0 -POSTGIS_2_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_2)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_2 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_2 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_2 0 -POSTGIS_2_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_2)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_2 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_2 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_2 -POSTGIS_2_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_2)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_2 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_2 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_2 NO -POSTGIS_2_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_2)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_2 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_2 MBR_OVERLAPS -POSTGIS_2_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_2)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_2 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_2 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_2 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_2%POSTGIS_IN_BEGIN_SQL_POSTGIS_2%POSTGIS_IN_END_SQL_POSTGIS_2 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_2 10000 -POSTGIS_2_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_2)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_2 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_2 -POSTGIS_2_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_2 -POSTGIS_2_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_2 DEFLINE_ATTRS -POSTGIS_2_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_2)" -# ============================================================================ -POSTGIS_2_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_2 public -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_2 Schemas for Table Listing: -POSTGIS_2_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_2) -POSTGIS_2_DATASET "$(SourceDataset_POSTGIS_2)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_3" -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_3 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_POSTGIS_3 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_3 -DEFAULT_MACRO DestDataset_POSTGIS_3 $(DestDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS_3 FMT:POSTGIS Connection: -POSTGIS_3_PLUGIN_MAX_CHANNELS 1 -DEFAULT_MACRO POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_3 Yes -POSTGIS_3_STRICT_TEMPORAL_TYPE_HANDLING "$(POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_3)" -DEFAULT_MACRO POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_3 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_3 POSTGIS_OUT_NAMED_CONNECTION Database Connection -# ============================================================================ -# Write geometry (planar) or geography (geodetic) column -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_3 geometry -POSTGIS_3_SPATIAL_COLUMN_TYPE "$(POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_3)" -# ============================================================================ -# Default spatial column name -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_3 geom -POSTGIS_3_SPATIAL_COLUMN_NAME "$(POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_3)" -DEFAULT_MACRO POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_3 yes -POSTGIS_3_GENERIC_GEOMETRY "$(POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_3)" -DEFAULT_MACRO POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_3 FEATURE_TYPE -POSTGIS_3_COORDINATE_SYSTEM_GRANULARITY "$(POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_3)" -DEFAULT_MACRO POSTGIS_OUT_ADVANCED_POSTGIS_3 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_ADVANCED_POSTGIS_3 POSTGIS_OUT_BULK_COPY_POSTGIS_3%POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_3%POSTGIS_OUT_START_TRANSACTION_POSTGIS_3%POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_3%POSTGIS_OUT_BEGIN_SQL_POSTGIS_3%POSTGIS_OUT_END_SQL_POSTGIS_3 Advanced -DEFAULT_MACRO POSTGIS_OUT_BULK_COPY_POSTGIS_3 YES -POSTGIS_3_BULK_COPY "$(POSTGIS_OUT_BULK_COPY_POSTGIS_3)" -GUI CHOICE POSTGIS_OUT_BULK_COPY_POSTGIS_3 YES%NO Bulk Insert -DEFAULT_MACRO POSTGIS_OUT_START_TRANSACTION_POSTGIS_3 0 -POSTGIS_3_START_TRANSACTION "$(POSTGIS_OUT_START_TRANSACTION_POSTGIS_3)" -GUI TEXT POSTGIS_OUT_START_TRANSACTION_POSTGIS_3 Starting Feature: -DEFAULT_MACRO POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_3 1000 -POSTGIS_3_TRANSACTION_INTERVAL "$(POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_3)" -GUI TEXT POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_3 Features Per Transaction -DEFAULT_MACRO POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_3 NO -POSTGIS_3_INSERT_TEXT_GEOMETRY "$(POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_3)" -GUI CHOICE POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_3 YES%NO Insert WKT -DEFAULT_MACRO POSTGIS_OUT_BEGIN_SQL_POSTGIS_3 -POSTGIS_3_BEGIN_SQL "$(POSTGIS_OUT_BEGIN_SQL_POSTGIS_3)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_BEGIN_SQL_POSTGIS_3 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Write -DEFAULT_MACRO POSTGIS_OUT_END_SQL_POSTGIS_3 -POSTGIS_3_END_SQL "$(POSTGIS_OUT_END_SQL_POSTGIS_3)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_END_SQL_POSTGIS_3 MODE,SQL;FORMAT,POSTGIS SQL To Run After Write -# ============================================================================ -POSTGIS_3_GENERATE_FME_BUILD_NUM 18592 -POSTGIS_3_DATASET "$(DestDataset_POSTGIS_3)" -#! END_DEST_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)load_osm_municipalities.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_1 GEOJSON_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_1 POSTGIS_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_2 POSTGIS_2 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_3 POSTGIS_3 -# ------------------------------------------------------------------------- - -GEOJSON_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_2_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -GEOJSON_1_COORDINATE_SYSTEM EPSG:4326 -POSTGIS_1_COORDINATE_SYSTEM EPSG:2154 -POSTGIS_2_COORDINATE_SYSTEM EPSG:4326 -POSTGIS_3_COORDINATE_SYSTEM EPSG:2154 -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME load_osm_municipalities -MACRO FME_VIEWER_APP fmedatainspector -# ------------------------------------------------------------------------- - -INCLUDE [ if {[info exists env(FME_TEMP)] && [file isdirectory $env(FME_TEMP)]} {set gVisualizerTemp $env(FME_TEMP)} elseif {[info exists env(TEMP)] && [file isdirectory $env(TEMP)]} {set gVisualizerTemp $env(TEMP)} elseif { $tcl_platform(platform) == "unix" } {set gVisualizerTemp "/tmp"} else {set gVisualizerTemp c:}; regsub -all {[ ,&]} {$(WORKSPACE_NAME)} {_} wsname; set gVisualizerTemp $gVisualizerTemp/${wsname}_[clock format [clock seconds] -format %H%M%S]; puts "MACRO WORKSPACE_TEMP_DIR $gVisualizerTemp"; -MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/inspector.ffs -MACRO VISUALIZER_SCHEMA_FILE $(WORKSPACE_TEMP_DIR)/inspector.fsc -MACRO VISUALIZER_CREATE_SPATIAL_INDEX YES -# ------------------------------------------------------------------------- -GEOJSON_1_DEF osm_br_municipalities fid string osm_id int type string admin_level int name string name_br string source_name_br string admincode string postcode string wikidata string x float y float -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE GEOJSON GEOJSON_1::osm_br_municipalities multi_reader_keyword,$(DATASET_KEYWORD_GEOJSON_1) TO FME_GENERIC ::osm_br_municipalities ALIAS_GEOMETRY ROUTE POSTGIS POSTGIS_1::public.osm_communes multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.osm_communes ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * -GEOJSON_1_MERGE_DEF GEOJSON_1::osm_br_municipalities EXACT osm_br_municipalities -POSTGIS_1_MERGE_DEF POSTGIS_1::public.osm_communes EXACT public.osm_communes DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,gid,serialPrimaryKey,insee,varchar80,nom,varchar80,wikipedia,varchar80,surf_ha,numeric1000500 -POSTGIS_2_MERGE_DEF POSTGIS_2::public.osm_municipalities EXACT public.osm_municipalities -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.osm_municipalities (POSTGIS_2) Splitter" INPUT FEATURE_TYPE public.osm_municipalities -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "osm_br_municipalities (GEOJSON_1) Splitter" INPUT FEATURE_TYPE osm_br_municipalities OUTPUT FEATURE_TYPE osm_br_municipalities_GEOJSON_1_0_JeGDo5IkWAk= OUTPUT FEATURE_TYPE osm_br_municipalities_GEOJSON_1_1_sJ4ZSCrUtiU= -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.osm_communes (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.osm_communes OUTPUT FEATURE_TYPE public.osm_communes_POSTGIS_1_0_tNcmooN2Yyg= OUTPUT FEATURE_TYPE public.osm_communes_POSTGIS_1_1_p/0m0MVLUpA= -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {public.osm_communes} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME public.osm_communes_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE public.osm_communes_POSTGIS_1_1_p/0m0MVLUpA= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { public.osm_communes } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME public.osm_communes_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA gid,varchar255,insee,varchar255,nom,varchar255,wikipedia,varchar255,surf_ha,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {osm_br_municipalities} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME osm_br_municipalities_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE osm_br_municipalities_GEOJSON_1_1_sJ4ZSCrUtiU= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { osm_br_municipalities } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME osm_br_municipalities_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA fid,varchar255,osm_id,varchar255,type,varchar255,admin_level,varchar255,name,varchar255,name_br,varchar255,source_name_br,varchar255,postcode,varchar255,wikidata,varchar255,x,varchar255,y,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -# Wipe out the source setting if it was untouched from the default setting -DEFAULT_MACRO Reprojector_SOURCE "EPSG:4326" -INCLUDE [if { {EPSG:4326} == {Read from feature} } { puts {MACRO Reprojector_SOURCE} } ] -FACTORY_DEF * TeeFactory FACTORY_NAME Reprojector INPUT FEATURE_TYPE osm_br_municipalities_GEOJSON_1_0_JeGDo5IkWAk= OUTPUT FEATURE_TYPE Reprojector_REPROJECTED @Reproject($(Reprojector_SOURCE),"EPSG:2154",NearestNeighbor,PreserveCells,Reprojector,"COORD_SYS_WARNING",RASTER_TOLERANCE,0.0) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} OverlayFactory FACTORY_NAME PointOnAreaOverlayer INPUT POINT FEATURE_TYPE Reprojector_REPROJECTED INPUT POLYGON FEATURE_TYPE public.osm_communes_POSTGIS_1_0_tNcmooN2Yyg= OVERLAP_COUNT_ATTRIBUTE "_overlaps" DEAGGREGATE_INPUT Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" LIST_NAME "" LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE CANDIDATE_LIST_NAME "" CANDIDATE_LIST_ATTRS_TO_INCLUDE { } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE MODE COMPLETE OVERLAY_TYPE POINT_ON_AREA POLYS_FIRST "NO" REJECT_INVALID_GEOM YES OUTPUT POLYGON FEATURE_TYPE PointOnAreaOverlayer_AREA OUTPUT ILLEGAL_GEOM FEATURE_TYPE PointOnAreaOverlayer_ -FACTORY_DEF * TeeFactory FACTORY_NAME "PointOnAreaOverlayer AREA Splitter" INPUT FEATURE_TYPE PointOnAreaOverlayer_AREA OUTPUT FEATURE_TYPE PointOnAreaOverlayer_AREA_0_fZ27ZbHrf4w= OUTPUT FEATURE_TYPE PointOnAreaOverlayer_AREA_1_uUi26aghoD0= -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME PointOnAreaOverlayer_ INPUT FEATURE_TYPE PointOnAreaOverlayer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, PointOnAreaOverlayeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeCopier INPUT FEATURE_TYPE PointOnAreaOverlayer_AREA_1_uUi26aghoD0= ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "name" "name_fr" "COPY" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeCopier_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeRenamer INPUT FEATURE_TYPE AttributeCopier_OUTPUT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "insee" "admincode" "RENAME_SET_DEFAULT" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_OUTPUT -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {PointOnAreaOverlayer_Area} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME PointOnAreaOverlayer_Area_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE PointOnAreaOverlayer_AREA_0_fZ27ZbHrf4w= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { PointOnAreaOverlayer_Area } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME PointOnAreaOverlayer_Area_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA fid,varchar255,osm_id,varchar255,type,varchar255,admin_level,varchar255,name,varchar255,name_br,varchar255,source_name_br,varchar255,postcode,varchar255,wikidata,varchar255,x,varchar255,y,varchar255,gid,varchar255,insee,varchar255,nom,varchar255,wikipedia,varchar255,surf_ha,varchar255,_overlaps,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC AttributeRenamer_OUTPUT TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__public.osm_municipalities COORDINATE_SYSTEM EPSG:2154 GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- - -FACTORY_DEF * CreationFactory FACTORY_NAME VisualizerProcessor CREATE_AT_END OUTPUT FEATURE_TYPE __NUKEME__ @TCL("if [file exists {$(WORKSPACE_TEMP_DIR)}] {set files [glob -nocomplain -directory {$(WORKSPACE_TEMP_DIR)} -tails *.ffs]; if {[llength $files] == 1} { set theFile {$(WORKSPACE_TEMP_DIR)/}; append theFile [lindex $files 0]; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -f FFS \042$theFile\042 & \175; } elseif { [llength $files] == 0 } { catch { file delete -force {$(WORKSPACE_TEMP_DIR)} }; } else { set filesNoExt {}; set lastfile {}; foreach {fileName} [lsort $files] { set fileNoExt [string trimright $fileName {.ffs}]; if [regexp {(.*)_[0-9]*$} $fileNoExt wholething fileNoExtBase] { if { $fileNoExtBase == $lastfile } { continue } }; set lastfile $fileNoExt; lappend filesNoExt $fileNoExt }; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -d {$(WORKSPACE_TEMP_DIR)} -a ffs -f FFS $filesNoExt & \175; }; }; ") -FACTORY_DEF * TeeFactory FACTORY_NAME VisualizerCleaner INPUT FEATURE_TYPE __NUKEME__ -# ------------------------------------------------------------------------- -POSTGIS_3_DEF public.osm_municipalities postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO osm_id int8 type text admin_level text name text name_fr text name_br text source_name_br text admincode text,BTree postcode text wikidata text surf_ha numeric(1000,500) x numeric(1000,500) y numeric(1000,500) diff --git a/scripts/patch_osm_roads.sh b/scripts/patch_osm_roads.sh deleted file mode 100755 index df72eae..0000000 --- a/scripts/patch_osm_roads.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -set -e -set -u - -# argument 1 = millesime redadeg -millesime=$1 - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - -rep_scripts='/data/projets/ar_redadeg/scripts/' -echo "rep_scripts = $rep_scripts" -# variables liées au millésimes -echo "millesime de travail = $1" -rep_data=../data/$millesime -echo "rep_data = $rep_data" -echo "base de données = $DB_NAME" -echo "" - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Patch de la couche de routage sur des secteurs particuliers" - -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME < patch_osm_roads_pgr.sql - -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " F I N patch" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo "" diff --git a/scripts/patch_osm_roads_pgr.sql b/scripts/patch_osm_roads_pgr.sql deleted file mode 100644 index e23953b..0000000 --- a/scripts/patch_osm_roads_pgr.sql +++ /dev/null @@ -1,40 +0,0 @@ - - - --- suppression des objets couche osm_roads_pgr qui intersectent avec les zones de boucles -DELETE FROM osm_roads_pgr WHERE id IN -( - SELECT a.id - FROM osm_roads_pgr a, osm_roads_pgr_patch_mask m - WHERE ST_INTERSECTS(a.the_geom, m.the_geom) -); - --- collage des objets de la couche osm_roads_pgr_patch à la place des objets supprimés --- on crée un identifiant négatif -INSERT INTO osm_roads_pgr - SELECT - 0-a.id AS id, - a.osm_id, a.highway, a.type, a.oneway, a.ref, a.name_fr, a.name_br, - NULL, NULL, NULL, NULL, - a.the_geom - FROM osm_roads_pgr_patch a, osm_roads_pgr_patch_mask m - WHERE ST_INTERSECTS(a.the_geom, m.the_geom); - - --- calcul des 2 attributs de coût (= longueur) -UPDATE osm_roads_pgr -SET cost = st_length(the_geom), reverse_cost = st_length(the_geom) -WHERE id < 0 ; - - --- recrée des nœuds uniquement sur les zones de patch -SELECT pgr_nodeNetwork('osm_roads_pgr', 0.001, rows_where := 'id < 0'); - --- recalcul la topologie pgRouting uniquement sur les zones de patch -SELECT pgr_createTopology('osm_roads_pgr', 0.001, rows_where := 'id < 0', clean := false); - - --- recalcul toute la topologie pgRouting en renumérotant de zéro ---SELECT pgr_createTopology('osm_roads_pgr', 0.001, clean := true); - ---SELECT pgr_analyzegraph('osm_roads_pgr', 0.001); diff --git a/scripts/path_lines_to_patch_masks.fmw b/scripts/path_lines_to_patch_masks.fmw deleted file mode 100644 index 5c7288f..0000000 --- a/scripts/path_lines_to_patch_masks.fmw +++ /dev/null @@ -1,2065 +0,0 @@ -#! -#! redadeg" -# -#! ATTR_TYPE_ENCODING="SDF" -#! BEGIN_PYTHON="" -#! BEGIN_TCL="" -#! CATEGORY="" -#! DESCRIPTION="" -#! DESTINATION="NONE" -#! DESTINATION_ROUTING_FILE="" -#! DOC_EXTENTS="6311.04 706.504" -#! DOC_TOP_LEFT="-218.003 -620.501" -#! END_PYTHON="" -#! END_TCL="" -#! EXPLICIT_BOOKMARK_ORDER="false" -#! FME_BUILD_NUM="18592" -#! FME_DOCUMENT_GUID="bfd896c4-4229-4bf0-b375-258568b928b2" -#! FME_DOCUMENT_PRIORGUID="4ead4119-df27-4641-b4bb-4b6f2c3c6818" -#! FME_GEOMETRY_HANDLING="Enhanced" -#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" -#! FME_REPROJECTION_ENGINE="FME" -#! FME_SERVER_SERVICES="" -#! FME_STROKE_MAX_DEVIATION="0" -#! HISTORY="" -#! IGNORE_READER_FAILURE="No" -#! LAST_SAVE_BUILD="FME(R) 2018.1.2.1 (20190319 - Build 18592 - macosx)" -#! LAST_SAVE_DATE="2020-02-12T19:14:58" -#! LOG_FILE="" -#! LOG_MAX_RECORDED_FEATURES="200" -#! MARKDOWN_DESCRIPTION="" -#! MARKDOWN_USAGE="" -#! MAX_LOG_FEATURES="200" -#! MULTI_WRITER_DATASET_ORDER="BY_ID" -#! PASSWORD="" -#! PYTHON_COMPATIBILITY="27" -#! REDIRECT_TERMINATORS="NONE" -#! SHOW_ANNOTATIONS="true" -#! SHOW_INFO_NODES="true" -#! SOURCE="NONE" -#! SOURCE_ROUTING_FILE="" -#! TERMINATE_REJECTED="NO" -#! TITLE="" -#! USAGE="" -#! USE_MARKDOWN="" -#! VIEW_POSITION="1848.02 267.003" -#! WARN_INVALID_XFORM_PARAM="Yes" -#! WORKSPACE_VERSION="1" -#! ZOOM_SCALE="100" -#! > -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 27 -GUI IGNORE SourceDataset_POSTGIS_1,POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_METHOD_POSTGIS_1,POSTGIS_IN_ADVANCED_POSTGIS_1,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1,POSTGIS_IN_BEGIN_SQL_POSTGIS_1,POSTGIS_IN_END_SQL_POSTGIS_1,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1,DestDataset_POSTGIS_2,POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2,POSTGIS_OUT_ADVANCED_POSTGIS_2,POSTGIS_OUT_BULK_COPY_POSTGIS_2,POSTGIS_OUT_START_TRANSACTION_POSTGIS_2,POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2,POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2,POSTGIS_OUT_BEGIN_SQL_POSTGIS_2,POSTGIS_OUT_END_SQL_POSTGIS_2 -DEFAULT_MACRO DestDataset_POSTGIS breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO SourceDataset_POSTGIS breizhpolenovoredadeg -GUI IGNORE NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -INCLUDE [ if {{$(DestDataset_POSTGIS)} == {}} { puts_real {Parameter 'DestDataset_POSTGIS' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGIS)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -MULTI_READER_TYPE{0} POSTGIS -MULTI_READER_KEYWORD{0} POSTGIS_1 -MULTI_READER_GEN_DIRECTIVES{0} WHERE_CLAUSE,,SEARCH_ENVELOPE_MINX,0,TABLELIST,public.osm_roads_pgr_patch,SEARCH_ENVELOPE_MAXY,0,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,FEATURES_PER_FETCH,10000,USE_TRUE_POSTGIS_TYPES,yes,CLIP_TO_ENVELOPE,NO,POSTGIS_EXPOSE_FORMAT_ATTRS,,SEARCH_METHOD,MBR_OVERLAPS,BEGIN_SQL,,READ_TIME_WITH_TIMEZONE,Yes,EXPOSE_ATTRS_GROUP,,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,END_SQL,,_MERGE_SCHEMAS,YES,DISABLE_COLLECTION_SPLITTING,yes,ADVANCED,,SEARCH_ENVELOPE_MAXX,0,SEARCH_ENVELOPE_MINY,0,SCHEMAS_FOR_TABLE_LISTING,,NAMED_CONNECTION,breizhpolenovoatredadeg,USE_SEARCH_ENVELOPE,NO -WRITER_TYPE MULTI_WRITER -MULTI_WRITER_DATASET_ORDER BY_ID -MULTI_WRITER_FIRST_WRITER_ID 0 -MULTI_WRITER_TYPE{0} POSTGIS -MULTI_WRITER_KEYWORD{0} POSTGIS_2 -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FMT:POSTGIS Connection: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1 Yes -POSTGIS_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1 Yes -POSTGIS_1_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1 yes -POSTGIS_1_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1 yes -POSTGIS_1_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 -POSTGIS_1_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1 -POSTGIS_1_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBR_OVERLAPS -POSTGIS_1_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_1)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_1 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1%POSTGIS_IN_BEGIN_SQL_POSTGIS_1%POSTGIS_IN_END_SQL_POSTGIS_1 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 10000 -POSTGIS_1_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_1 -POSTGIS_1_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_1 -POSTGIS_1_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1 DEFLINE_ATTRS -POSTGIS_1_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1)" -# ============================================================================ -POSTGIS_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Schemas for Table Listing: -POSTGIS_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1) -POSTGIS_1_DATASET "$(SourceDataset_POSTGIS_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_2" -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS_2 FMT:POSTGIS Connection: -POSTGIS_2_PLUGIN_MAX_CHANNELS 1 -DEFAULT_MACRO POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2 Yes -POSTGIS_2_STRICT_TEMPORAL_TYPE_HANDLING "$(POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 POSTGIS_OUT_NAMED_CONNECTION Database Connection -# ============================================================================ -# Write geometry (planar) or geography (geodetic) column -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2 geometry -POSTGIS_2_SPATIAL_COLUMN_TYPE "$(POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2)" -# ============================================================================ -# Default spatial column name -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2 geom -POSTGIS_2_SPATIAL_COLUMN_NAME "$(POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2 yes -POSTGIS_2_GENERIC_GEOMETRY "$(POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2 FEATURE_TYPE -POSTGIS_2_COORDINATE_SYSTEM_GRANULARITY "$(POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_ADVANCED_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_ADVANCED_POSTGIS_2 POSTGIS_OUT_BULK_COPY_POSTGIS_2%POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2%POSTGIS_OUT_START_TRANSACTION_POSTGIS_2%POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2%POSTGIS_OUT_BEGIN_SQL_POSTGIS_2%POSTGIS_OUT_END_SQL_POSTGIS_2 Advanced -DEFAULT_MACRO POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES -POSTGIS_2_BULK_COPY "$(POSTGIS_OUT_BULK_COPY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES%NO Bulk Insert -DEFAULT_MACRO POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 0 -POSTGIS_2_START_TRANSACTION "$(POSTGIS_OUT_START_TRANSACTION_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 Starting Feature: -DEFAULT_MACRO POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 1000 -POSTGIS_2_TRANSACTION_INTERVAL "$(POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 Features Per Transaction -DEFAULT_MACRO POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 NO -POSTGIS_2_INSERT_TEXT_GEOMETRY "$(POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 YES%NO Insert WKT -DEFAULT_MACRO POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 -POSTGIS_2_BEGIN_SQL "$(POSTGIS_OUT_BEGIN_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Write -DEFAULT_MACRO POSTGIS_OUT_END_SQL_POSTGIS_2 -POSTGIS_2_END_SQL "$(POSTGIS_OUT_END_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_END_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run After Write -# ============================================================================ -POSTGIS_2_GENERATE_FME_BUILD_NUM 18592 -POSTGIS_2_DATASET "$(DestDataset_POSTGIS_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)path_lines_to_patch_masks.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_1 POSTGIS_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_2 POSTGIS_2 -# ------------------------------------------------------------------------- - -POSTGIS_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_1_COORDINATE_SYSTEM EPSG:2154 -POSTGIS_2_COORDINATE_SYSTEM EPSG:2154 -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME path_lines_to_patch_masks -MACRO FME_VIEWER_APP fmedatainspector -# ------------------------------------------------------------------------- - -INCLUDE [ if {[info exists env(FME_TEMP)] && [file isdirectory $env(FME_TEMP)]} {set gVisualizerTemp $env(FME_TEMP)} elseif {[info exists env(TEMP)] && [file isdirectory $env(TEMP)]} {set gVisualizerTemp $env(TEMP)} elseif { $tcl_platform(platform) == "unix" } {set gVisualizerTemp "/tmp"} else {set gVisualizerTemp c:}; regsub -all {[ ,&]} {$(WORKSPACE_NAME)} {_} wsname; set gVisualizerTemp $gVisualizerTemp/${wsname}_[clock format [clock seconds] -format %H%M%S]; puts "MACRO WORKSPACE_TEMP_DIR $gVisualizerTemp"; -MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/inspector.ffs -MACRO VISUALIZER_SCHEMA_FILE $(WORKSPACE_TEMP_DIR)/inspector.fsc -MACRO VISUALIZER_CREATE_SPATIAL_INDEX YES -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS MULTI_READER_KEYWORD $(DATASET_KEYWORD_POSTGIS_1) INPUT FEATURE_TYPE * ROUTE POSTGIS POSTGIS_1::public.osm_roads_pgr_patch multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.osm_roads_pgr_patch ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * -POSTGIS_1_MERGE_DEF POSTGIS_1::public.osm_roads_pgr_patch_mask EXACT public.osm_roads_pgr_patch_mask -POSTGIS_1_MERGE_DEF POSTGIS_1::public.osm_roads_pgr_patch EXACT public.osm_roads_pgr_patch DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,id,serialPrimaryKey,osm_id,int8,highway,text,type,text,oneway,text,ref,text,name_fr,text,name_br,text,source,int8,target,int8,cost,float8,reverse_cost,float8 -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.osm_roads_pgr_patch (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.osm_roads_pgr_patch OUTPUT FEATURE_TYPE public.osm_roads_pgr_patch_POSTGIS_1_0_K7A/nX9F3gw= OUTPUT FEATURE_TYPE public.osm_roads_pgr_patch_POSTGIS_1_1_SlFOmjIemgw= -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.osm_roads_pgr_patch_mask (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.osm_roads_pgr_patch_mask -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {public.osm_roads_pgr_patch} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME public.osm_roads_pgr_patch_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE public.osm_roads_pgr_patch_POSTGIS_1_1_SlFOmjIemgw= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { public.osm_roads_pgr_patch } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME public.osm_roads_pgr_patch_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA id,varchar255,osm_id,varchar255,highway,varchar255,type,varchar255,oneway,varchar255,ref,varchar255,name_fr,varchar255,name_br,varchar255,source,varchar255,target,varchar255,cost,varchar255,reverse_cost,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -INCLUDE [ if { ("AREA" == "SOLID") } { puts "MACRO USE_SOLID_BUFFER_FACTORY *"; puts "MACRO USE_DISSOLVE_FACTORY NOT_THIS_TIME"; } else { puts "MACRO USE_SOLID_BUFFER_FACTORY NOT_THIS_TIME"; puts "MACRO USE_DISSOLVE_FACTORY *"; } ] -# -# This is the AREA part of the buffering: -# -INCLUDE [if { ("JOIN_MITER" == "JOIN_MITER") } { puts "MACRO MITER_TO_USE 1" } else { puts "MACRO MITER_TO_USE 0" } ] -FACTORY_DEF $(USE_DISSOLVE_FACTORY) PolygonDissolveFactory INPUT FEATURE_TYPE public.osm_roads_pgr_patch_POSTGIS_1_0_K7A/nX9F3gw= FACTORY_NAME Bufferer REJECT_INVALID_GEOM Yes PRE_BUFFER "5" "22.5" "CAP_BUTT" "JOIN_MITER" "$(MITER_TO_USE)" FULL DISSOLVE_MODE GEOS LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE OUTPUT POLYGON FEATURE_TYPE Bufferer_BUFFERED OUTPUT NON_POLYGON FEATURE_TYPE Bufferer_BUFFERED OUTPUT REJECTED FEATURE_TYPE Bufferer_ -# -# This is the SOLID part of the buffering: -# -FACTORY_DEF $(USE_SOLID_BUFFER_FACTORY) SolidBufferingFactory FACTORY_NAME Bufferer INPUT FEATURE_TYPE public.osm_roads_pgr_patch_POSTGIS_1_0_K7A/nX9F3gw= SPHERE_RADIUS "5" SPHERE_DIVISIONS "" OUTPUT BUFFERED FEATURE_TYPE Bufferer_BUFFERED OUTPUT FEATURE_TYPE Bufferer_ -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME HullReplacer INPUT FEATURE_TYPE Bufferer_BUFFERED INPUT FEATURE_TYPE Bufferer_ OUTPUT FEATURE_TYPE ___TOREJECTOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) @ConvexHull(CONVEX ,AUTOMATIC ,"" ) -FACTORY_DEF * TestFactory FACTORY_NAME HullReplacer_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT FAILED FEATURE_TYPE HullReplacer_HULL @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -FACTORY_DEF * TeeFactory FACTORY_NAME "HullReplacer HULL Splitter" INPUT FEATURE_TYPE HullReplacer_HULL OUTPUT FEATURE_TYPE HullReplacer_HULL_0_f4IimvxOgV8= OUTPUT FEATURE_TYPE HullReplacer_HULL_1_tM5NJpCGuDo= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} PolygonDissolveFactory INPUT FEATURE_TYPE HullReplacer_HULL_1_tM5NJpCGuDo= FACTORY_NAME Dissolver NON_OVERLAPPING_INPUT No ACCUM_INPUT_ATTRS One DEAGGREGATE_INPUT Yes LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE SELECTED MODE COMPLETE CONNECT_Z_MODE FIRST_WINS CLEANING_TOLERANCE NONE OUTPUT_REMNANTS OUTPUT POLYGON FEATURE_TYPE Dissolver_AREA OUTPUT REJECTED FEATURE_TYPE Dissolver_ -FACTORY_DEF * TeeFactory FACTORY_NAME "Dissolver AREA Splitter" INPUT FEATURE_TYPE Dissolver_AREA OUTPUT FEATURE_TYPE Dissolver_AREA_0_ETD2D9TM6RM= OUTPUT FEATURE_TYPE Dissolver_AREA_1_L04hQmr69h0= -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {Dissolver__Rejected_} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME Dissolver__Rejected__Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE Dissolver_ GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { Dissolver__Rejected_ } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME Dissolver__Rejected__Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA id,varchar255,osm_id,varchar255,highway,varchar255,type,varchar255,oneway,varchar255,ref,varchar255,name_fr,varchar255,name_br,varchar255,source,varchar255,target,varchar255,cost,varchar255,reverse_cost,varchar255,fme_rejection_code,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME HullReplacer_2 INPUT FEATURE_TYPE Dissolver_AREA_1_L04hQmr69h0= OUTPUT FEATURE_TYPE ___TOREJECTOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) @ConvexHull(CONCAVE ,AUTOMATIC ,"" ) -FACTORY_DEF * TestFactory FACTORY_NAME HullReplacer_2_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT FAILED FEATURE_TYPE HullReplacer_2_HULL @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -FACTORY_DEF * TeeFactory FACTORY_NAME "HullReplacer_2 HULL Splitter" INPUT FEATURE_TYPE HullReplacer_2_HULL OUTPUT FEATURE_TYPE HullReplacer_2_HULL_0_8qJdQMIjWJ0= OUTPUT FEATURE_TYPE HullReplacer_2_HULL_1_nwdPsNuXZQw= -# ------------------------------------------------------------------------- -INCLUDE [ if { ("AREA" == "SOLID") } { puts "MACRO USE_SOLID_BUFFER_FACTORY *"; puts "MACRO USE_DISSOLVE_FACTORY NOT_THIS_TIME"; } else { puts "MACRO USE_SOLID_BUFFER_FACTORY NOT_THIS_TIME"; puts "MACRO USE_DISSOLVE_FACTORY *"; } ] -# -# This is the AREA part of the buffering: -# -INCLUDE [if { ("JOIN_MITER" == "JOIN_MITER") } { puts "MACRO MITER_TO_USE 1" } else { puts "MACRO MITER_TO_USE 0" } ] -FACTORY_DEF $(USE_DISSOLVE_FACTORY) PolygonDissolveFactory INPUT FEATURE_TYPE HullReplacer_2_HULL_1_nwdPsNuXZQw= FACTORY_NAME Bufferer_2 REJECT_INVALID_GEOM Yes PRE_BUFFER "-1" "22.5" "CAP_BUTT" "JOIN_MITER" "$(MITER_TO_USE)" FULL DISSOLVE_MODE GEOS LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE OUTPUT POLYGON FEATURE_TYPE Bufferer_2_BUFFERED OUTPUT NON_POLYGON FEATURE_TYPE Bufferer_2_BUFFERED -# -# This is the SOLID part of the buffering: -# -FACTORY_DEF $(USE_SOLID_BUFFER_FACTORY) SolidBufferingFactory FACTORY_NAME Bufferer_2 INPUT FEATURE_TYPE HullReplacer_2_HULL_1_nwdPsNuXZQw= SPHERE_RADIUS "-1" SPHERE_DIVISIONS "" OUTPUT BUFFERED FEATURE_TYPE Bufferer_2_BUFFERED -# ------------------------------------------------------------------------- -FACTORY_DEF * DeaggregateFactory FACTORY_NAME Deaggregator INPUT FEATURE_TYPE Bufferer_2_BUFFERED ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "INCOMING_IF_CONFLICT" INCOMING_PREFIX "" RECURSIVE No SPLIT_COMPOSITES No INSTANTIATE_GEOMETRY_INSTANCES_NEW No SET_FME_TYPE Yes PART_NUMBER_FIELD _part_number GEOMETRY_NAME_FIELD _geometry_name ID_ATTR _hierarchy_id PARENT_ID_ATTR _hierarchy_parent_id CHILD_ID_ATTR _hierarchy_child_id_list COPY_ATTR EVERY_NODE OUTPUT POINT FEATURE_TYPE Deaggregator_DEAGGREGATED OUTPUT LINE FEATURE_TYPE Deaggregator_DEAGGREGATED OUTPUT POLYGON FEATURE_TYPE Deaggregator_DEAGGREGATED OUTPUT DONUT FEATURE_TYPE Deaggregator_DEAGGREGATED OUTPUT AGGREGATE FEATURE_TYPE Deaggregator_DEAGGREGATED -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeKeeper_fd7f64f4_5c9b_451a_b755_5ed563171dc112_LIST_EXP "; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeKeeper INPUT FEATURE_TYPE Deaggregator_DEAGGREGATED OUTPUT { FEATURE_TYPE AttributeKeeper_OUTPUT @KeepAttributes(fme_encoded,,fme_pcre_match,"^fme_$(AttributeKeeper_fd7f64f4_5c9b_451a_b755_5ed563171dc112_LIST_EXP)") } -# ------------------------------------------------------------------------- -MACRO OUTPUT_AREA_FTYPE not_selected -MACRO OUTPUT_AREA_FTYPE GeometryFilter_AREA -MACRO OUTPUT_INSTANCE_FTYPE not_selected -Lookup GeometryFilter_RouterTable "" "not_selected" fme_area $(OUTPUT_AREA_FTYPE) -MACRO COLLECTION_HANDLING NOT_THIS_TIME -MACRO INSTANCE_FILTERING * -INCLUDE [ if 0 { puts "MACRO COLLECTION_HANDLING *"; if { puts "MACRO INSTANCE_FILTERING NOT_THIS_TIME"; }; }; if {{$(OUTPUT_INSTANCE_FTYPE)} == "not_selected"} { puts "MACRO INSTANCE_FILTERING NOT_THIS_TIME"; }; ] -FACTORY_DEF * TeeFactory FACTORY_NAME GeometryFilter_InputPassThrough INPUT FEATURE_TYPE AttributeKeeper_OUTPUT OUTPUT FEATURE_TYPE GeometryFilter___Input___ @Geometry(FIX_FMETYPE_FMEGEOMETRY) -FACTORY_DEF $(INSTANCE_FILTERING) TestFactory FACTORY_NAME GeometryFilter_InstanceTest INPUT FEATURE_TYPE GeometryFilter___Input___ TEST @Geometry(IS_GEOMETRY_INSTANCE) == 1 OUTPUT PASSED FEATURE_TYPE $(OUTPUT_INSTANCE_FTYPE) OUTPUT FAILED FEATURE_TYPE GeometryFilter___Input___ -FACTORY_DEF $(COLLECTION_HANDLING) TestFactory FACTORY_NAME GeometryFilter_CollectionTest INPUT FEATURE_TYPE GeometryFilter___Input___ TEST &fme_type == "fme_collection" OUTPUT FAILED FEATURE_TYPE GeometryFilter___Not_Collection___ OUTPUT PASSED FEATURE_TYPE GeometryFilter___Collection___ -FACTORY_DEF $(COLLECTION_HANDLING) DeaggregateFactory FACTORY_NAME GeometryFilter_Deagg INPUT FEATURE_TYPE GeometryFilter___Collection___ HOMOGENIZE_COLLECTIONS YES RECURSIVE YES SET_FME_TYPE YES INSTANTIATE_GEOMETRY_INSTANCES_NEW OUTPUT POINT FEATURE_TYPE GeometryFilter___HomogeneousAggregate___ OUTPUT LINE FEATURE_TYPE GeometryFilter___HomogeneousAggregate___ OUTPUT POLYGON FEATURE_TYPE GeometryFilter___HomogeneousAggregate___ OUTPUT DONUT FEATURE_TYPE GeometryFilter___HomogeneousAggregate___ OUTPUT AGGREGATE FEATURE_TYPE GeometryFilter___HomogeneousAggregate___ -FACTORY_DEF * TeeFactory FACTORY_NAME GeometryFilter_RouterPrepper INPUT FEATURE_TYPE GeometryFilter___HomogeneousAggregate___ INPUT FEATURE_TYPE GeometryFilter___Not_Collection___ INPUT FEATURE_TYPE GeometryFilter___Input___ OUTPUT FEATURE_TYPE GeometryFilter___Prepped___ GeometryFilter_c8cbda62_849c_4412_abc1_08a00117e7fe7_targetFeatureType @Lookup(GeometryFilter_RouterTable,&fme_type) -FACTORY_DEF * TestFactory FACTORY_NAME GeometryFilter_Router INPUT FEATURE_TYPE GeometryFilter___Prepped___ TEST @Value(GeometryFilter_c8cbda62_849c_4412_abc1_08a00117e7fe7_targetFeatureType) != "not_selected" OUTPUT PASSED FEATURE_TYPE * @FeatureType(@Value(GeometryFilter_c8cbda62_849c_4412_abc1_08a00117e7fe7_targetFeatureType)) @RemoveAttributes(GeometryFilter_c8cbda62_849c_4412_abc1_08a00117e7fe7_targetFeatureType) OUTPUT FAILED FEATURE_TYPE GeometryFilter_ @RemoveAttributes(GeometryFilter_c8cbda62_849c_4412_abc1_08a00117e7fe7_targetFeatureType) -FACTORY_DEF * TeeFactory FACTORY_NAME "GeometryFilter Transformer Output Nuker" INPUT FEATURE_TYPE GeometryFilter_ -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {HullReplacer_2_Hull} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME HullReplacer_2_Hull_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE HullReplacer_2_HULL_0_8qJdQMIjWJ0= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { HullReplacer_2_Hull } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME HullReplacer_2_Hull_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA id,varchar255,osm_id,varchar255,highway,varchar255,type,varchar255,oneway,varchar255,ref,varchar255,name_fr,varchar255,name_br,varchar255,source,varchar255,target,varchar255,cost,varchar255,reverse_cost,varchar255,fme_rejection_code,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {Dissolver_Area} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME Dissolver_Area_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE Dissolver_AREA_0_ETD2D9TM6RM= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { Dissolver_Area } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME Dissolver_Area_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA id,varchar255,osm_id,varchar255,highway,varchar255,type,varchar255,oneway,varchar255,ref,varchar255,name_fr,varchar255,name_br,varchar255,source,varchar255,target,varchar255,cost,varchar255,reverse_cost,varchar255,fme_rejection_code,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {HullReplacer_Hull} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME HullReplacer_Hull_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE HullReplacer_HULL_0_f4IimvxOgV8= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { HullReplacer_Hull } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME HullReplacer_Hull_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA id,varchar255,osm_id,varchar255,highway,varchar255,type,varchar255,oneway,varchar255,ref,varchar255,name_fr,varchar255,name_br,varchar255,source,varchar255,target,varchar255,cost,varchar255,reverse_cost,varchar255,fme_rejection_code,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC GeometryFilter_AREA TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__public.osm_roads_pgr_patch_mask COORDINATE_SYSTEM EPSG:2154 GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- - -FACTORY_DEF * CreationFactory FACTORY_NAME VisualizerProcessor CREATE_AT_END OUTPUT FEATURE_TYPE __NUKEME__ @TCL("if [file exists {$(WORKSPACE_TEMP_DIR)}] {set files [glob -nocomplain -directory {$(WORKSPACE_TEMP_DIR)} -tails *.ffs]; if {[llength $files] == 1} { set theFile {$(WORKSPACE_TEMP_DIR)/}; append theFile [lindex $files 0]; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -f FFS \042$theFile\042 & \175; } elseif { [llength $files] == 0 } { catch { file delete -force {$(WORKSPACE_TEMP_DIR)} }; } else { set filesNoExt {}; set lastfile {}; foreach {fileName} [lsort $files] { set fileNoExt [string trimright $fileName {.ffs}]; if [regexp {(.*)_[0-9]*$} $fileNoExt wholething fileNoExtBase] { if { $fileNoExtBase == $lastfile } { continue } }; set lastfile $fileNoExt; lappend filesNoExt $fileNoExt }; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -d {$(WORKSPACE_TEMP_DIR)} -a ffs -f FFS $filesNoExt & \175; }; }; ") -FACTORY_DEF * TeeFactory FACTORY_NAME VisualizerCleaner INPUT FEATURE_TYPE __NUKEME__ -# ------------------------------------------------------------------------- -POSTGIS_2_DEF public.osm_roads_pgr_patch_mask postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO id serial,PrimaryKey name text diff --git a/scripts/phase_5 snap.fmw b/scripts/phase_5 snap.fmw deleted file mode 100644 index 2c6d86f..0000000 --- a/scripts/phase_5 snap.fmw +++ /dev/null @@ -1,1124 +0,0 @@ -#! -#! pgrouting" -# --MAX "5" -# -#! ATTR_TYPE_ENCODING="SDF" -#! BEGIN_PYTHON="" -#! BEGIN_TCL="" -#! CATEGORY="" -#! DESCRIPTION="" -#! DESTINATION="NONE" -#! DESTINATION_ROUTING_FILE="" -#! DOC_EXTENTS="2196.52 1462.51" -#! DOC_TOP_LEFT="58 -1549.01" -#! END_PYTHON="" -#! END_TCL="" -#! EXPLICIT_BOOKMARK_ORDER="false" -#! FME_BUILD_NUM="18592" -#! FME_DOCUMENT_GUID="2a736de1-a5c5-4c96-8804-20325865f82b" -#! FME_DOCUMENT_PRIORGUID="" -#! FME_GEOMETRY_HANDLING="Enhanced" -#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" -#! FME_REPROJECTION_ENGINE="FME" -#! FME_SERVER_SERVICES="" -#! FME_STROKE_MAX_DEVIATION="0" -#! HISTORY="" -#! IGNORE_READER_FAILURE="No" -#! LAST_SAVE_BUILD="FME(R) 2018.1.2.1 (20190319 - Build 18592 - macosx)" -#! LAST_SAVE_DATE="2019-10-28T22:56:45" -#! LOG_FILE="" -#! LOG_MAX_RECORDED_FEATURES="200" -#! MARKDOWN_DESCRIPTION="" -#! MARKDOWN_USAGE="" -#! MAX_LOG_FEATURES="200" -#! MULTI_WRITER_DATASET_ORDER="BY_ID" -#! PASSWORD="" -#! PYTHON_COMPATIBILITY="27" -#! REDIRECT_TERMINATORS="NONE" -#! SHOW_ANNOTATIONS="true" -#! SHOW_INFO_NODES="true" -#! SOURCE="NONE" -#! SOURCE_ROUTING_FILE="" -#! TERMINATE_REJECTED="YES" -#! TITLE="" -#! USAGE="" -#! USE_MARKDOWN="" -#! VIEW_POSITION="-93.0009 615.006" -#! WARN_INVALID_XFORM_PARAM="Yes" -#! WORKSPACE_VERSION="1" -#! ZOOM_SCALE="100" -#! > -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 27 -GUI IGNORE SourceDataset_POSTGIS_1,POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_METHOD_POSTGIS_1,POSTGIS_IN_ADVANCED_POSTGIS_1,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1,POSTGIS_IN_BEGIN_SQL_POSTGIS_1,POSTGIS_IN_END_SQL_POSTGIS_1,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS redadegpgrouting -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO MAX 5 -GUI FLOAT MAX Maximum Distance: -INCLUDE [ if {{$(SourceDataset_POSTGIS)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(MAX)} == {}} { puts_real {Parameter 'MAX' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -MULTI_READER_TYPE{0} POSTGIS -MULTI_READER_KEYWORD{0} POSTGIS_1 -MULTI_READER_GEN_DIRECTIVES{0} SEARCH_ENVELOPE_MAXY,0,EXPOSE_ATTRS_GROUP,,CLIP_TO_ENVELOPE,NO,SEARCH_ENVELOPE_MAXX,0,SEARCH_ENVELOPE_MINY,0,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,TABLELIST,public.phase_3_trace_tronconspublic.phase_5_pk_refpublic.phase_5_pk_umap,POSTGIS_EXPOSE_FORMAT_ATTRS,,DISABLE_COLLECTION_SPLITTING,yes,USE_TRUE_POSTGIS_TYPES,yes,READ_TIME_WITH_TIMEZONE,Yes,SEARCH_METHOD,MBR_OVERLAPS,_MERGE_SCHEMAS,YES,WHERE_CLAUSE,,SEARCH_ENVELOPE_MINX,0,END_SQL,,USE_SEARCH_ENVELOPE,NO,BEGIN_SQL,,FEATURES_PER_FETCH,10000,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,SCHEMAS_FOR_TABLE_LISTING,,NAMED_CONNECTION,redadegatpgrouting,ADVANCED, -WRITER_TYPE NULL -WRITER_KEYWORD NULL_DEST -NULL_DEST_DATASET null -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FMT:POSTGIS Connection: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1 Yes -POSTGIS_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1 Yes -POSTGIS_1_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1 yes -POSTGIS_1_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1 yes -POSTGIS_1_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 -POSTGIS_1_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1 -POSTGIS_1_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBR_OVERLAPS -POSTGIS_1_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_1)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_1 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1%POSTGIS_IN_BEGIN_SQL_POSTGIS_1%POSTGIS_IN_END_SQL_POSTGIS_1 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 10000 -POSTGIS_1_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_1 -POSTGIS_1_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_1 -POSTGIS_1_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1 DEFLINE_ATTRS -POSTGIS_1_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1)" -# ============================================================================ -POSTGIS_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Schemas for Table Listing: -POSTGIS_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1) -POSTGIS_1_DATASET "$(SourceDataset_POSTGIS_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)phase_5 snap.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_1 POSTGIS_1 -# ------------------------------------------------------------------------- - -POSTGIS_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME phase_5 snap -MACRO FME_VIEWER_APP fmedatainspector -# ------------------------------------------------------------------------- - -INCLUDE [ if {[info exists env(FME_TEMP)] && [file isdirectory $env(FME_TEMP)]} {set gVisualizerTemp $env(FME_TEMP)} elseif {[info exists env(TEMP)] && [file isdirectory $env(TEMP)]} {set gVisualizerTemp $env(TEMP)} elseif { $tcl_platform(platform) == "unix" } {set gVisualizerTemp "/tmp"} else {set gVisualizerTemp c:}; regsub -all {[ ,&]} {$(WORKSPACE_NAME)} {_} wsname; set gVisualizerTemp $gVisualizerTemp/${wsname}_[clock format [clock seconds] -format %H%M%S]; puts "MACRO WORKSPACE_TEMP_DIR $gVisualizerTemp"; -MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/inspector.ffs -MACRO VISUALIZER_SCHEMA_FILE $(WORKSPACE_TEMP_DIR)/inspector.fsc -MACRO VISUALIZER_CREATE_SPATIAL_INDEX YES -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS MULTI_READER_KEYWORD $(DATASET_KEYWORD_POSTGIS_1) INPUT FEATURE_TYPE * ROUTE POSTGIS POSTGIS_1::public.phase_5_pk_umap multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.phase_5_pk_umap ALIAS_GEOMETRY ROUTE POSTGIS POSTGIS_1::public.phase_5_pk_ref multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.phase_5_pk_ref ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_5_pk_umap EXACT public.phase_5_pk_umap DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,pk_id,int4PrimaryKey,secteur_id,int4 -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_3_trace_troncons EXACT public.phase_3_trace_troncons -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_5_pk_ref EXACT public.phase_5_pk_ref DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,pk_id,int4PrimaryKey,pk_x,numeric81,pk_y,numeric81,pk_long,numeric108,pk_lat,numeric108,length_real,numeric62,length_theorical,int4,secteur_id,int4,municipality_admincode,text,municipality_postcode,text,municipality_name_fr,text,municipality_name_br,text,way_osm_id,int8,way_highway,text,way_type,text,way_oneway,text,way_ref,text,way_name_fr,text,way_name_br,text -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_3_trace_troncons (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.phase_3_trace_troncons OUTPUT FEATURE_TYPE public.phase_3_trace_troncons_POSTGIS_1 -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_5_pk_ref (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.phase_5_pk_ref OUTPUT FEATURE_TYPE public.phase_5_pk_ref_POSTGIS_1 -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_5_pk_umap (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.phase_5_pk_umap OUTPUT FEATURE_TYPE public.phase_5_pk_umap_POSTGIS_1 -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -DEFAULT_MACRO INPUT_BASE_LINES -FACTORY_DEF {*} ProximityFactory FACTORY_NAME NeighborFinder_2 INPUT BASE FEATURE_TYPE public.phase_5_pk_umap_POSTGIS_1 INPUT CANDIDATE FEATURE_TYPE public.phase_5_pk_ref_POSTGIS_1 GROUP_BY { pk_id } REQUIRE_BASE YES K_NEAREST "1" "" INSERT_VERTEX_ON_BASE No TAKE_MEASURES_FROM_CANDIDATE Yes COMPUTE_MEASURES_MODE CONTINUOUS REJECT_NULL Yes CANDIDATE_FEATURES_FIRST No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE DISTANCE_ATTR _distance TREAT_POLYGON_AS LINE NEVER_OVERWRITE_MERGED_ATTRS Yes MERGE_ATTRS "NO" ATTR_ACCUM_MODE "" ATTR_CONFLICT_RES "" INCOMING_PREFIX "" REJECT_INVALID_GEOM YES OUTPUT MATCHED FEATURE_TYPE NeighborFinder_2_MATCHED @RenameAttributes(_angle,angle,_candidate_angle,candidate_angle,_candidate_label_angle,candidate_label_angle,_closest_candidate_x,closest_candidate_x,_closest_candidate_y,closest_candidate_y,_closest_base_x,closest_base_x,_closest_base_y,closest_base_y) OUTPUT REJECTED FEATURE_TYPE NeighborFinder_2_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME NeighborFinder_2_ INPUT FEATURE_TYPE NeighborFinder_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, NeighborFinder_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {NeighborFinder_2_Matched} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME NeighborFinder_2_Matched_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE NeighborFinder_2_MATCHED GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { NeighborFinder_2_Matched } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME NeighborFinder_2_Matched_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA pk_id,varchar255,secteur_id,varchar255,_distance,varchar255,_angle,varchar255,_candidate_angle,varchar255,_candidate_label_angle,varchar255,_closest_candidate_x,varchar255,_closest_candidate_y,varchar255,_closest_base_x,varchar255,_closest_base_y,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -DEFAULT_MACRO INPUT_BASE_LINES -FACTORY_DEF {*} ProximityFactory FACTORY_NAME NeighborFinder INPUT CANDIDATE FEATURE_TYPE public.phase_3_trace_troncons_POSTGIS_1 REQUIRE_BASE YES K_NEAREST "1" "@EvaluateExpression(FDIV,FLOAT,$(MAX$encode),NeighborFinder)" INSERT_VERTEX_ON_BASE No TAKE_MEASURES_FROM_CANDIDATE Yes COMPUTE_MEASURES_MODE CONTINUOUS REJECT_NULL Yes CANDIDATE_FEATURES_FIRST No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE DISTANCE_ATTR _distance TREAT_POLYGON_AS LINE NEVER_OVERWRITE_MERGED_ATTRS Yes MERGE_ATTRS "NO" ATTR_ACCUM_MODE "" ATTR_CONFLICT_RES "" INCOMING_PREFIX "" REJECT_INVALID_GEOM YES OUTPUT MATCHED FEATURE_TYPE NeighborFinder_MATCHED @RenameAttributes(_angle,angle,_candidate_angle,candidate_angle,_candidate_label_angle,candidate_label_angle,_closest_candidate_x,closest_candidate_x,_closest_candidate_y,closest_candidate_y,_closest_base_x,closest_base_x,_closest_base_y,closest_base_y) OUTPUT REJECTED FEATURE_TYPE NeighborFinder_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME NeighborFinder_ INPUT FEATURE_TYPE NeighborFinder_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, NeighborFinderoutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {NeighborFinder_Matched} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME NeighborFinder_Matched_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE NeighborFinder_MATCHED GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { NeighborFinder_Matched } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME NeighborFinder_Matched_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA _distance,varchar255,_angle,varchar255,_candidate_angle,varchar255,_candidate_label_angle,varchar255,_closest_candidate_x,varchar255,_closest_candidate_y,varchar255,_closest_base_x,varchar255,_closest_base_y,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- - -FACTORY_DEF * CreationFactory FACTORY_NAME VisualizerProcessor CREATE_AT_END OUTPUT FEATURE_TYPE __NUKEME__ @TCL("if [file exists {$(WORKSPACE_TEMP_DIR)}] {set files [glob -nocomplain -directory {$(WORKSPACE_TEMP_DIR)} -tails *.ffs]; if {[llength $files] == 1} { set theFile {$(WORKSPACE_TEMP_DIR)/}; append theFile [lindex $files 0]; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -f FFS \042$theFile\042 & \175; } elseif { [llength $files] == 0 } { catch { file delete -force {$(WORKSPACE_TEMP_DIR)} }; } else { set filesNoExt {}; set lastfile {}; foreach {fileName} [lsort $files] { set fileNoExt [string trimright $fileName {.ffs}]; if [regexp {(.*)_[0-9]*$} $fileNoExt wholething fileNoExtBase] { if { $fileNoExtBase == $lastfile } { continue } }; set lastfile $fileNoExt; lappend filesNoExt $fileNoExt }; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -d {$(WORKSPACE_TEMP_DIR)} -a ffs -f FFS $filesNoExt & \175; }; }; ") -FACTORY_DEF * TeeFactory FACTORY_NAME VisualizerCleaner INPUT FEATURE_TYPE __NUKEME__ diff --git a/scripts/phase_5.sql b/scripts/phase_5.sql deleted file mode 100644 index 901d5e2..0000000 --- a/scripts/phase_5.sql +++ /dev/null @@ -1,128 +0,0 @@ - - -WITH ref AS ( - SELECT COUNT(pk_id) as ref FROM phase_5_pk_ref - WHERE (secteur_id >= 10 and secteur_id < 20) -), -umap AS ( - SELECT COUNT(pk_id) as umap FROM phase_5_pk_umap - WHERE (secteur_id >= 10 and secteur_id < 20) -) -SELECT - *, - CASE - WHEN ref.ref < umap.umap THEN 'plus' - WHEN ref.ref > umap.umap THEN 'moins' - WHEN ref.ref = umap.umap THEN 'égalité' - ELSE 'problème' - END AS test -FROM ref, umap - - --- test de géométrie import umap -SELECT secteur_id, pk_id, ST_geometrytype(the_geom) FROM phase_5_pk_umap -WHERE ST_geometrytype(the_geom) <> 'ST_Point' OR secteur_id IS NULL OR pk_id IS NULL ; - - - --- test de distance PK ref -> pk umap -SELECT - --COUNT(*) - r.pk_id, - r.secteur_id, - TRUNC(ST_Distance(ST_Transform(r.the_geom,2154), ST_Transform(u.the_geom,2154))::numeric,2) as distance -FROM phase_5_pk_ref r FULL JOIN phase_5_pk_umap u ON r.pk_id = u.pk_id -WHERE - TRUNC(ST_Distance(ST_Transform(r.the_geom,2154), ST_Transform(u.the_geom,2154))::numeric,2) > 1 ---ORDER BY r.secteur_id, r.pk_id -ORDER BY TRUNC(ST_Distance(ST_Transform(r.the_geom,2154), ST_Transform(u.the_geom,2154))::numeric,2) desc - - -WITH liste_pk_decales AS ( - SELECT - r.pk_id, - r.secteur_id, - TRUNC(ST_Distance(ST_Transform(r.the_geom,2154), ST_Transform(u.the_geom,2154))::numeric,2) as distance - FROM phase_5_pk_ref r FULL JOIN phase_5_pk_umap u ON r.pk_id = u.pk_id - WHERE TRUNC(ST_Distance(ST_Transform(r.the_geom,2154), ST_Transform(u.the_geom,2154))::numeric,2) > 1 -) -SELECT '1' as tri, '> 1000' as distance, COUNT(*) FROM liste_pk_decales WHERE (distance >= 1000) -UNION SELECT '2' as tri, '> 500' as distance, COUNT(*) FROM liste_pk_decales WHERE (distance >= 500 AND distance < 1000) -UNION SELECT '3' as tri, '> 100' as distance, COUNT(*) FROM liste_pk_decales WHERE (distance >= 100 AND distance < 500) -UNION SELECT '4' as tri, '> 10' as distance, COUNT(*) FROM liste_pk_decales WHERE (distance >= 10 AND distance < 100) -UNION SELECT '5' as tri, '< 10' as distance, COUNT(*) FROM liste_pk_decales WHERE (distance < 10) -ORDER BY tri ; - - - - --- ligne entre les PK recalés et les PK références - - - - - --- recalage des PK umap sur le trace -WITH -pk_decales AS ( - SELECT - r.pk_id, - r.secteur_id, - TRUNC(ST_Distance(r.the_geom, u.the_geom)::numeric,2) as distance, - u.the_geom - FROM phase_5_pk_ref r FULL JOIN phase_5_pk_umap u ON r.pk_id = u.pk_id - WHERE TRUNC(ST_Distance(r.the_geom, u.the_geom)::numeric,2) > 1 - AND r.secteur_id = 20 -), -buffer_troncons AS ( - SELECT troncon_id, ST_BUFFER(the_geom, 5) as the_geom - FROM phase_3_trace_troncons - WHERE secteur_id = 20 -) - -SELECT - pk.pk_id, pk.the_geom, - ST_Distance(pk.the_geom, ST_ClosestPoint(trace.the_geom, pk.the_geom)) AS distance, - ST_Snap( - pk.the_geom, -- le point d'origine à recaler - ST_ClosestPoint(trace.the_geom, pk.the_geom), -- le point le plus près dans la couche de nœuds - ST_Distance(pk.the_geom, ST_ClosestPoint(trace.the_geom, pk.the_geom))* 1.01 -- dans la distance de ce plus proche point - ) AS the_geom -FROM pk_decales pk, phase_3_trace_troncons trace, buffer_troncons -WHERE ST_INTERSECTS(pk.the_geom, buffer_troncons.the_geom) -AND trace.secteur_id = 20 - - - - - -WITH -pk_decales AS ( - SELECT - r.pk_id, - r.secteur_id, - TRUNC(ST_Distance(r.the_geom, u.the_geom)::numeric,2) as distance_pk_ref, - u.the_geom - FROM phase_5_pk_ref r FULL JOIN phase_5_pk_umap u ON r.pk_id = u.pk_id - WHERE TRUNC(ST_Distance(r.the_geom, u.the_geom)::numeric,2) > 1 -), -trace AS ( - SELECT - troncon_id, - ST_LineMerge(the_geom) AS the_geom - FROM phase_3_trace_troncons - WHERE secteur_id = 60 -) --- il faut qu'on commence par limiter au tronçon le plus près du PK -SELECT - pk.pk_id, - pk.the_geom AS pk_point, - trace.the_geom AS trace, - -FROM pk_decales pk, trace -WHERE ST_INTERSECTS(trace.the_geom, ST_BUFFER(pk.the_geom,2) ) - - - - - diff --git a/scripts/reload_osm_patch_from_gml.fmw b/scripts/reload_osm_patch_from_gml.fmw deleted file mode 100644 index 15d493d..0000000 --- a/scripts/reload_osm_patch_from_gml.fmw +++ /dev/null @@ -1,1924 +0,0 @@ -#! -#! redadeg" -# --DestDataset_POSTGIS "breizhpolenovoredadeg" -# -#! ATTR_TYPE_ENCODING="SDF" -#! BEGIN_PYTHON="" -#! BEGIN_TCL="" -#! CATEGORY="" -#! DESCRIPTION="" -#! DESTINATION="NONE" -#! DESTINATION_ROUTING_FILE="" -#! DOC_EXTENTS="1984.99 534.005" -#! DOC_TOP_LEFT="100 -728.488" -#! END_PYTHON="" -#! END_TCL="" -#! EXPLICIT_BOOKMARK_ORDER="false" -#! FME_BUILD_NUM="18592" -#! FME_DOCUMENT_GUID="9a18cdf5-0275-4d03-8df4-e2a72b0a8671" -#! FME_DOCUMENT_PRIORGUID="60301dd1-c439-43d6-ace1-99a7ec83eff8" -#! FME_GEOMETRY_HANDLING="Enhanced" -#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" -#! FME_REPROJECTION_ENGINE="FME" -#! FME_SERVER_SERVICES="" -#! FME_STROKE_MAX_DEVIATION="0" -#! HISTORY="" -#! IGNORE_READER_FAILURE="No" -#! LAST_SAVE_BUILD="FME(R) 2018.1.2.1 (20190319 - Build 18592 - macosx)" -#! LAST_SAVE_DATE="2020-02-16T09:47:02" -#! LOG_FILE="" -#! LOG_MAX_RECORDED_FEATURES="200" -#! MARKDOWN_DESCRIPTION="" -#! MARKDOWN_USAGE="" -#! MAX_LOG_FEATURES="200" -#! MULTI_WRITER_DATASET_ORDER="BY_ID" -#! PASSWORD="" -#! PYTHON_COMPATIBILITY="27" -#! REDIRECT_TERMINATORS="NONE" -#! SHOW_ANNOTATIONS="true" -#! SHOW_INFO_NODES="true" -#! SOURCE="NONE" -#! SOURCE_ROUTING_FILE="" -#! TERMINATE_REJECTED="YES" -#! TITLE="" -#! USAGE="" -#! USE_MARKDOWN="" -#! VIEW_POSITION="-99.001 0" -#! WARN_INVALID_XFORM_PARAM="Yes" -#! WORKSPACE_VERSION="1" -#! ZOOM_SCALE="100" -#! > -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 27 -GUI IGNORE SourceDataset_GML_1,GML_IN_FME_GROUP_NAMED1_GML_1,GML_IN_IGNORE_APPLICATON_SCHEMA_GML_1,GML_IN_XSD_DOC_GML_1,GML_IN_VALIDATE_DATASET_GML_1,GML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_GML_1,GML_IN_MAP_FEATURE_COLLECTION_GML_1,GML_IN_GML_FEATURE_ELEMENTS_GML_1,GML_IN_SRS_GEOMETRY_PARAMETERS_GML_1,GML_IN_SRS_AXIS_ORDER_GML_1,GML_IN_SRS_ANGLE_DIRECTION_GML_1,GML_IN_ENFORCE_PATH_CONTINUITY_BY_GML_1,GML_IN_FEATURE_PROPERTIES_READER_GML_1,GML_IN_MAP_EMBEDDED_OBJECTS_AS_GML_1,GML_IN_MAP_PREDEFINED_GML_PROPERTIES_GML_1,GML_IN_MAP_GEOMETRY_COLUMNS_GML_1,GML_IN_MAP_ALL_SUBSTITUTABLE_PROPERTIES_GML_1,GML_IN_ADD_NAMESPACE_PREFIX_TO_NAMES_GML_1,GML_IN_QNAMES_FOR_PROPERTIES_TO_IGNORE_GML_1,GML_IN_ATTRIBUTE_HANDLING_GML_1,GML_IN_MAP_COMPLEX_PROPERTIES_AS_GML_1,GML_IN_MAX_MULTI_LIST_LEVEL_GML_1,GML_IN_ADD_GEOMETRIES_AS_XML_FRAGMENTS_GML_1,GML_IN_XML_FRAGMENTS_AS_DOCUMENTS_GML_1,GML_IN_FLATTEN_XML_FRAGMENTS_GML_1,GML_IN_FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE_GML_1,GML_IN_FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE_GML_1,GML_IN_FLATTEN_XML_FRAGMENTS_SEPARATOR_GML_1,GML_IN_GML_READER_GROUP_GML_1,GML_IN_USE_OLD_READER_GML_1,GML_IN_DISABLE_AUTOMATIC_READER_TYPE_SELECTION_GML_1,GML_IN_DISABLE_XML_NAMESPACE_PROCESSING_GML_1,GML_IN_EXPLORE_XSD_VALUES_GROUP_GML_1,GML_IN_EXPLORE_XSD_VALUES_GML_1,GML_IN_USE_SEARCH_ENVELOPE_GML_1,GML_IN_SEARCH_ENVELOPE_MINX_GML_1,GML_IN_SEARCH_ENVELOPE_MINY_GML_1,GML_IN_SEARCH_ENVELOPE_MAXX_GML_1,GML_IN_SEARCH_ENVELOPE_MAXY_GML_1,GML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GML_1,GML_IN_CLIP_TO_ENVELOPE_GML_1,GML_IN_GML_RDR_ADV_GML_1,GML_IN_CONTINUE_ON_GEOM_ERROR_GML_1,GML_IN_REPROJECT_DISPARATE_CRS_IN_MULTIPLE_GEOMETRIES_GML_1,GML_IN_SYSTEM_ENCODING_GML_1,GML_IN_CACHE_XSD_GML_1,GML_IN_CACHE_XSD_EXPIRY_TIME_GML_1,GML_IN_MULTI_VALUE_SIMPLE_PROPERTIES_AS_CSV_GML_1,GML_IN_NETWORK_AUTHENTICATION_GML_1,SourceDataset_POSTGIS_1,POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_METHOD_POSTGIS_1,POSTGIS_IN_ADVANCED_POSTGIS_1,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1,POSTGIS_IN_BEGIN_SQL_POSTGIS_1,POSTGIS_IN_END_SQL_POSTGIS_1,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1,DestDataset_POSTGIS_2,POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2,POSTGIS_OUT_ADVANCED_POSTGIS_2,POSTGIS_OUT_BULK_COPY_POSTGIS_2,POSTGIS_OUT_START_TRANSACTION_POSTGIS_2,POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2,POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2,POSTGIS_OUT_BEGIN_SQL_POSTGIS_2,POSTGIS_OUT_END_SQL_POSTGIS_2 -DEFAULT_MACRO SourceDataset_GML /Volumes/ker/mael/Downloads/osm_roads_pgr_patch.gml -GUI OPTIONAL MULTIFILE SourceDataset_GML GML_Files(*.gml;*.gz;*.xml)|*.gml;*gz;*.xml|GML_Files(*.gml)|*.gml|Compressed_GML_Files(*.gz)|*.gz|GML_Files(*.xml)|*.xml|All_Files|* Source Geography Markup Language (GML) File(s): -DEFAULT_MACRO SourceDataset_POSTGIS breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO DestDataset_POSTGIS breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -INCLUDE [ if {{$(SourceDataset_POSTGIS)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_POSTGIS)} == {}} { puts_real {Parameter 'DestDataset_POSTGIS' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -MULTI_READER_TYPE{0} GML -MULTI_READER_KEYWORD{0} GML_1 -MULTI_READER_GEN_DIRECTIVES{0} FLATTEN_XML_FRAGMENTS,NO,DISABLE_XML_NAMESPACE_PROCESSING,NO,USE_SEARCH_ENVELOPE,NO,CONTINUE_ON_GEOM_ERROR,yes,REPROJECT_DISPARATE_CRS_IN_MULTIPLE_GEOMETRIES,yes,MAP_GEOMETRY_COLUMNS,YES,MULTI_VALUE_SIMPLE_PROPERTIES_AS_CSV,no,_MERGE_SCHEMAS,YES,VALIDATE_DATASET,no,XML_FRAGMENTS_AS_DOCUMENTS,YES,GML_EXPOSE_FORMAT_ATTRS,,ADD_NAMESPACE_PREFIX_TO_NAMES,,SEARCH_ENVELOPE_MAXX,0,MAP_EMBEDDED_OBJECTS_AS,ATTRIBUTES,SYSTEM_ENCODING,,IGNORE_APPLICATON_SCHEMA,no,FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE,,GML_RDR_ADV,,EXPLORE_XSD_VALUES_GROUP,,SEARCH_ENVELOPE_MINY,0,MAP_PREDEFINED_GML_PROPERTIES,NO,SKIP_SCHEMA_LOCATION_IN_DATASET,No,ADD_GEOMETRIES_AS_XML_FRAGMENTS,NO,SEARCH_ENVELOPE_MINX,0,GML_FEATURE_ELEMENTS,Unused,FEATURE_PROPERTIES_READER,,NETWORK_AUTHENTICATION,,EXPOSE_ATTRS_GROUP,,CACHE_XSD_EXPIRY_TIME,,SEARCH_ENVELOPE_MAXY,0,ENFORCE_PATH_CONTINUITY_BY,SNAPPING_END_POINTS,SRS_AXIS_ORDER,,DISABLE_AUTOMATIC_READER_TYPE_SELECTION,NO,EXPLORE_XSD_VALUES,NO,CLIP_TO_ENVELOPE,NO,CACHE_XSD,yes,SRS_GEOMETRY_PARAMETERS,,QNAMES_FOR_PROPERTIES_TO_IGNORE,,MAP_ALL_SUBSTITUTABLE_PROPERTIES,YES,MAP_COMPLEX_PROPERTIES_AS,NestedAttributes,MAP_FEATURE_COLLECTION,,ATTRIBUTE_HANDLING,,GML_READER_GROUP,,SRS_ANGLE_DIRECTION,,USE_OLD_READER,NO,FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE,,XSD_DOC,,FLATTEN_XML_FRAGMENTS_SEPARATOR,,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,MAX_MULTI_LIST_LEVEL,,FEATURE_TYPES_SCHEMA_MODE,XML_SCHEMA -MULTI_READER_TYPE{1} NULL -MULTI_READER_FORMAT{1} POSTGIS -MULTI_READER_KEYWORD{1} POSTGIS_1 -MULTI_READER_GEN_DIRECTIVES{1} EXPOSE_ATTRS_GROUP,,SCHEMAS_FOR_TABLE_LISTING,,WHERE_CLAUSE,,NAMED_CONNECTION,breizhpolenovoatredadeg,END_SQL,,TABLELIST,public.osm_roads_pgr_patch,FEATURES_PER_FETCH,10000,SEARCH_METHOD,MBR_OVERLAPS,USE_TRUE_POSTGIS_TYPES,yes,_MERGE_SCHEMAS,YES,SEARCH_ENVELOPE_MINY,0,SEARCH_ENVELOPE_MAXX,0,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,SEARCH_ENVELOPE_MINX,0,CLIP_TO_ENVELOPE,NO,USE_SEARCH_ENVELOPE,NO,SEARCH_ENVELOPE_MAXY,0,POSTGIS_EXPOSE_FORMAT_ATTRS,,DISABLE_COLLECTION_SPLITTING,yes,READ_TIME_WITH_TIMEZONE,Yes,BEGIN_SQL,,ADVANCED, -WRITER_TYPE MULTI_WRITER -MULTI_WRITER_DATASET_ORDER BY_ID -MULTI_WRITER_FIRST_WRITER_ID 0 -MULTI_WRITER_TYPE{0} POSTGIS -MULTI_WRITER_KEYWORD{0} POSTGIS_2 -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GML_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER GML GML_1 -# ============================================================================ -# The following GUI lines prompt for a GML file to be used as the -# the source of the data. -# The user input is stored in a macro, which is then used to define -# the dataset to be written. -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_GML_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER GML GML_1 -DEFAULT_MACRO SourceDataset_GML_1 $(SourceDataset_GML) -GUI OPTIONAL MULTIFILE SourceDataset_GML_1 GML_Files(*.gml;*.gz;*.xml)|*.gml;*gz;*.xml|GML_Files(*.gml)|*.gml|Compressed_GML_Files(*.gz)|*.gz|GML_Files(*.xml)|*.xml|All_Files|* Source Geography Markup Language (GML) File(s): -# ============================================================================ -DEFAULT_MACRO GML_IN_FME_GROUP_NAMED1_GML_1 -GUI OPTIONAL DISCLOSUREGROUP GML_IN_FME_GROUP_NAMED1_GML_1 GML_IN_IGNORE_APPLICATON_SCHEMA_GML_1%GML_IN_XSD_DOC_GML_1%GML_IN_VALIDATE_DATASET_GML_1%GML_IN_FEATURE_TYPES_SCHEMA_MODE%GML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_GML_1%GML_IN_MAP_FEATURE_COLLECTION_GML_1%GML_IN_GML_FEATURE_ELEMENTS_GML_1 Application Schema -DEFAULT_MACRO GML_IN_IGNORE_APPLICATON_SCHEMA_GML_1 no -GML_1_IGNORE_APPLICATON_SCHEMA "$(GML_IN_IGNORE_APPLICATON_SCHEMA_GML_1)" -GUI ACTIVECHOICE GML_IN_IGNORE_APPLICATON_SCHEMA_GML_1 no,GML_IN_GML_FEATURE_ELEMENTS_GML_1%yes,GML_IN_XSD_DOC_GML_1,GML_IN_VALIDATE_DATASET_GML_1,GML_IN_FEATURE_TYPES_SCHEMA_MODE,GML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_GML_1,GML_IN_MAP_FEATURE_COLLECTION_GML_1,GML_IN_FEATURE_PROPERTIES_READER_GML_1,GML_IN_ATTRIBUTE_HANDLING_GML_1,GML_IN_GML_READER_GROUP_GML_1 Ignore Application Schema: -# ============================================================================ -# The XSD_DOC keyword overwrites the location of the XML Schema document that -# is specified in the xsi:schemaLocation of the XML dataset. -DEFAULT_MACRO GML_IN_XSD_DOC_GML_1 -GML_1_XSD_DOC "$(GML_IN_XSD_DOC_GML_1)" -GUI OPTIONAL FILE_OR_URL GML_IN_XSD_DOC_GML_1 GML_Schema_File(*.xsd)|*.xsd|All_Files(*)|* Application Schema: -# ============================================================================ -# This specifies whether the XML dataset should be validated against its -# DTD file. If set to 'auto', the XML document will only be validated if -# its DTD file is available. -DEFAULT_MACRO GML_IN_VALIDATE_DATASET_GML_1 no -GML_1_VALIDATE_DATASET "$(GML_IN_VALIDATE_DATASET_GML_1)" -GUI CHOICE GML_IN_VALIDATE_DATASET_GML_1 yes%no Validate GML Dataset File: -# ============================================================================ -# Specifies whether we should only show feature types from XSD or dataset -DEFAULT_MACRO GML_IN_FEATURE_TYPES_SCHEMA_MODE_GML_1 XML_SCHEMA -GML_1_FEATURE_TYPES_SCHEMA_MODE "$(GML_IN_FEATURE_TYPES_SCHEMA_MODE_GML_1)" -DEFAULT_MACRO GML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_GML_1 No -GML_1_SKIP_SCHEMA_LOCATION_IN_DATASET "$(GML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_GML_1)" -GUI CHOICE GML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_GML_1 Yes%No Ignore xsi:schemaLocation in Dataset: -DEFAULT_MACRO GML_IN_MAP_FEATURE_COLLECTION_GML_1 -GML_1_MAP_FEATURE_COLLECTION "$(GML_IN_MAP_FEATURE_COLLECTION_GML_1)" -GUI OPTIONAL LOOKUP_LISTBOX GML_IN_MAP_FEATURE_COLLECTION_GML_1 gml:FeatureCollection,gml%wfs:FeatureCollection,wfs Map FeatureCollection: -DEFAULT_MACRO GML_IN_GML_FEATURE_ELEMENTS_GML_1 -GML_1_GML_FEATURE_ELEMENTS "$(GML_IN_GML_FEATURE_ELEMENTS_GML_1)" -GUI OPTIONAL TEXT_EDIT_ GML_IN_GML_FEATURE_ELEMENTS_GML_1 GML Feature Elements: -# ============================================================================ -DEFAULT_MACRO GML_IN_SRS_GEOMETRY_PARAMETERS_GML_1 -GUI OPTIONAL DISCLOSUREGROUP GML_IN_SRS_GEOMETRY_PARAMETERS_GML_1 GML_IN_SRS_AXIS_ORDER_GML_1%GML_IN_SRS_ANGLE_DIRECTION_GML_1%GML_IN_ENFORCE_PATH_CONTINUITY_BY_GML_1 GML SRS/Geometry Parameters -DEFAULT_MACRO GML_IN_SRS_AXIS_ORDER_GML_1 -GML_1_SRS_AXIS_ORDER "$(GML_IN_SRS_AXIS_ORDER_GML_1)" -GUI OPTIONAL CHOICE GML_IN_SRS_AXIS_ORDER_GML_1 1,2%2,1%1,2,3%2,1,3 GML SRS Axis Order: -DEFAULT_MACRO GML_IN_SRS_ANGLE_DIRECTION_GML_1 -GML_1_SRS_ANGLE_DIRECTION "$(GML_IN_SRS_ANGLE_DIRECTION_GML_1)" -GUI OPTIONAL LOOKUP_CHOICE GML_IN_SRS_ANGLE_DIRECTION_GML_1 Counterclockwise,CCW%Clockwise,CW GML SRS Angle Direction: -DEFAULT_MACRO GML_IN_ENFORCE_PATH_CONTINUITY_BY_GML_1 SNAPPING_END_POINTS -GML_1_ENFORCE_PATH_CONTINUITY_BY "$(GML_IN_ENFORCE_PATH_CONTINUITY_BY_GML_1)" -GUI OPTIONAL LOOKUP_CHOICE GML_IN_ENFORCE_PATH_CONTINUITY_BY_GML_1 "\"Snapping End Points\",SNAPPING_END_POINTS"%"\"Inserting New Segment\",INSERTING_NEW_SEGMENT" Enforce Path Continuity By: -# ============================================================================ -DEFAULT_MACRO GML_IN_FEATURE_PROPERTIES_READER_GML_1 -GUI OPTIONAL DISCLOSUREGROUP GML_IN_FEATURE_PROPERTIES_READER_GML_1 GML_IN_MAP_EMBEDDED_OBJECTS_AS_GML_1%GML_IN_MAP_PREDEFINED_GML_PROPERTIES_GML_1%GML_IN_MAP_GEOMETRY_COLUMNS_GML_1%GML_IN_MAP_ALL_SUBSTITUTABLE_PROPERTIES_GML_1%GML_IN_ADD_NAMESPACE_PREFIX_TO_NAMES_GML_1%GML_IN_QNAMES_FOR_PROPERTIES_TO_IGNORE_GML_1 Feature Properties -DEFAULT_MACRO GML_IN_MAP_EMBEDDED_OBJECTS_AS_GML_1 ATTRIBUTES -GML_1_MAP_EMBEDDED_OBJECTS_AS "$(GML_IN_MAP_EMBEDDED_OBJECTS_AS_GML_1)" -GUI LOOKUP_CHOICE GML_IN_MAP_EMBEDDED_OBJECTS_AS_GML_1 "\"Attributes\",ATTRIBUTES"%"\"Geometries\",GEOMETRIES"%"\"Feature Types\",FEATURE_TYPES" Map Embedded Objects as: -DEFAULT_MACRO GML_IN_MAP_PREDEFINED_GML_PROPERTIES_GML_1 NO -GML_1_MAP_PREDEFINED_GML_PROPERTIES "$(GML_IN_MAP_PREDEFINED_GML_PROPERTIES_GML_1)" -GUI OPTIONAL CHECKBOX GML_IN_MAP_PREDEFINED_GML_PROPERTIES_GML_1 YES%NO Map Predefined Properties -DEFAULT_MACRO GML_IN_MAP_GEOMETRY_COLUMNS_GML_1 YES -GML_1_MAP_GEOMETRY_COLUMNS "$(GML_IN_MAP_GEOMETRY_COLUMNS_GML_1)" -GUI OPTIONAL CHECKBOX GML_IN_MAP_GEOMETRY_COLUMNS_GML_1 YES%NO Map Geometry Columns -DEFAULT_MACRO GML_IN_MAP_ALL_SUBSTITUTABLE_PROPERTIES_GML_1 YES -GML_1_MAP_ALL_SUBSTITUTABLE_PROPERTIES "$(GML_IN_MAP_ALL_SUBSTITUTABLE_PROPERTIES_GML_1)" -GUI OPTIONAL CHECKBOX GML_IN_MAP_ALL_SUBSTITUTABLE_PROPERTIES_GML_1 YES%NO Map All Substitutable Properties -DEFAULT_MACRO GML_IN_ADD_NAMESPACE_PREFIX_TO_NAMES_GML_1 -GML_1_ADD_NAMESPACE_PREFIX_TO_NAMES "$(GML_IN_ADD_NAMESPACE_PREFIX_TO_NAMES_GML_1)" -GUI OPTIONAL LOOKUP_CHOICE GML_IN_ADD_NAMESPACE_PREFIX_TO_NAMES_GML_1 "\"Feature Types\",FEATURE_TYPES"%"\"Feature Types and Attributes\",FEATURE_TYPES_AND_ATTRIBUTES" Add XML Namespace Prefix to: -DEFAULT_MACRO GML_IN_QNAMES_FOR_PROPERTIES_TO_IGNORE_GML_1 -GML_1_QNAMES_FOR_PROPERTIES_TO_IGNORE "$(GML_IN_QNAMES_FOR_PROPERTIES_TO_IGNORE_GML_1)" -GUI OPTIONAL TEXT_EDIT_XML GML_IN_QNAMES_FOR_PROPERTIES_TO_IGNORE_GML_1 Properties to Ignore: -# ============================================================================ -DEFAULT_MACRO GML_IN_ATTRIBUTE_HANDLING_GML_1 -GUI OPTIONAL DISCLOSUREGROUP GML_IN_ATTRIBUTE_HANDLING_GML_1 GML_IN_MAP_COMPLEX_PROPERTIES_AS_GML_1%GML_IN_MAX_MULTI_LIST_LEVEL_GML_1%GML_IN_ADD_GEOMETRIES_AS_XML_FRAGMENTS_GML_1%GML_IN_XML_FRAGMENTS_AS_DOCUMENTS_GML_1%GML_IN_FLATTEN_XML_FRAGMENTS_GML_1 Feature Properties - Attribute Handling -DEFAULT_MACRO GML_IN_MAP_COMPLEX_PROPERTIES_AS_GML_1 Nested Attributes -GML_1_MAP_COMPLEX_PROPERTIES_AS "$(GML_IN_MAP_COMPLEX_PROPERTIES_AS_GML_1)" -GUI ACTIVECHOICE GML_IN_MAP_COMPLEX_PROPERTIES_AS_GML_1 "Nested Attributes"%"\"XML Fragments\",GML_IN_MAX_MULTI_LIST_LEVEL_GML_1" Map Complex Properties as: -GUI LOOKUP GML_IN_MAX_MULTI_LIST_LEVEL_GML_1 , -DEFAULT_MACRO GML_IN_MAX_MULTI_LIST_LEVEL_GML_1 -GML_1_MAX_MULTI_LIST_LEVEL "$(GML_IN_MAX_MULTI_LIST_LEVEL_GML_1)" -GUI OPTIONAL CHOICE GML_IN_MAX_MULTI_LIST_LEVEL_GML_1 0%1%2%3%4%5%6%7%8%9%10%11%12%13%14%15%16%17%18%19%20 Limit Number of Lists in Nested Attributes: -DEFAULT_MACRO GML_IN_ADD_GEOMETRIES_AS_XML_FRAGMENTS_GML_1 NO -GML_1_ADD_GEOMETRIES_AS_XML_FRAGMENTS "$(GML_IN_ADD_GEOMETRIES_AS_XML_FRAGMENTS_GML_1)" -GUI OPTIONAL CHECKBOX GML_IN_ADD_GEOMETRIES_AS_XML_FRAGMENTS_GML_1 YES%NO Add Geometries as XML Fragments -DEFAULT_MACRO GML_IN_XML_FRAGMENTS_AS_DOCUMENTS_GML_1 YES -GML_1_XML_FRAGMENTS_AS_DOCUMENTS "$(GML_IN_XML_FRAGMENTS_AS_DOCUMENTS_GML_1)" -GUI OPTIONAL CHECKBOX GML_IN_XML_FRAGMENTS_AS_DOCUMENTS_GML_1 YES%NO Include XML Declaration in XML Fragments -DEFAULT_MACRO GML_IN_FLATTEN_XML_FRAGMENTS_GML_1 NO -GML_1_FLATTEN_XML_FRAGMENTS "$(GML_IN_FLATTEN_XML_FRAGMENTS_GML_1)" -GUI ACTIVEDISCLOSUREGROUP GML_IN_FLATTEN_XML_FRAGMENTS_GML_1 GML_IN_FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE_GML_1%GML_IN_FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE_GML_1%GML_IN_FLATTEN_XML_FRAGMENTS_SEPARATOR_GML_1 Flatten XML Fragments -GUI LOOKUP GML_IN_FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE_GML_1 , -DEFAULT_MACRO GML_IN_FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE_GML_1 -GML_1_FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE "$(GML_IN_FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE_GML_1)" -GUI OPTIONAL STRING_OR_CHOICE GML_IN_FLATTEN_XML_FRAGMENTS_OPEN_LIST_BRACE_GML_1 {%_%-%empty_string Substitute Open List Brace: -GUI LOOKUP GML_IN_FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE_GML_1 , -DEFAULT_MACRO GML_IN_FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE_GML_1 -GML_1_FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE "$(GML_IN_FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE_GML_1)" -GUI OPTIONAL STRING_OR_CHOICE GML_IN_FLATTEN_XML_FRAGMENTS_CLOSE_LIST_BRACE_GML_1 }%_%-%empty_string Substitute Close List Brace: -GUI LOOKUP GML_IN_FLATTEN_XML_FRAGMENTS_SEPARATOR_GML_1 , -DEFAULT_MACRO GML_IN_FLATTEN_XML_FRAGMENTS_SEPARATOR_GML_1 -GML_1_FLATTEN_XML_FRAGMENTS_SEPARATOR "$(GML_IN_FLATTEN_XML_FRAGMENTS_SEPARATOR_GML_1)" -GUI OPTIONAL STRING_OR_CHOICE GML_IN_FLATTEN_XML_FRAGMENTS_SEPARATOR_GML_1 .%_%empty_string Substitute Element List Separator: -# ============================================================================ -DEFAULT_MACRO GML_IN_GML_READER_GROUP_GML_1 -GUI OPTIONAL DISCLOSUREGROUP GML_IN_GML_READER_GROUP_GML_1 GML_IN_USE_OLD_READER_GML_1%GML_IN_DISABLE_AUTOMATIC_READER_TYPE_SELECTION_GML_1%GML_IN_DISABLE_XML_NAMESPACE_PROCESSING_GML_1 Version and XML Namespace Processing -DEFAULT_MACRO GML_IN_USE_OLD_READER_GML_1 NO -GML_1_USE_OLD_READER "$(GML_IN_USE_OLD_READER_GML_1)" -GUI OPTIONAL ACTIVECHECK GML_IN_USE_OLD_READER_GML_1 YES,GML_IN_MAP_ALL_SUBSTITUTABLE_PROPERTIES_GML_1%NO Use Old Reader for GML v3.1.1 and v2.1.2 Documents -DEFAULT_MACRO GML_IN_DISABLE_AUTOMATIC_READER_TYPE_SELECTION_GML_1 NO -GML_1_DISABLE_AUTOMATIC_READER_TYPE_SELECTION "$(GML_IN_DISABLE_AUTOMATIC_READER_TYPE_SELECTION_GML_1)" -GUI OPTIONAL CHECKBOX GML_IN_DISABLE_AUTOMATIC_READER_TYPE_SELECTION_GML_1 YES%NO Disable Automatic Reader Type Selection -DEFAULT_MACRO GML_IN_DISABLE_XML_NAMESPACE_PROCESSING_GML_1 NO -GML_1_DISABLE_XML_NAMESPACE_PROCESSING "$(GML_IN_DISABLE_XML_NAMESPACE_PROCESSING_GML_1)" -GUI OPTIONAL CHECKBOX GML_IN_DISABLE_XML_NAMESPACE_PROCESSING_GML_1 YES%NO Disable XML Namespace Processing -# ============================================================================ -DEFAULT_MACRO GML_IN_EXPLORE_XSD_VALUES_GROUP_GML_1 -GUI OPTIONAL DISCLOSUREGROUP GML_IN_EXPLORE_XSD_VALUES_GROUP_GML_1 GML_IN_EXPLORE_XSD_VALUES_GML_1 Explore XSD Values -DEFAULT_MACRO GML_IN_EXPLORE_XSD_VALUES_GML_1 NO -GML_1_EXPLORE_XSD_VALUES "$(GML_IN_EXPLORE_XSD_VALUES_GML_1)" -GUI OPTIONAL ACTIVECHECK GML_IN_EXPLORE_XSD_VALUES_GML_1 YES,GML_IN_VALIDATE_DATASET_GML_1,GML_IN_FEATURE_TYPES_SCHEMA_MODE,GML_IN_SRS_GEOMETRY_PARAMETERS_GML_1,GML_IN_USE_OLD_READER_GML_1,GML_IN_USE_SEARCH_ENVELOPE_GML_1%NO Explore XSD Values -DEFAULT_MACRO GML_IN_EXPOSE_ATTRS_GROUP_GML_1 -GML_1_EXPOSE_ATTRS_GROUP "$(GML_IN_EXPOSE_ATTRS_GROUP_GML_1)" -# Include this file in source setting section to add external search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO GML_IN_USE_SEARCH_ENVELOPE_GML_1 NO -GML_1_USE_SEARCH_ENVELOPE "$(GML_IN_USE_SEARCH_ENVELOPE_GML_1)" -GUI ACTIVEDISCLOSUREGROUP GML_IN_USE_SEARCH_ENVELOPE_GML_1 GML_IN_SEARCH_ENVELOPE_MINX_GML_1%GML_IN_SEARCH_ENVELOPE_MINY_GML_1%GML_IN_SEARCH_ENVELOPE_MAXX_GML_1%GML_IN_SEARCH_ENVELOPE_MAXY_GML_1%GML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GML_1%GML_IN_CLIP_TO_ENVELOPE_GML_1%GML_IN_SEARCH_METHOD%GML_IN_SEARCH_METHOD_FILTER%GML_IN_SEARCH_ORDER%GML_IN_SEARCH_FEATURE%GML_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP GML_IN_SEARCH_ENVELOPE_MINX_GML_1 ,0 -DEFAULT_MACRO GML_IN_SEARCH_ENVELOPE_MINX_GML_1 0 -GML_1_SEARCH_ENVELOPE "$(GML_IN_SEARCH_ENVELOPE_MINX_GML_1)" -GUI OPTIONAL FLOAT GML_IN_SEARCH_ENVELOPE_MINX_GML_1 Minimum X: -# =========================================================================== -GUI LOOKUP GML_IN_SEARCH_ENVELOPE_MINY_GML_1 ,0 -DEFAULT_MACRO GML_IN_SEARCH_ENVELOPE_MINY_GML_1 0 -GML_1_SEARCH_ENVELOPE "$(GML_IN_SEARCH_ENVELOPE_MINY_GML_1)" -GUI OPTIONAL FLOAT GML_IN_SEARCH_ENVELOPE_MINY_GML_1 Minimum Y: -# =========================================================================== -GUI LOOKUP GML_IN_SEARCH_ENVELOPE_MAXX_GML_1 ,0 -DEFAULT_MACRO GML_IN_SEARCH_ENVELOPE_MAXX_GML_1 0 -GML_1_SEARCH_ENVELOPE "$(GML_IN_SEARCH_ENVELOPE_MAXX_GML_1)" -GUI OPTIONAL FLOAT GML_IN_SEARCH_ENVELOPE_MAXX_GML_1 Maximum X: -# =========================================================================== -GUI LOOKUP GML_IN_SEARCH_ENVELOPE_MAXY_GML_1 ,0 -DEFAULT_MACRO GML_IN_SEARCH_ENVELOPE_MAXY_GML_1 0 -GML_1_SEARCH_ENVELOPE "$(GML_IN_SEARCH_ENVELOPE_MAXY_GML_1)" -GUI OPTIONAL FLOAT GML_IN_SEARCH_ENVELOPE_MAXY_GML_1 Maximum Y: -# =========================================================================== -GUI LOOKUP GML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GML_1 , -DEFAULT_MACRO GML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GML_1 -GML_1_SEARCH_ENVELOPE "$(GML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GML_1)" -GUI OPTIONAL COORDSYS GML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_GML_1 Search Envelope Coordinate System: -# =========================================================================== -# BUG18999: We now have a soft clip to fall back on like native spatial index -# thus we are reintroducing the clip to envelop as an option for users. -# Defualt to soft clip as per the existing database readers we are emulating -GUI LOOKUP GML_IN_CLIP_TO_ENVELOPE_GML_1 ,NO -DEFAULT_MACRO GML_IN_CLIP_TO_ENVELOPE_GML_1 NO -GML_1_CLIP_TO_ENVELOPE "$(GML_IN_CLIP_TO_ENVELOPE_GML_1)" -GUI OPTIONAL CHECKBOX GML_IN_CLIP_TO_ENVELOPE_GML_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO GML_IN_GML_RDR_ADV_GML_1 -GUI OPTIONAL DISCLOSUREGROUP GML_IN_GML_RDR_ADV_GML_1 GML_IN_CONTINUE_ON_GEOM_ERROR_GML_1%GML_IN_REPROJECT_DISPARATE_CRS_IN_MULTIPLE_GEOMETRIES_GML_1%GML_IN_SYSTEM_ENCODING_GML_1%GML_IN_CACHE_XSD_GML_1%GML_IN_CACHE_XSD_EXPIRY_TIME_GML_1%GML_IN_MULTI_VALUE_SIMPLE_PROPERTIES_AS_CSV_GML_1 Advanced -# ============================================================================ -# This keyword allows the GML reader to continue reading the input dataset when -# it encounters an error reading a feature's geometry. -DEFAULT_MACRO GML_IN_CONTINUE_ON_GEOM_ERROR_GML_1 yes -GML_1_CONTINUE_ON_GEOM_ERROR "$(GML_IN_CONTINUE_ON_GEOM_ERROR_GML_1)" -GUI CHOICE GML_IN_CONTINUE_ON_GEOM_ERROR_GML_1 yes%no Continue on Geometry Error: -# ============================================================================ -DEFAULT_MACRO GML_IN_REPROJECT_DISPARATE_CRS_IN_MULTIPLE_GEOMETRIES_GML_1 yes -GML_1_REPROJECT_DISPARATE_CRS_IN_MULTIPLE_GEOMETRIES "$(GML_IN_REPROJECT_DISPARATE_CRS_IN_MULTIPLE_GEOMETRIES_GML_1)" -GUI CHOICE GML_IN_REPROJECT_DISPARATE_CRS_IN_MULTIPLE_GEOMETRIES_GML_1 yes%no Reproject Disparate CRS in Multiple Geometries: -# ============================================================================ -# This keyword specifies what encoding the GML schema and data features should -# be in when they are output to the FME. The default value for this keyword -# is the system's encoding. -DEFAULT_MACRO GML_IN_SYSTEM_ENCODING_GML_1 -GML_1_SYSTEM_ENCODING "$(GML_IN_SYSTEM_ENCODING_GML_1)" -GUI OPTIONAL TEXT GML_IN_SYSTEM_ENCODING_GML_1 System Encoding: -# ============================================================================ -# This keyword allows XML Schemas to be temporarily cached thereby minimizing -# the number of network fetches. -DEFAULT_MACRO GML_IN_CACHE_XSD_GML_1 yes -GML_1_CACHE_XSD "$(GML_IN_CACHE_XSD_GML_1)" -GUI CHOICE GML_IN_CACHE_XSD_GML_1 yes%no Cache XSD Documents: -# ============================================================================ -# Specifies the amount of time in seconds an XML Schema document is allowed -# to be cached before it expires. -DEFAULT_MACRO GML_IN_CACHE_XSD_EXPIRY_TIME_GML_1 -GML_1_CACHE_XSD_EXPIRY_TIME "$(GML_IN_CACHE_XSD_EXPIRY_TIME_GML_1)" -GUI OPTIONAL INTEGER GML_IN_CACHE_XSD_EXPIRY_TIME_GML_1 Cache XSD Expiry Time: -DEFAULT_MACRO GML_IN_MULTI_VALUE_SIMPLE_PROPERTIES_AS_CSV_GML_1 no -GML_1_MULTI_VALUE_SIMPLE_PROPERTIES_AS_CSV "$(GML_IN_MULTI_VALUE_SIMPLE_PROPERTIES_AS_CSV_GML_1)" -GUI CHOICE GML_IN_MULTI_VALUE_SIMPLE_PROPERTIES_AS_CSV_GML_1 no%yes Simple multi-valued properties as csv: -# =========================================================================== -DEFAULT_MACRO GML_IN_NETWORK_AUTHENTICATION_GML_1 -GML_1_NETWORK_AUTHENTICATION "$(GML_IN_NETWORK_AUTHENTICATION_GML_1)" -GUI OPTIONAL AUTHENTICATOR GML_IN_NETWORK_AUTHENTICATION_GML_1 CONTAINER%GROUP%CONTAINER_TITLE%"Network Authentication"%PROMPT_TYPE%NETWORK Network Authentication -# ============================================================================ -DEFAULT_MACRO GML_IN_ATTRIBUTE_READING_GML_1 ALL -GML_1_ATTRIBUTE_READING "$(GML_IN_ATTRIBUTE_READING_GML_1)" -# ============================================================================ -GML_1_GENERATE_FME_BUILD_NUM 18592 -GML_1_DATASET "$(SourceDataset_GML_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FMT:POSTGIS Connection: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1 Yes -POSTGIS_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1 Yes -POSTGIS_1_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1 yes -POSTGIS_1_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1 yes -POSTGIS_1_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 -POSTGIS_1_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1 -POSTGIS_1_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBR_OVERLAPS -POSTGIS_1_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_1)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_1 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1%POSTGIS_IN_BEGIN_SQL_POSTGIS_1%POSTGIS_IN_END_SQL_POSTGIS_1 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 10000 -POSTGIS_1_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_1 -POSTGIS_1_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_1 -POSTGIS_1_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1 DEFLINE_ATTRS -POSTGIS_1_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1)" -# ============================================================================ -POSTGIS_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Schemas for Table Listing: -POSTGIS_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1) -POSTGIS_1_DATASET "$(SourceDataset_POSTGIS_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_2" -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS_2 FMT:POSTGIS Connection: -POSTGIS_2_PLUGIN_MAX_CHANNELS 1 -DEFAULT_MACRO POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2 Yes -POSTGIS_2_STRICT_TEMPORAL_TYPE_HANDLING "$(POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 POSTGIS_OUT_NAMED_CONNECTION Database Connection -# ============================================================================ -# Write geometry (planar) or geography (geodetic) column -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2 geometry -POSTGIS_2_SPATIAL_COLUMN_TYPE "$(POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2)" -# ============================================================================ -# Default spatial column name -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2 the_geom -POSTGIS_2_SPATIAL_COLUMN_NAME "$(POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2 yes -POSTGIS_2_GENERIC_GEOMETRY "$(POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2 FEATURE_TYPE -POSTGIS_2_COORDINATE_SYSTEM_GRANULARITY "$(POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_ADVANCED_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_ADVANCED_POSTGIS_2 POSTGIS_OUT_BULK_COPY_POSTGIS_2%POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2%POSTGIS_OUT_START_TRANSACTION_POSTGIS_2%POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2%POSTGIS_OUT_BEGIN_SQL_POSTGIS_2%POSTGIS_OUT_END_SQL_POSTGIS_2 Advanced -DEFAULT_MACRO POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES -POSTGIS_2_BULK_COPY "$(POSTGIS_OUT_BULK_COPY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES%NO Bulk Insert -DEFAULT_MACRO POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 0 -POSTGIS_2_START_TRANSACTION "$(POSTGIS_OUT_START_TRANSACTION_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 Starting Feature: -DEFAULT_MACRO POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 1000 -POSTGIS_2_TRANSACTION_INTERVAL "$(POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 Features Per Transaction -DEFAULT_MACRO POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 NO -POSTGIS_2_INSERT_TEXT_GEOMETRY "$(POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 YES%NO Insert WKT -DEFAULT_MACRO POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 -POSTGIS_2_BEGIN_SQL "$(POSTGIS_OUT_BEGIN_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Write -DEFAULT_MACRO POSTGIS_OUT_END_SQL_POSTGIS_2 -POSTGIS_2_END_SQL "$(POSTGIS_OUT_END_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_END_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run After Write -# ============================================================================ -POSTGIS_2_GENERATE_FME_BUILD_NUM 18592 -POSTGIS_2_DATASET "$(DestDataset_POSTGIS_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)reload_osm_patch_from_gml.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -DEFAULT_MACRO DATASET_KEYWORD_GML_1 GML_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_1 POSTGIS_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_2 POSTGIS_2 -# ------------------------------------------------------------------------- - -GML_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -GML_1_COORDINATE_SYSTEM EPSG:2154 -POSTGIS_1_COORDINATE_SYSTEM EPSG:2154 -POSTGIS_2_COORDINATE_SYSTEM EPSG:2154 -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME reload_osm_patch_from_gml -MACRO FME_VIEWER_APP fmedatainspector -# ------------------------------------------------------------------------- - -INCLUDE [ if {[info exists env(FME_TEMP)] && [file isdirectory $env(FME_TEMP)]} {set gVisualizerTemp $env(FME_TEMP)} elseif {[info exists env(TEMP)] && [file isdirectory $env(TEMP)]} {set gVisualizerTemp $env(TEMP)} elseif { $tcl_platform(platform) == "unix" } {set gVisualizerTemp "/tmp"} else {set gVisualizerTemp c:}; regsub -all {[ ,&]} {$(WORKSPACE_NAME)} {_} wsname; set gVisualizerTemp $gVisualizerTemp/${wsname}_[clock format [clock seconds] -format %H%M%S]; puts "MACRO WORKSPACE_TEMP_DIR $gVisualizerTemp"; -MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/inspector.ffs -MACRO VISUALIZER_SCHEMA_FILE $(WORKSPACE_TEMP_DIR)/inspector.fsc -MACRO VISUALIZER_CREATE_SPATIAL_INDEX YES -# ------------------------------------------------------------------------- -GML_1_DEF osm_roads_pgr_patch geometryProperty xml_geometry id xml_int64 id.xsi_nil xml_boolean osm_id xml_int64 osm_id.xsi_nil xml_boolean highway xml_buffer highway.xsi_nil xml_boolean type xml_buffer type.xsi_nil xml_boolean oneway xml_buffer oneway.xsi_nil xml_boolean ref xml_buffer ref.xsi_nil xml_boolean name_fr xml_buffer name_fr.xsi_nil xml_boolean name_br xml_buffer name_br.xsi_nil xml_boolean source xml_int64 source.xsi_nil xml_boolean target xml_int64 target.xsi_nil xml_boolean cost xml_real64 cost.xsi_nil xml_boolean reverse_cost xml_real64 reverse_cost.xsi_nil xml_boolean -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE GML GML_1::osm_roads_pgr_patch multi_reader_keyword,$(DATASET_KEYWORD_GML_1) TO FME_GENERIC ::osm_roads_pgr_patch ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * -GML_1_MERGE_DEF GML_1::osm_roads_pgr_patch EXACT osm_roads_pgr_patch -POSTGIS_1_MERGE_DEF POSTGIS_1::public.osm_roads_pgr_patch EXACT public.osm_roads_pgr_patch -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "osm_roads_pgr_patch (GML_1) Splitter" INPUT FEATURE_TYPE osm_roads_pgr_patch OUTPUT FEATURE_TYPE osm_roads_pgr_patch_GML_1_0_chjs2AzyGuo= OUTPUT FEATURE_TYPE osm_roads_pgr_patch_GML_1_1_fSuOEJvfxAU= -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.osm_roads_pgr_patch (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.osm_roads_pgr_patch -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {osm_roads_pgr_patch} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME osm_roads_pgr_patch_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE osm_roads_pgr_patch_GML_1_0_chjs2AzyGuo= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { osm_roads_pgr_patch } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME osm_roads_pgr_patch_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA gml_parent_id,varchar255,gml_parent_property,varchar255,gml_id,varchar255,geometryProperty,varchar255,id,varchar255,id.xsi_nil,varchar255,osm_id,varchar255,osm_id.xsi_nil,varchar255,highway,varchar255,highway.xsi_nil,varchar255,type,varchar255,type.xsi_nil,varchar255,oneway,varchar255,oneway.xsi_nil,varchar255,ref,varchar255,ref.xsi_nil,varchar255,name_fr,varchar255,name_fr.xsi_nil,varchar255,name_br,varchar255,name_br.xsi_nil,varchar255,source,varchar255,source.xsi_nil,varchar255,target,varchar255,target.xsi_nil,varchar255,cost,varchar255,cost.xsi_nil,varchar255,reverse_cost,varchar255,reverse_cost.xsi_nil,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC osm_roads_pgr_patch_GML_1_1_fSuOEJvfxAU= TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__public.osm_roads_pgr_patch COORDINATE_SYSTEM EPSG:2154 GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- - -FACTORY_DEF * CreationFactory FACTORY_NAME VisualizerProcessor CREATE_AT_END OUTPUT FEATURE_TYPE __NUKEME__ @TCL("if [file exists {$(WORKSPACE_TEMP_DIR)}] {set files [glob -nocomplain -directory {$(WORKSPACE_TEMP_DIR)} -tails *.ffs]; if {[llength $files] == 1} { set theFile {$(WORKSPACE_TEMP_DIR)/}; append theFile [lindex $files 0]; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -f FFS \042$theFile\042 & \175; } elseif { [llength $files] == 0 } { catch { file delete -force {$(WORKSPACE_TEMP_DIR)} }; } else { set filesNoExt {}; set lastfile {}; foreach {fileName} [lsort $files] { set fileNoExt [string trimright $fileName {.ffs}]; if [regexp {(.*)_[0-9]*$} $fileNoExt wholething fileNoExtBase] { if { $fileNoExtBase == $lastfile } { continue } }; set lastfile $fileNoExt; lappend filesNoExt $fileNoExt }; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -d {$(WORKSPACE_TEMP_DIR)} -a ffs -f FFS $filesNoExt & \175; }; }; ") -FACTORY_DEF * TeeFactory FACTORY_NAME VisualizerCleaner INPUT FEATURE_TYPE __NUKEME__ -# ------------------------------------------------------------------------- -POSTGIS_2_DEF public.osm_roads_pgr_patch postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling CREATE_IF_MISSING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO osm_id int8 highway text type text oneway text ref text name_fr text name_br text source int8 target int8 cost float8 reverse_cost float8 diff --git a/scripts/routing.sql b/scripts/routing.sql deleted file mode 100644 index 2ba928c..0000000 --- a/scripts/routing.sql +++ /dev/null @@ -1,125 +0,0 @@ - -/* -========================================================================== - - phase 2 : préparation pour le calcul d'itinéraires en appui du réseau routier OSM - -========================================================================== -*/ - --- dans la base redadeg on a chargé la couche osm_roads qui a été calculée --- à partir de données OSM - --- on efface la topologie existante -SELECT DropTopology('osm_roads_topo') ; - --- 1. création d'un schéma qui va accueillir le réseau topologique de la couche osm_roads -SELECT topology.CreateTopology('osm_roads_topo', 2154); - --- 2. ajout d'un nouvel attribut sur la table osm_roads -SELECT topology.AddTopoGeometryColumn('osm_roads_topo', 'public', 'osm_roads', 'topo_geom', 'LINESTRING'); - - --- on a donc un nouveau schéma osm_roads_topo qui contient 4 tables : edge_data, face, node, relation --- et un nouvel enregistrement dans la table topology.layer --- logiquement : c'est 1 -SELECT layer_id FROM topology.layer WHERE table_name = 'osm_roads' ; - - --- 3. on calcule le graphe topologique --- en remplissant le nouvel attribut géométrique --- le 1er chiffre est l'identifiant du layer dans la table topology.layer --- le 2e chiffre est la tolérance en mètres -UPDATE osm_roads SET topo_geom = topology.toTopoGeom(the_geom, 'osm_roads_topo', 1, 0.00001); - -/* -DO $$DECLARE r record; -BEGIN - FOR r IN SELECT * FROM osm_roads LOOP - BEGIN - UPDATE osm_roads SET topo_geom = topology.toTopoGeom(the_geom, 'osm_roads_topo', 1, 0.01); - EXCEPTION - WHEN OTHERS THEN - RAISE WARNING 'Loading of record % failed: %', r.id, SQLERRM; - END; - END LOOP; -END$$; -*/ - --- à ce stade on a un graphe topolgique dans le schema osm_roads_topo - - --- 4. remplissage de la couche routable depuis la couche d'origine et la topologie -INSERT INTO osm_roads_pgr -( SELECT - row_number() over() as id, - o.osm_id, - o.highway, - o.type, - o.oneway, - o.ref, - o.name_fr, - o.name_br, - NULL as source, - NULL as target, - NULL as cost, - NULL as reverse_cost, - e.geom as the_geom -FROM osm_roads_topo.edge e, - osm_roads_topo.relation rel, - osm_roads o -WHERE e.edge_id = rel.element_id - AND rel.topogeo_id = (o.topo_geom).id -); - --- calcul des 2 attributs de coût (= longueur) -UPDATE osm_roads_pgr SET cost = st_length(the_geom), reverse_cost = st_length(the_geom); - - --- 5. calcul du graphe routier par pgRouting -SELECT pgr_createTopology('osm_roads_pgr', 1.0); - --- vérification -SELECT pgr_analyzegraph('osm_roads_pgr', 1.0); -SELECT pgr_nodeNetwork('osm_roads_pgr', 1.0); - - --- il ne reste plus qu'à faire des calculs d'itinéraires --- test de calcul de plus court chemin -SELECT * FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM osm_roads_pgr', - 12872, 12810 -); - --- avec la géométrie -SELECT - a.seq AS id, - a.path_seq, - a.node, - a.cost, - a.agg_cost, - b.osm_id, - b.highway, - b.ref, - b.name_fr, - b.name_br, - b.the_geom -FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM osm_roads_pgr', - 12872, 12145) as a -JOIN osm_roads_pgr b -ON a.edge = b.id ; - - - --- permissions -ALTER SCHEMA osm_roads_topo OWNER TO redadeg ; -ALTER TABLE osm_roads_topo.edge_data OWNER TO redadeg ; -ALTER TABLE osm_roads_topo.face OWNER TO redadeg ; -ALTER TABLE osm_roads_topo.node OWNER TO redadeg ; -ALTER TABLE osm_roads_topo.relation OWNER TO redadeg ; -ALTER VIEW osm_roads_topo.edge OWNER TO redadeg ; -ALTER SEQUENCE osm_roads_topo.layer_id_seq OWNER TO redadeg ; -ALTER SEQUENCE osm_roads_topo.topogeo_s_1 OWNER TO redadeg ; - - diff --git a/scripts/synchronize_routing_tables.sh b/scripts/synchronize_routing_tables.sh deleted file mode 100755 index 620add5..0000000 --- a/scripts/synchronize_routing_tables.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -cd data - -# dump des tables de routage - -pg_dump --file osm_roads_pgr.sql --host localhost --port 5432 --username redadeg \ ---no-password --verbose --format=p --no-owner --section=pre-data --section=data --no-privileges --no-tablespaces --no-unlogged-table-data --no-comments \ ---table public.osm_roads_pgr redadeg - -pg_dump --file osm_roads_pgr_noded.sql --host localhost --port 5432 --username redadeg \ ---no-password --verbose --format=p --no-owner --section=pre-data --section=data --no-privileges --no-tablespaces --no-unlogged-table-data --no-comments \ ---table public.osm_roads_pgr_noded redadeg - -pg_dump --file osm_roads_pgr_vertices_pgr.sql --host localhost --port 5432 --username redadeg \ ---no-password --verbose --format=p --no-owner --section=pre-data --section=data --no-privileges --no-tablespaces --no-unlogged-table-data --no-comments \ ---table public.osm_roads_pgr_vertices_pgr redadeg - - -# on zippe -rm osm_roads_pgr.zip -zip osm_roads_pgr.zip osm_roads_pgr.sql osm_roads_pgr_noded.sql osm_roads_pgr_vertices_pgr.sql - -# on envoi sur le serveur -rsync -av --progress osm_roads_pgr.zip breizhpovh2:/data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/data/ - -# on envoie des commande pour maj les tables de routage -ssh breizhpovh2 "cd /data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/data/ ; \ -unzip osm_roads_pgr.zip ; \ -psql -U redadeg -d redadeg -c 'DROP TABLE IF EXISTS osm_roads_pgr; DROP TABLE IF EXISTS osm_roads_pgr_noded; DROP TABLE IF EXISTS osm_roads_pgr_vertices_pgr;' ; \ -psql -U redadeg -d redadeg < osm_roads_pgr.sql ; \ -psql -U redadeg -d redadeg < osm_roads_pgr_noded.sql ; \ -psql -U redadeg -d redadeg < osm_roads_pgr_vertices_pgr.sql ;\ -rm -f osm_roads_pgr.sql osm_roads_pgr_noded.sql osm_roads_pgr_vertices_pgr.sql ;" diff --git a/scripts/traitements_phase_1.py b/scripts/traitements_phase_1.py deleted file mode 100644 index 605aaea..0000000 --- a/scripts/traitements_phase_1.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import os -import configparser -import argparse -from argparse import RawTextHelpFormatter -import psycopg2 - - -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - - - -def initVariables(): - - # lecture du fichier de configuration qui contient les infos de connection aux bases de données - config = configparser.ConfigParser() - config.read('config.ini') - - # enregistrement en variables - pg_host = config['pg_redadeg']['host'] - pg_port = config['pg_redadeg']['port'] - pg_db = config['pg_redadeg']['db'] + "_" + millesime - pg_user = config['pg_redadeg']['user'] - pg_passwd = config['pg_redadeg']['passwd'] - - # chaîne de connexion Postgres - global PG_ConnString - PG_ConnString = "host="+ pg_host + " port="+ pg_port +" dbname="+ pg_db +" user="+ pg_user +" password="+ pg_passwd - #print(PG_ConnString) - - - -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - - -def main(): - - # variables globales - global millesime - global PG_ConnString - - # millesime forcé - millesime = "2022" - - initVariables() - - - # connection à la base - try: - # connexion à la base, si plante, on sort - conn = psycopg2.connect(PG_ConnString) - cursor = conn.cursor() - - except: - print( "connexion à la base impossible") - - - # déconnection de la base - try: - cursor.close() - conn.close() - except: - print("") - - - print( "") - print( " F I N") - - return - - -if __name__ == "__main__": - # execute only if run as a script - main() - - diff --git a/scripts/traitements_phase_1.sh b/scripts/traitements_phase_1.sh deleted file mode 100755 index 665a3e3..0000000 --- a/scripts/traitements_phase_1.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash - -set -e -set -u - -# argument 1 = millesime redadeg -millesime=$1 - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - -rep_scripts='/data/projets/ar_redadeg/scripts/' -echo "rep_scripts = $rep_scripts" -# variables liées au millésimes -echo "millesime de travail = $1" -rep_data=../data/$millesime -echo "rep_data = $rep_data" -echo "base de données = $DB_NAME" -echo "" - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Récupération des fichiers geojson depuis umap" - -# traitement des tracés manuels - -# on commence par supprimer la table -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "DROP TABLE IF EXISTS phase_1_trace_3857 CASCADE;" -#$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "DROP TABLE IF EXISTS phase_1_pk_vip_3857;" -echo "" - - -# on va lire le fichier de config des couches umap pour boucler -IFS="=" -while read -r line -do - layer=$line - - echo " umap layer id = $layer" - wget -q -O $rep_data/phase_1_umap_trace_$layer.geojson https://umap.openstreetmap.fr/fr/datalayer/$layer - echo " recup ok" - - # on charge dans postgis - # note : les coordonnées sont en 3857 mais la déclaration de la table = 4326 - - echo " chargement dans la couche d'import" - ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" $rep_data/phase_1_umap_trace_$layer.geojson -nln phase_1_trace_3857 -lco GEOMETRY_NAME=the_geom -explodecollections - echo " fait" - echo "" - - -# fin de la boucle de lecture des layers umap -done < $rep_data/umap_phase_1_layers.txt - - -# PK VIP -# pas besoin en 2021 -#ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" data/phase_1_umap_pk_vip.geojson -nln phase_1_pk_vip_3857 -lco GEOMETRY_NAME=the_geom -explodecollections -overwrite - - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Application des traitements SQL " -echo "" - -# on crée les tables en 3948 -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME < $rep_scripts/traitements_phase_1.sql - -echo " fait" -echo "" - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Exports " -echo "" - -echo " exports geojson" -echo "" - -# et on exporte vers Geojson -rm -f $rep_data/phase_1_pk_auto.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_1_pk_auto.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_1_pk_auto_4326 -rm -f $rep_data/phase_1_trace_4326.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_1_trace_4326.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_1_trace_4326 -# les fichiers sont ensuite tout de suite visible dans umap - -# exports supplémentaires -rm -f $rep_data/phase_1_pk_auto.xlsx -ogr2ogr -f "XLSX" $rep_data/phase_1_pk_auto.xlsx PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_1_pk_auto_4326 - -echo " fait" -echo "" - -echo "" -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " F I N traitements phase 1" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo "" diff --git a/scripts/traitements_phase_1.sql b/scripts/traitements_phase_1.sql deleted file mode 100644 index 73f2260..0000000 --- a/scripts/traitements_phase_1.sql +++ /dev/null @@ -1,81 +0,0 @@ - - -TRUNCATE phase_1_trace ; -INSERT INTO phase_1_trace - SELECT - ogc_fid, - secteur_id::int, - ordre::int, - 0 AS longueur, - ST_Transform(the_geom,2154) AS the_geom - FROM phase_1_trace_3857 - WHERE ST_LENGTH(the_geom) > 0 - ORDER BY secteur_id ASC, ordre ASC ; - --- mise à jour de la longueur 1 fois la géométrie passée en CC48 -UPDATE phase_1_trace -SET longueur = TRUNC( ST_Length(the_geom)::numeric / 1000 , 2) ; - - --- on remplit la table trace 4326 pour exporter vers umap -TRUNCATE phase_1_trace_4326 ; -INSERT INTO phase_1_trace_4326 - SELECT - t.ogc_fid, - s.nom_br AS name, - t.secteur_id::int, - t.ordre::int, - t.longueur, - ST_Transform(t.the_geom,4326) AS the_geom - FROM phase_1_trace t JOIN secteur s ON t.secteur_id = s.id - ORDER BY secteur_id ASC, ordre ASC ; - - - --- TRUNCATE phase_1_pk_vip ; --- INSERT INTO phase_1_pk_vip --- SELECT ogc_fid, name, '', ST_Transform(the_geom,2154) AS the_geom --- FROM phase_1_pk_vip_3857 ; - - - -TRUNCATE phase_1_trace_troncons ; -INSERT INTO phase_1_trace_troncons - SELECT - row_number() over() as uid, - secteur_id, - ordre, - NULL AS km, - NULL AS km_reel, - NULL AS longueur, - ST_LineSubstring(the_geom, 1000.00*n/length, - CASE - WHEN 1000.00*(n+1) < length THEN 1000.00*(n+1)/length - ELSE 1 - END) AS the_geom - FROM - (SELECT - ogc_fid, - secteur_id, - ordre, - ST_LineMerge(the_geom)::geometry(LineString,2154) AS the_geom, - ST_Length(the_geom) As length - FROM phase_1_trace - -- ce tri est le plus important - ORDER BY secteur_id ASC, ordre ASC - ) AS t - CROSS JOIN generate_series(0,10000) AS n - WHERE n*1000.00/length < 1 - ORDER BY t.secteur_id ASC, t.ordre ASC ; - --- mise à jour des attributs -UPDATE phase_1_trace_troncons -SET - longueur = - (CASE - WHEN TRUNC( ST_Length(the_geom)::numeric , 0) = 999 THEN 1000 - ELSE TRUNC( ST_Length(the_geom)::numeric , 0) - END), - km = uid -- km redadeg -; - diff --git a/scripts/traitements_phase_2.1.sql b/scripts/traitements_phase_2.1.sql deleted file mode 100644 index 7e4cf86..0000000 --- a/scripts/traitements_phase_2.1.sql +++ /dev/null @@ -1,104 +0,0 @@ -/* -========================================================================== - - phase 2 : préparation des données - -========================================================================== -*/ - --- dans la base redadeg on a chargé des données provenant de umap --- ces données sont en 3857. On va les passer en 2154 (Lambert 93). - - - - --- ici on fait une grosse requête qui va recaler les PK secteurs sur les nœuds routables --- ça insère les points de secteurs dans la table en 2154 - -TRUNCATE TABLE phase_2_pk_secteur ; - --- on fait une table de base qui contient les relations entre le point à recaler et les poins de référence --- on limite à un buffer de 25 -WITH candidates AS -( -SELECT - pk_org.id AS pk_id, - pk_org.name AS name, - pk_org.secteur_id AS secteur_id, - node.id AS node_id, - ST_Distance(pk_org.the_geom, ST_ClosestPoint(node.the_geom, pk_org.the_geom)) AS distance, - ST_Snap( - pk_org.the_geom, -- le point d'origine à recaler - ST_ClosestPoint(node.the_geom, pk_org.the_geom), -- le point le plus près dans la couche de nœuds - ST_Distance(pk_org.the_geom, ST_ClosestPoint(node.the_geom, pk_org.the_geom))* 1.01 -- dans la distance de ce plus proche point - ) AS the_geom -FROM - (SELECT id::integer, name, secteur_id, ST_Transform(the_geom,2154) AS the_geom FROM phase_2_pk_secteur_3857) AS pk_org, - (SELECT id, the_geom FROM osm_roads_pgr_vertices_pgr) AS node -WHERE -ST_INTERSECTS(node.the_geom, ST_BUFFER(ST_Transform(pk_org.the_geom,2154) ,25) ) -ORDER BY pk_org.id, ST_Distance(pk_org.the_geom, ST_ClosestPoint(node.the_geom, pk_org.the_geom)) -) --- à partir de cette table on va faire une jointure entre les PK org et les nœuds ramenés par la sous-requête -INSERT INTO phase_2_pk_secteur -SELECT - a.pk_id AS id, - a.name, - b.node_id AS pgr_node_id, - a.secteur_id::integer, - b.the_geom -FROM candidates a JOIN -( --- on fait une table qui ordonne les points d'accroche -SELECT - pk_id, node_id, - -- le rang va permettre de donner le rang de chaque rapprochement et d'en faire un critère - row_number() over (partition by pk_id order by min(distance)) AS rang, - min(distance) AS min_distance, - the_geom -FROM candidates -GROUP BY pk_id, secteur_id, node_id, the_geom -) b ON a.pk_id = b.pk_id -WHERE b.rang = 1 -GROUP BY a.pk_id, a.name, a.secteur_id, b.node_id, b.the_geom -ORDER BY a.pk_id ; - - - --- on recale également les points de nettoyage sur le tracé -TRUNCATE TABLE phase_2_point_nettoyage ; - -WITH candidates AS -( -SELECT - pt_org.ogc_fid AS pt_id, - edge.id AS edge_id, - ST_Distance(pt_org.the_geom, ST_ClosestPoint(edge.the_geom, pt_org.the_geom)) AS distance, - ST_Snap( - pt_org.the_geom, -- le point d'origine à recaler - ST_ClosestPoint(edge.the_geom, pt_org.the_geom), -- le point le plus près dans la couche de nœuds - ST_Distance(pt_org.the_geom, ST_ClosestPoint(edge.the_geom, pt_org.the_geom))* 1.01 -- dans la distance de ce plus proche point - ) AS the_geom -FROM - (SELECT ogc_fid::integer, ST_Transform(the_geom,2154) AS the_geom FROM phase_2_point_nettoyage_3857) AS pt_org, - (SELECT id, the_geom FROM osm_roads_pgr) AS edge -WHERE -ST_INTERSECTS(edge.the_geom, ST_BUFFER(ST_Transform(pt_org.the_geom,2154) ,2) ) -ORDER BY pt_org.ogc_fid, ST_Distance(pt_org.the_geom, ST_ClosestPoint(edge.the_geom, pt_org.the_geom)) -) -INSERT INTO phase_2_point_nettoyage - SELECT - nextval('phase_2_point_nettoyage_id_seq'::regclass), - pt_id, - edge_id, - distance, - the_geom - FROM candidates ; - - - - - - - - diff --git a/scripts/traitements_phase_2.2 troncons.sql b/scripts/traitements_phase_2.2 troncons.sql deleted file mode 100644 index 97132fd..0000000 --- a/scripts/traitements_phase_2.2 troncons.sql +++ /dev/null @@ -1,79 +0,0 @@ -/* -========================================================================== - - phase 2 : création de différentes données à partir du tracé routé - -========================================================================== -*/ - --- on prend le tracé routé et on fait une version simple --- 1 ligne par secteur -TRUNCATE TABLE phase_2_trace_secteur ; -WITH trace_ordered AS ( - SELECT secteur_id, (ST_Dump(the_geom)).geom AS the_geom - FROM phase_2_trace_pgr - --WHERE secteur_id = 8 - ORDER BY secteur_id, path_seq -) -INSERT INTO phase_2_trace_secteur - SELECT - secteur_id, '', '', 0, 0, - ST_COLLECT(the_geom) - --ST_UNION(the_geom) - FROM trace_ordered - GROUP BY secteur_id - ORDER BY secteur_id ; - --- mise à jour des attributs -UPDATE phase_2_trace_secteur a -SET - nom_fr = b.nom_fr, - nom_br = b.nom_br, - longueur = TRUNC( ST_Length(the_geom)::numeric , 0), - longueur_km = TRUNC( ST_Length(the_geom)::numeric / 1000 , 1) -FROM secteur b WHERE a.secteur_id = b.id ; - - -TRUNCATE phase_2_trace_troncons ; -INSERT INTO phase_2_trace_troncons - SELECT - row_number() over() as uid, - -- infos redadeg - NULL AS secteur_id, - NULL AS ordre, - NULL AS km, - NULL AS km_reel, - NULL AS longueur, - -- infos OSM - t.osm_id, t.highway, t.type, t.oneway, t.ref, t.name_fr, t.name_br, - ST_LineSubstring(the_geom, 1000.00*n/length, - CASE - WHEN 1000.00*(n+1) < length THEN 1000.00*(n+1)/length - ELSE 1 - END) AS the_geom - FROM - (SELECT - id, - osm_id, highway, "type", oneway, ref, name_fr, name_br, - ST_LineMerge(the_geom)::geometry(LineString,2154) AS the_geom, - ST_Length(the_geom) As length - FROM phase_2_trace_pgr - -- ce tri est le plus important - ORDER BY id ASC - ) AS t - CROSS JOIN generate_series(0,10000) AS n - WHERE n*1000.00/length < 1 - ORDER BY t.id ; - --- mise à jour des attributs -UPDATE phase_2_trace_troncons -SET - longueur = - (CASE - WHEN TRUNC( ST_Length(the_geom)::numeric , 0) = 999 THEN 1000 - ELSE TRUNC( ST_Length(the_geom)::numeric , 0) - END), - km = uid -- km redadeg -; - - diff --git a/scripts/traitements_phase_2.2.sql b/scripts/traitements_phase_2.2.sql deleted file mode 100644 index 0f96896..0000000 --- a/scripts/traitements_phase_2.2.sql +++ /dev/null @@ -1,69 +0,0 @@ -/* -========================================================================== - - phase 2 : création de différentes données à partir du tracé routé - -========================================================================== -*/ - --- on prend le tracé routé et on fait une version simple --- 1 ligne par secteur -TRUNCATE TABLE phase_2_trace_secteur ; -WITH trace_ordered AS ( - SELECT secteur_id, the_geom - FROM phase_2_trace_pgr - ORDER BY secteur_id, path_seq -) -INSERT INTO phase_2_trace_secteur - SELECT - secteur_id, '', '', 0, 0, - ST_CollectionExtract(ST_UNION(the_geom),2) AS the_geom - FROM trace_ordered - GROUP BY secteur_id - ORDER BY secteur_id ; - --- mise à jour des attributs -UPDATE phase_2_trace_secteur a -SET - nom_fr = b.nom_fr, - nom_br = b.nom_br, - longueur = TRUNC( ST_Length(the_geom)::numeric , 0), - longueur_km = TRUNC( ST_Length(the_geom)::numeric / 1000 , 1) -FROM secteur b WHERE a.secteur_id = b.id ; - - -/* -TRUNCATE phase_2_trace_troncons ; -INSERT INTO phase_2_trace_troncons - SELECT - row_number() over() as uid, - -- infos redadeg - NULL AS secteur_id, - NULL AS km, - NULL AS km_reel, - NULL AS longueur, - -- infos OSM - --t.osm_id, t.highway, t.type, t.oneway, t.ref, t.name_fr, t.name_br, - ST_LineSubstring(the_geom, 1000.00*n/length, - CASE - WHEN 1000.00*(n+1) < length THEN 1000.00*(n+1)/length - ELSE 1 - END) AS the_geom - FROM - ( - SELECT - secteur_id, - ST_LineMerge(the_geom)::geometry(MultiLineString,2154) AS the_geom, - ST_Length(the_geom) AS length, - ST_GeometryType(ST_LineMerge(the_geom)::geometry(MultiLineString,2154)) AS geom_type - FROM phase_2_trace_secteur - --WHERE secteur_id = 8 - --GROUP BY secteur_id - -- ce tri est le plus important - ORDER BY secteur_id ASC - ) AS t - CROSS JOIN generate_series(0,10000) AS n - WHERE n*1000.00/length < 1 - ORDER BY t.secteur_id ; -*/ - diff --git a/scripts/traitements_phase_2.sh b/scripts/traitements_phase_2.sh deleted file mode 100755 index c0c0a8b..0000000 --- a/scripts/traitements_phase_2.sh +++ /dev/null @@ -1,271 +0,0 @@ -#!/bin/bash - -set -e -set -u - -# argument 1 = millesime redadeg -millesime=$1 - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_PORT=5432 -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - -rep_scripts='/data/projets/ar_redadeg/scripts/' -echo "rep_scripts = $rep_scripts" -# variables liées au millésimes -echo "millesime de travail = $1" -rep_data=../data/$millesime -echo "rep_data = $rep_data" -echo "base de données = $DB_NAME" -echo "" - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# on récupère les couches geojson depuis umap - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Récupération des fichiers geojson depuis umap" - -# les couches PK -# PK début - fin de secteur -curl -sS http://umap.openstreetmap.fr/fr/datalayer/817220/ > $rep_data/phase_2_umap_pk_secteur.geojson -# PK techniques -curl -sS http://umap.openstreetmap.fr/fr/datalayer/817221/ > $rep_data/phase_2_umap_pk_technique.geojson -# PK manuels -curl -sS http://umap.openstreetmap.fr/fr/datalayer/817222/ > $rep_data/phase_2_umap_pk_manuel.geojson -# couche de points de nettoyage -curl -sS http://umap.openstreetmap.fr/fr/datalayer/861810/ > $rep_data/phase_2_umap_point_nettoyage.geojson - -echo " fait" -echo "" - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# on les charge dans postgis -# après avoir supprimé les tables - -# note : les coordonnées sont en 3857 mais la déclaration de la table = 4326 - -echo " chargement des fichiers dans la BD" -echo "" - -echo "phase_2_pk_secteur_3857" -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c "DROP TABLE IF EXISTS phase_2_pk_secteur_3857 CASCADE;" -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" $rep_data/phase_2_umap_pk_secteur.geojson -nln phase_2_pk_secteur_3857 -lco GEOMETRY_NAME=the_geom -explodecollections -overwrite - -echo "phase_2_point_nettoyage_3857" -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c "DROP TABLE IF EXISTS phase_2_point_nettoyage_3857 CASCADE;" -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" $rep_data/phase_2_umap_point_nettoyage.geojson -nln phase_2_point_nettoyage_3857 -lco GEOMETRY_NAME=the_geom -explodecollections -overwrite - -echo " fait" -echo "" - -# on crée les tables en 3948 -# et bien d'autres choses : -# - recalage des PK secteurs sur un nœud du réseau routable -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Application des traitements SQL 2.1" -echo "" - -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME < traitements_phase_2.1.sql - -echo " fait" -echo "" - - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# ici on va calculer un itinéraire pour chaque secteur -# en utilisant les PK de début (ou fin) de chaque secteur - -# https://www.manniwood.com/postgresql_and_bash_stuff/index.html - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Calcul des itinéraires (pgrouting)" -echo "" - -# on commence par vider la table qui contiendra les calculs d'itinéraires -echo "vidage de la couche de routage" -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c "TRUNCATE TABLE phase_2_trace_pgr ;" -echo " fait" - -# ensuite : on supprime les tronçons ciblés par la couche de points de nettoyage -# AVANT de calculer les itinéraires -echo "nettoyage de la couche de routage par les points ciblés" -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c "UPDATE osm_roads_pgr SET cost = 1000000, reverse_cost = 1000000 WHERE id IN (SELECT r.id FROM osm_roads_pgr r JOIN phase_2_point_nettoyage p ON r.id = p.edge_id);" -echo " fait" -echo "" - - -# on fait la requête qui va donner une liste de PK de secteurs -# et on calcule un itinéraire entre le PK de début et le PK suivant - -# on va utiliser un compteur pour pouvoir sauter un sous-secteur à un autre -counter=1 -# autre variables de contrôle -longueur_totale=0 -longueur_inseree=0 - - -PGPASSWORD=$DB_PASSWD $PSQL -X -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME \ - -c "SELECT pk.id, s.id AS secteur_id, replace(s.nom_fr,' ','') AS nom_fr, replace(s.nom_br,' ','') AS nom_br, pk.pgr_node_id, replace(pk.name,' ','_') AS name -FROM phase_2_pk_secteur pk JOIN secteur s ON pk.secteur_id = s.id -ORDER BY pk.id ;" \ - --single-transaction \ - --set AUTOCOMMIT=off \ - --set ON_ERROR_STOP=on \ - --no-align \ - -t \ - --field-separator ' ' \ - --quiet | while read -a Record ; do - - # ici commence la boucle sur les PK de secteurs - echo "----------------------------" - - #IFS="|" pour forcer un délimiteur mais ne fonctionne pas : les espaces sont compris comme des séparateurs - # alors la requête supprime les espaces. TODO - - # le premier PK = PK de début - pk_id=${Record[0]} - secteur_id=${Record[1]} - secteur_nom_fr="${Record[2]}" - secteur_nom_br="${Record[3]}" - pk_id_start=${Record[4]} - troncon_name=${Record[5]} - - echo " $secteur_id | $secteur_nom_fr / $secteur_nom_br" - echo " tronçon : $troncon_name" - echo " PK ID = $pk_id" - echo " start node = $pk_id_start" - - # on fait une requête pour récupérer l'id du nœud de routage de fin - # ce nœud = le PK de début du secteur suivant - read pk_id_end <<< $(PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME --no-align -t --quiet \ - -c "SELECT pgr_node_id FROM phase_2_pk_secteur ORDER BY id OFFSET $counter LIMIT 1 ;" ) - - echo " end node = $pk_id_end" - - - # on teste si on récupère qqch sinon ça veurt dire qu'on a pas de nœud de fin donc impossible de calculer un itinéraire - if [[ -n "$pk_id_end" ]]; - then - echo " calcul de l'itinéraire" - - PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME -c \ - "INSERT INTO phase_2_trace_pgr - SELECT - $secteur_id AS secteur_id, - -- info de routage - a.path_seq, - a.node, - a.cost, - a.agg_cost, - -- infos OSM - b.osm_id, - b.highway, - b.\"type\", - b.oneway, - b.ref, - CASE - WHEN b.name_fr IS NULL AND b.ref IS NOT NULL THEN b.ref - ELSE b.name_fr - END AS name_fr, - CASE - WHEN b.name_br IS NULL AND b.name_fr IS NULL AND b.ref IS NOT NULL THEN b.ref - WHEN b.name_br IS NULL AND b.name_fr IS NOT NULL THEN '# da dreiñ e brezhoneg #' - ELSE b.name_br - END AS name_br, - b.the_geom - FROM pgr_dijkstra( - 'SELECT id, source, target, cost, reverse_cost FROM osm_roads_pgr', $pk_id_start, $pk_id_end) as a - JOIN osm_roads_pgr b ON a.edge = b.id ;" >> /dev/null - - # on fait une requête pour voir la longueur insérée - # en fait : la longueur totale - la longueur totale lors du précédent calcul - read longueur_base <<< $(PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME --no-align -t --quiet \ - -c "SELECT trunc(SUM(ST_Length(the_geom))/1000) as longueur_totale FROM phase_2_trace_pgr ;" ) - longueur_inseree=$(($longueur_base-$longueur_totale)) - longueur_totale=$longueur_base - - # une alerte si 0 km insérés - if [ $longueur_inseree -eq 0 ] ; - then - echo "" - echo " E R R E U R !!!!!!!!" - echo "" - else - echo " fait : $longueur_inseree km (total = $longueur_totale km)" - fi - - else - echo "" - echo " E R R E U R !!!!!!!!" - echo " impossible de calculer un itinéraire pour ce secteur" - echo "" - fi - - - # fin de la boucle - # on incrémente le compteur - ((counter++)) - echo "" - -done - -echo " Calcul des itinéraires terminé" -echo "" - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# on applique maintenant des requêtes SQL de création des données dérivées des données de routage - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Application des traitements SQL 2.2" -echo "" - -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -p $DB_PORT -U $DB_USER -d $DB_NAME < traitements_phase_2.2.sql - - - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# et on exporte en geojson pour umap - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Exports et upload vers le serveur de diffusion" -echo "" - -echo " exports geojson" -echo "" - -rm -f $rep_data/phase_2_pk_secteur.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_2_pk_secteur.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_2_pk_secteur_4326 -rm -f $rep_data/phase_2_trace_pgr.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_2_trace_pgr.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_2_trace_pgr_4326 -rm -f $rep_data/phase_2_trace_secteur.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_2_trace_secteur.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_2_trace_secteur_4326 -# les fichiers sont ensuite tout de suite visible dans umap - - -# exports supplémentaires -echo " exports supplémentaires" -echo "" - -rm -f $rep_data/phase_2_tdb.xlsx -ogr2ogr -f "XLSX" $rep_data/phase_2_tdb.xlsx PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_2_tdb -rm -f $rep_data/phase_2_tdb.csv -ogr2ogr -f "CSV" $rep_data/phase_2_tdb.csv PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_2_tdb - -echo " fait" -echo "" - - -echo "" -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " F I N traitements phase 2" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo "" diff --git a/scripts/traitements_phase_3.sh b/scripts/traitements_phase_3.sh deleted file mode 100755 index 59534c4..0000000 --- a/scripts/traitements_phase_3.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash - -set -e -set -u - -# argument 1 = millesime redadeg -millesime=$1 - -# linux -#PSQL=/usr/bin/psql -# mac via brew -PSQL=/usr/local/bin/psql - -DB_HOST=localhost -DB_PORT=55432 -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - -# server bed110 -#rep_scripts='/data/projets/ar_redadeg/scripts/' -# mac -rep_scripts='/Volumes/ker/mael/projets/osm_bzh/github/ar_redadeg/scripts' - -echo "rep_scripts = $rep_scripts" -# variables liées au millésimes -echo "millesime de travail = $1" -rep_data=../data/$millesime -echo "rep_data = $rep_data" -echo "base de données = $DB_NAME sur $DB_HOST:$DB_PORT" -echo "" - -exit 1 - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Création des données phase 3" -echo "" - -# création des PK auto par découpage des tronçons de la phase 2 -/Library/FME/2021.0/fme traitements_phase_3_decoupage.fmw - -# en sortie on obtient : -# phase_3_pk_auto = couche de points -# phase_3_pk_sens_verif = couche de ligne direct PK à PK - - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# et on exporte en geojson pour umap - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Exports et upload vers le serveur de diffusion" -echo "" - -echo " exports geojson" -echo "" - -rm $rep_data/phase_3_pk_auto.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_3_pk_auto.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_pk_auto_4326 -rm $rep_data/phase_3_pk_sens_verif.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_3_pk_sens_verif.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_pk_sens_verif_4326 -rm $rep_data/phase_3_trace_troncons.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_3_trace_troncons.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_trace_troncons_4326 -rm $rep_data/phase_3_trace_secteurs.geojson -ogr2ogr -f "GeoJSON" $rep_data/phase_3_trace_secteurs.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASSWD dbname=$DB_NAME" phase_3_trace_secteurs_4326 - -echo " fait" -echo "" -echo " upload" -echo "" - -# upload -rsync -av -z $rep_data/phase_3_*.geojson bed100.bedniverel.bzh:/data/projets/ar_redadeg/data/$millesime/ - -echo " fait" -echo "" - -echo "" -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " F I N traitements phase 3" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo "" diff --git a/scripts/traitements_phase_3_decoupage v1 2018.fmw b/scripts/traitements_phase_3_decoupage v1 2018.fmw deleted file mode 100644 index 5db98e0..0000000 --- a/scripts/traitements_phase_3_decoupage v1 2018.fmw +++ /dev/null @@ -1,7213 +0,0 @@ -#! -#! redadeg" -# --SourceDataset_POSTGRES_1 "breizhpolenovoredadeg" -# -#! ATTR_TYPE_ENCODING="SDF" -#! BEGIN_PYTHON="" -#! BEGIN_TCL="" -#! CATEGORY="" -#! DESCRIPTION="" -#! DESTINATION="NONE" -#! DESTINATION_ROUTING_FILE="" -#! DOC_EXTENTS="21236.7 5596.82" -#! DOC_TOP_LEFT="-1318.14 -5797.88" -#! END_PYTHON="" -#! END_TCL="" -#! EXPLICIT_BOOKMARK_ORDER="false" -#! FME_BUILD_NUM="18592" -#! FME_DOCUMENT_GUID="a765a77e-3d6c-4d9c-984e-a588ef5266a3" -#! FME_DOCUMENT_PRIORGUID="ec48362c-d521-47d4-940c-d9501b244329,f59eeb9d-9e2e-4d0f-a58d-ec36bc84549d,2d964e41-f289-429b-ad23-e76694afd136,fa267cff-6542-464f-b818-7383bf82218b,c5393078-3bfe-435c-871d-8c0cd85ad320,3671863a-0eef-457e-b791-f72d539427ee,7a946f52-0947-47a5-ae43-82ec7f322a14,3085a070-9212-46fa-ab13-aa63ad2522b9,199dc742-91b7-476d-b40d-e28dc2109970,ccfd3317-e976-4fda-9a2f-f0f23014cffd,00bed0b1-fca5-4fcc-99dc-38c81c44c83d,ff84f515-2021-41b9-8b65-41e33e1e10b6,b211949b-9352-4917-9d4c-04bfaafeb151,d02347ab-04ce-4d70-bc0e-3537001ba0f5,a102f979-26fd-49c3-b6af-ce02fb816c93" -#! FME_GEOMETRY_HANDLING="Enhanced" -#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" -#! FME_REPROJECTION_ENGINE="FME" -#! FME_SERVER_SERVICES="" -#! FME_STROKE_MAX_DEVIATION="0" -#! HISTORY="" -#! IGNORE_READER_FAILURE="No" -#! LAST_SAVE_BUILD="FME(R) 2018.1.2.1 (20190319 - Build 18592 - macosx)" -#! LAST_SAVE_DATE="2020-02-15T11:55:21" -#! LOG_FILE="" -#! LOG_MAX_RECORDED_FEATURES="200" -#! MARKDOWN_DESCRIPTION="" -#! MARKDOWN_USAGE="" -#! MAX_LOG_FEATURES="200" -#! MULTI_WRITER_DATASET_ORDER="BY_ID" -#! PASSWORD="" -#! PYTHON_COMPATIBILITY="36" -#! REDIRECT_TERMINATORS="NONE" -#! SHOW_ANNOTATIONS="true" -#! SHOW_INFO_NODES="true" -#! SOURCE="NONE" -#! SOURCE_ROUTING_FILE="" -#! TERMINATE_REJECTED="NO" -#! TITLE="" -#! USAGE="" -#! USE_MARKDOWN="" -#! VIEW_POSITION="14956.3 -2649.46" -#! WARN_INVALID_XFORM_PARAM="Yes" -#! WORKSPACE_VERSION="1" -#! ZOOM_SCALE="89" -#! > -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 36 -GUI IGNORE POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_METHOD_POSTGIS_1,POSTGIS_IN_ADVANCED_POSTGIS_1,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1,POSTGIS_IN_BEGIN_SQL_POSTGIS_1,POSTGIS_IN_END_SQL_POSTGIS_1,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1,POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1,POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1,POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1,POSTGRES_IN_ADVANCED_POSTGRES_1,POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1,POSTGRES_IN_BEGIN_SQL_POSTGRES_1,POSTGRES_IN_END_SQL_POSTGRES_1,POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1,DestDataset_POSTGIS_2,POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2,POSTGIS_OUT_ADVANCED_POSTGIS_2,POSTGIS_OUT_BULK_COPY_POSTGIS_2,POSTGIS_OUT_START_TRANSACTION_POSTGIS_2,POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2,POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2,POSTGIS_OUT_BEGIN_SQL_POSTGIS_2,POSTGIS_OUT_END_SQL_POSTGIS_2,DestDataset_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1,GEOJSON_OUT_WRITE_BOM_GEOJSON_1,GEOJSON_OUT_STRICT_SPEC_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1,GEOJSON_OUT_INDENT_SIZE_GEOJSON_1,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1,DestDataset_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2,GEOJSON_OUT_WRITE_BOM_GEOJSON_2,GEOJSON_OUT_STRICT_SPEC_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2,GEOJSON_OUT_INDENT_SIZE_GEOJSON_2,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2,DestDataset_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3,GEOJSON_OUT_WRITE_BOM_GEOJSON_3,GEOJSON_OUT_STRICT_SPEC_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3,GEOJSON_OUT_INDENT_SIZE_GEOJSON_3,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 -DEFAULT_MACRO DestDataset_GEOJSON $(FME_MF_DIR)data/phase_3_trace_secteurs.geojson -GUI FILENAME DestDataset_GEOJSON GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO DestDataset_GEOJSON_5 $(FME_MF_DIR)data/phase_3_trace_troncons.geojson -GUI FILENAME DestDataset_GEOJSON_5 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO DestDataset_GEOJSON_4 $(FME_MF_DIR)data/phase_3_pk_auto.geojson -GUI FILENAME DestDataset_GEOJSON_4 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO SourceDataset_POSTGIS_1 breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FAMILY:PostgreSQL%FMT:POSTGRES Connection: -DEFAULT_MACRO SourceDataset_POSTGRES_1 breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGRES_1 FAMILY:PostgreSQL%FMT:POSTGRES Connection: -DEFAULT_MACRO START 13 -GUI IGNORE OPTIONAL INT START Count Start: -DEFAULT_MACRO DestDataset_POSTGIS breizhpolenovoredadeg -GUI IGNORE OPTIONAL NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -INCLUDE [ if {{$(DestDataset_GEOJSON)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_GEOJSON_5)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON_5' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_GEOJSON_4)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON_4' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGIS_1)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS_1' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGRES_1)} == {}} { puts_real {Parameter 'SourceDataset_POSTGRES_1' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -MULTI_READER_TYPE{0} POSTGIS -MULTI_READER_KEYWORD{0} POSTGIS_1 -MULTI_READER_GEN_DIRECTIVES{0} CLIP_TO_ENVELOPE,NO,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,SEARCH_ENVELOPE_MINX,0,SEARCH_ENVELOPE_MAXY,0,SEARCH_ENVELOPE_MINY,0,SEARCH_METHOD,MBR_OVERLAPS,SCHEMAS_FOR_TABLE_LISTING,public,EXPOSE_ATTRS_GROUP,,ADVANCED,,FEATURES_PER_FETCH,10000,USER_NAME,redadeg,WHERE_CLAUSE,,USE_SEARCH_ENVELOPE,NO,USE_TRUE_POSTGIS_TYPES,yes,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,HOST,192.168.56.131,PORT,5432,BEGIN_SQL,,DISABLE_COLLECTION_SPLITTING,yes,READ_TIME_WITH_TIMEZONE,Yes,POSTGIS_EXPOSE_FORMAT_ATTRS,,SEARCH_ENVELOPE_MAXX,0,END_SQL,,_MERGE_SCHEMAS,YES,TABLELIST,public.phase_2_trace_pgr -MULTI_READER_TYPE{1} POSTGRES -MULTI_READER_KEYWORD{1} POSTGRES_1 -MULTI_READER_GEN_DIRECTIVES{1} EXPOSE_ATTRS_GROUP,,POSTGRES_EXPOSE_FORMAT_ATTRS,,TABLELIST,public.secteur,WHERE_CLAUSE,,_MERGE_SCHEMAS,YES,SCHEMAS_FOR_TABLE_LISTING,public,HOST,192.168.56.131,FEATURES_PER_FETCH,10000,READ_TIME_WITH_TIMEZONE,Yes,ADVANCED,,END_SQL,,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,BEGIN_SQL,,PORT,5432,USER_NAME,redadeg -WRITER_TYPE MULTI_WRITER -MULTI_WRITER_DATASET_ORDER BY_ID -MULTI_WRITER_FIRST_WRITER_ID 0 -MULTI_WRITER_TYPE{0} POSTGIS -MULTI_WRITER_KEYWORD{0} POSTGIS_2 -MULTI_WRITER_TYPE{1} GEOJSON -MULTI_WRITER_KEYWORD{1} GEOJSON_1 -MULTI_WRITER_TYPE{2} GEOJSON -MULTI_WRITER_KEYWORD{2} GEOJSON_2 -MULTI_WRITER_TYPE{3} GEOJSON -MULTI_WRITER_KEYWORD{3} GEOJSON_3 -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset_POSTGIS_1) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FAMILY:PostgreSQL Connection: -POSTGIS_1_DATASET "$(SourceDataset_POSTGIS_1)" -# The dataset this mapping file was generated from was: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1 Yes -POSTGIS_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1 Yes -POSTGIS_1_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1 yes -POSTGIS_1_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1 yes -POSTGIS_1_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 -POSTGIS_1_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1 -POSTGIS_1_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBR_OVERLAPS -POSTGIS_1_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_1)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_1 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1%POSTGIS_IN_BEGIN_SQL_POSTGIS_1%POSTGIS_IN_END_SQL_POSTGIS_1 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 10000 -POSTGIS_1_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_1 -POSTGIS_1_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_1 -POSTGIS_1_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1 DEFLINE_ATTRS -POSTGIS_1_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1)" -# ============================================================================ -POSTGIS_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 public -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Schemas for Table Listing: -POSTGIS_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1) -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGRES_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGRES POSTGRES_1 -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGRES_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGRES POSTGRES_1 -DEFAULT_MACRO SourceDataset_POSTGRES_1 $(SourceDataset_POSTGRES_1) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGRES_1 FAMILY:PostgreSQL Connection: -POSTGRES_1_DATASET "$(SourceDataset_POSTGRES_1)" -# The dataset this mapping file was generated from was: -DEFAULT_MACRO POSTGRES_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGRES_1 Yes -POSTGRES_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGRES_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_READ_TIME_WITH_TIMEZONE_POSTGRES_1 Yes -POSTGRES_1_READ_TIME_WITH_TIMEZONE "$(POSTGRES_IN_READ_TIME_WITH_TIMEZONE_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1 POSTGRES_IN_NAMED_CONNECTION%POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 Database Connection -DEFAULT_MACRO POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1 POSTGRES_IN_TABLELIST%POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 Constraints -DEFAULT_MACRO POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 -POSTGRES_1_WHERE_CLAUSE "$(POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 MODE,WHERE;FORMAT,POSTGRES WHERE Clause: -DEFAULT_MACRO POSTGRES_IN_EXPOSE_ATTRS_GROUP_POSTGRES_1 -POSTGRES_1_EXPOSE_ATTRS_GROUP "$(POSTGRES_IN_EXPOSE_ATTRS_GROUP_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_ADVANCED_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_ADVANCED_POSTGRES_1 POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1%POSTGRES_IN_BEGIN_SQL_POSTGRES_1%POSTGRES_IN_END_SQL_POSTGRES_1 Advanced -DEFAULT_MACRO POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1 10000 -POSTGRES_1_FEATURES_PER_FETCH "$(POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1)" -GUI FLOAT POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGRES_IN_BEGIN_SQL_POSTGRES_1 -POSTGRES_1_BEGIN_SQL "$(POSTGRES_IN_BEGIN_SQL_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_BEGIN_SQL_POSTGRES_1 MODE,SQL;FORMAT,POSTGRES SQL To Run Before Read -DEFAULT_MACRO POSTGRES_IN_END_SQL_POSTGRES_1 -POSTGRES_1_END_SQL "$(POSTGRES_IN_END_SQL_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_END_SQL_POSTGRES_1 MODE,SQL;FORMAT,POSTGRES SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGRES_IN_ATTRIBUTE_READING_POSTGRES_1 DEFLINE_ATTRS -POSTGRES_1_ATTRIBUTE_READING "$(POSTGRES_IN_ATTRIBUTE_READING_POSTGRES_1)" -# ============================================================================ -POSTGRES_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 public -GUI OPTIONAL TEXT POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 Schemas for Table Listing: -POSTGRES_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1) -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_2" -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS_2 FMT:POSTGIS Connection: -POSTGIS_2_PLUGIN_MAX_CHANNELS 1 -DEFAULT_MACRO POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2 Yes -POSTGIS_2_STRICT_TEMPORAL_TYPE_HANDLING "$(POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 POSTGIS_OUT_NAMED_CONNECTION Database Connection -# ============================================================================ -# Write geometry (planar) or geography (geodetic) column -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2 geometry -POSTGIS_2_SPATIAL_COLUMN_TYPE "$(POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2)" -# ============================================================================ -# Default spatial column name -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2 geom -POSTGIS_2_SPATIAL_COLUMN_NAME "$(POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2 yes -POSTGIS_2_GENERIC_GEOMETRY "$(POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2 FEATURE_TYPE -POSTGIS_2_COORDINATE_SYSTEM_GRANULARITY "$(POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_ADVANCED_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_ADVANCED_POSTGIS_2 POSTGIS_OUT_BULK_COPY_POSTGIS_2%POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2%POSTGIS_OUT_START_TRANSACTION_POSTGIS_2%POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2%POSTGIS_OUT_BEGIN_SQL_POSTGIS_2%POSTGIS_OUT_END_SQL_POSTGIS_2 Advanced -DEFAULT_MACRO POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES -POSTGIS_2_BULK_COPY "$(POSTGIS_OUT_BULK_COPY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES%NO Bulk Insert -DEFAULT_MACRO POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 0 -POSTGIS_2_START_TRANSACTION "$(POSTGIS_OUT_START_TRANSACTION_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 Starting Feature: -DEFAULT_MACRO POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 1000 -POSTGIS_2_TRANSACTION_INTERVAL "$(POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 Features Per Transaction -DEFAULT_MACRO POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 NO -POSTGIS_2_INSERT_TEXT_GEOMETRY "$(POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 YES%NO Insert WKT -DEFAULT_MACRO POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 -POSTGIS_2_BEGIN_SQL "$(POSTGIS_OUT_BEGIN_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Write -DEFAULT_MACRO POSTGIS_OUT_END_SQL_POSTGIS_2 -POSTGIS_2_END_SQL "$(POSTGIS_OUT_END_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_END_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run After Write -# ============================================================================ -POSTGIS_2_GENERATE_FME_BUILD_NUM 18592 -POSTGIS_2_DATASET "$(DestDataset_POSTGIS_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_1" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_1 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_1 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_1 -DEFAULT_MACRO DestDataset_GEOJSON_1 $(DestDataset_GEOJSON) -GUI FILENAME DestDataset_GEOJSON_1 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1%GEOJSON_OUT_WRITE_BOM_GEOJSON_1%GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1 UTF-8 -GEOJSON_1_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_1 No -GEOJSON_1_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_1 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Yes -GEOJSON_1_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1%GEOJSON_OUT_INDENT_SIZE_GEOJSON_1%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1 YES -GEOJSON_1_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 0 -GEOJSON_1_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 10 -GEOJSON_1_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1 Yes -GEOJSON_1_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Yes -GEOJSON_1_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 -GEOJSON_1_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_1 Yes -GEOJSON_1_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_1)" -# ============================================================================ -GEOJSON_1_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_1_DATASET "$(DestDataset_GEOJSON_1)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_2" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_2 -DEFAULT_MACRO DestDataset_GEOJSON_2 $(DestDataset_GEOJSON_5) -GUI FILENAME DestDataset_GEOJSON_2 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2%GEOJSON_OUT_WRITE_BOM_GEOJSON_2%GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2 UTF-8 -GEOJSON_2_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_2 No -GEOJSON_2_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_2 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Yes -GEOJSON_2_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2%GEOJSON_OUT_INDENT_SIZE_GEOJSON_2%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2 YES -GEOJSON_2_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 0 -GEOJSON_2_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 10 -GEOJSON_2_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2 Yes -GEOJSON_2_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Yes -GEOJSON_2_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 -GEOJSON_2_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_2 Yes -GEOJSON_2_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_2)" -# ============================================================================ -GEOJSON_2_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_2_DATASET "$(DestDataset_GEOJSON_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_3" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_3 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_3 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_3 -DEFAULT_MACRO DestDataset_GEOJSON_3 $(DestDataset_GEOJSON_4) -GUI FILENAME DestDataset_GEOJSON_3 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3%GEOJSON_OUT_WRITE_BOM_GEOJSON_3%GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3 UTF-8 -GEOJSON_3_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_3 No -GEOJSON_3_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_3 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Yes -GEOJSON_3_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3%GEOJSON_OUT_INDENT_SIZE_GEOJSON_3%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3 YES -GEOJSON_3_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 0 -GEOJSON_3_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 10 -GEOJSON_3_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3 Yes -GEOJSON_3_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Yes -GEOJSON_3_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 -GEOJSON_3_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_3 Yes -GEOJSON_3_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_3)" -# ============================================================================ -GEOJSON_3_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_3_DATASET "$(DestDataset_GEOJSON_3)" -#! END_DEST_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)traitements_phase_3_decoupage.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_1 POSTGIS_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGRES_1 POSTGRES_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_2 POSTGIS_2 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_1 GEOJSON_1 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_2 GEOJSON_2 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_3 GEOJSON_3 -# ------------------------------------------------------------------------- - -POSTGIS_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGRES_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_2_COORDINATE_SYSTEM EPSG:2154 -GEOJSON_1_COORDINATE_SYSTEM EPSG:4326 -GEOJSON_2_COORDINATE_SYSTEM EPSG:4326 -GEOJSON_3_COORDINATE_SYSTEM EPSG:4326 -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME traitements_phase_3_decoupage -MACRO FME_VIEWER_APP fmedatainspector -# ------------------------------------------------------------------------- - -INCLUDE [ if {[info exists env(FME_TEMP)] && [file isdirectory $env(FME_TEMP)]} {set gVisualizerTemp $env(FME_TEMP)} elseif {[info exists env(TEMP)] && [file isdirectory $env(TEMP)]} {set gVisualizerTemp $env(TEMP)} elseif { $tcl_platform(platform) == "unix" } {set gVisualizerTemp "/tmp"} else {set gVisualizerTemp c:}; regsub -all {[ ,&]} {$(WORKSPACE_NAME)} {_} wsname; set gVisualizerTemp $gVisualizerTemp/${wsname}_[clock format [clock seconds] -format %H%M%S]; puts "MACRO WORKSPACE_TEMP_DIR $gVisualizerTemp"; -MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/inspector.ffs -MACRO VISUALIZER_SCHEMA_FILE $(WORKSPACE_TEMP_DIR)/inspector.fsc -MACRO VISUALIZER_CREATE_SPATIAL_INDEX YES -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE POSTGIS POSTGIS_1::public.phase_2_trace_pgr multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.phase_2_trace_pgr ALIAS_GEOMETRY ROUTE POSTGIS POSTGIS_1::public.v_osm_municipalities multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.v_osm_municipalities ALIAS_GEOMETRY ROUTE POSTGRES POSTGRES_1::public.secteur multi_reader_keyword,$(DATASET_KEYWORD_POSTGRES_1) TO FME_GENERIC ::public.secteur ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_2_trace_pgr EXACT public.phase_2_trace_pgr DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,secteur_id,int4,path_seq,int8,node,int8,cost,float8,agg_cost,float8,osm_id,int8,highway,text,type,text,oneway,text,ref,text,name_fr,text,name_br,text -POSTGIS_1_MERGE_DEF POSTGIS_1::public.v_osm_municipalities EXACT public.v_osm_municipalities DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,nom,varchar80,name_br,text,admincode,text,postcode,text,gid,int4,insee,varchar80,wikipedia,varchar80,surf_ha,numeric1000500,osm_id,int4,type,text,admin_level,int2,name,text,source_name_br,text,wikidata,text,x,numeric207,y,numeric207 -POSTGRES_1_MERGE_DEF POSTGRES_1::public.secteur EXACT public.secteur DEFLINE postgres_type,postgres_none,postgres_sql_where_clause,,postgres_sql_statement,,id,int4,nom_br,text,nom_fr,text,objectif_km,int4,km_redadeg,int4 -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.v_osm_municipalities (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.v_osm_municipalities OUTPUT FEATURE_TYPE public.v_osm_municipalities_POSTGIS_1_0_7fbaUlQ+SwI= OUTPUT FEATURE_TYPE public.v_osm_municipalities_POSTGIS_1_1_RFUJ57Nvhpc= -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_2_trace_pgr (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.phase_2_trace_pgr OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_0_lZ0XqLzCYmQ= OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_1_dRsdNGVAD0c= OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_2_aDqWD43/C5s= -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.secteur (POSTGRES_1) Splitter" INPUT FEATURE_TYPE public.secteur OUTPUT FEATURE_TYPE public.secteur_POSTGRES_1 -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME BulkAttributeRenamer_2 INPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_2_aDqWD43/C5s= OUTPUT { FEATURE_TYPE BulkAttributeRenamer_2_OUTPUT @RenameAttributes(PATTERN_REPLACE, ADDPREFIX, , "", "way_", "", "", "-_", "RENAME", "NONFME") } -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "0_phase_2_trace_pgr (Disabled) Nuker" INPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_1_dRsdNGVAD0c= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} ArcFactory FACTORY_NAME LineCombiner INPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_0_lZ0XqLzCYmQ= END_NODED PRESERVE_ORIENTATION no DEAGGREGATE_GEOMETRY Deaggregate CLOSE_LOOPS yes ACCUMULATE_ATTRIBUTES ONE LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE DIRECTION_NAME "" LINES_AS_SEGMENTS Yes CONSIDER_NODE_ELEVATION NO CONNECT_Z_MODE IGNORE_Z BREAK_CONNECTION_ATTRIBUTES { secteur_id } BREAK_CONNECTION_ACROSS_SETS No OUTPUT LINE FEATURE_TYPE LineCombiner_LINE -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeKeeper_2_c5f5c0f6_2ba4_4386_9071_49576ad956b12_LIST_EXP "; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeKeeper_2 INPUT FEATURE_TYPE LineCombiner_LINE OUTPUT { FEATURE_TYPE AttributeKeeper_2_OUTPUT @KeepAttributes(fme_encoded,objectif_km,km_redadeg,secteur_id,fme_pcre_match,"^fme_$(AttributeKeeper_2_c5f5c0f6_2ba4_4386_9071_49576ad956b12_LIST_EXP)") } -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "public.v_osm_municipalities (Disabled) Nuker" INPUT FEATURE_TYPE public.v_osm_municipalities_POSTGIS_1_1_RFUJ57Nvhpc= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME BulkAttributeRenamer INPUT FEATURE_TYPE public.v_osm_municipalities_POSTGIS_1_0_7fbaUlQ+SwI= OUTPUT { FEATURE_TYPE BulkAttributeRenamer_OUTPUT @RenameAttributes(PATTERN_REPLACE, ADDPREFIX, , "", "municipality_", "", "", "-_", "RENAME", "NONFME") } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeRenamer_2 INPUT FEATURE_TYPE public.secteur_POSTGRES_1 ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "id" "secteur_id" "RENAME_SET_DEFAULT" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeRenamer_2 OUTPUT Splitter" INPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT_0_XZPnkgk0+40= OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT_1_/5K/VQuHWx4= -# ------------------------------------------------------------------------- -INCLUDE [if { {ATTRIBUTES} == {ATTRIBUTES} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO ATTRIBUTES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] -FACTORY_DEF {*} ReferenceFactory FACTORY_NAME FeatureMerger_2 INPUT REFERENCER FEATURE_TYPE AttributeKeeper_2_OUTPUT INPUT REFERENCEE FEATURE_TYPE AttributeRenamer_2_OUTPUT_1_/5K/VQuHWx4= REFERENCE_INFO $(FeatureMerger_2_REFERENCE_INFO) REFERENCE_TABLE @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger_2) @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger_2) AUTO ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "REQUESTOR_IF_CONFLICT" IGNORE_NULLS "No" HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES NO REFERENCEES_FIRST No REJECT_INVALID_GEOM YES CLEANING_TOLERANCE OUTPUT COMPLETE FEATURE_TYPE FeatureMerger_2_MERGED -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter_4 INPUT FEATURE_TYPE FeatureMerger_2_MERGED SORT_BY secteur_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_4_SORTED -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter_4 SORTED Splitter" INPUT FEATURE_TYPE Sorter_4_SORTED OUTPUT FEATURE_TYPE Sorter_4_SORTED_0_bGs2+JFzNGU= OUTPUT FEATURE_TYPE Sorter_4_SORTED_1_xZN7XGJzQYs= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Input Input Collector" INPUT FEATURE_TYPE Sorter_4_SORTED_1_xZN7XGJzQYs= OUTPUT FEATURE_TYPE IterativeSnipper_Input -MACRO IterativeSnipper_WORKSPACE_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_XFORMER_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_TRANSFORMER_GROUP -MACRO $(IterativeSnipper_WORKSPACE_NAME)___COMPOUND_PARAMETERS -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SUB_DOC_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SNIPMODE ToLength -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SnipLength @Value(km_redadeg) -DEFAULT_MACRO IterativeSnipper_WORKSPACE_NAME "" -INCLUDE [puts {MACRO WB_OLD_CONTEXT_$(IterativeSnipper_WORKSPACE_NAME) $(WB_CURRENT_CONTEXT)}; puts {MACRO WB_CURRENT_CONTEXT $(IterativeSnipper_WORKSPACE_NAME)}] -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Input1581764121 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581764121 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_LengthCalculatorInput INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "Iterative_Snipper_length" @Length(REJECTABLE,3,"1") -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_OUTPUT" @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -# ------------------------------------------------------------------------- -MACRO OUTPUT_LINE_FTYPE not_selected -MACRO OUTPUT_LINE_FTYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_LINE -MACRO OUTPUT_INSTANCE_FTYPE not_selected -Lookup $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterTable "" "not_selected" fme_line $(OUTPUT_LINE_FTYPE) -MACRO COLLECTION_HANDLING NOT_THIS_TIME -MACRO INSTANCE_FILTERING * -INCLUDE [ if 0 { puts "MACRO COLLECTION_HANDLING *"; if { puts "MACRO INSTANCE_FILTERING NOT_THIS_TIME"; }; }; if {{$(OUTPUT_INSTANCE_FTYPE)} == "not_selected"} { puts "MACRO INSTANCE_FILTERING NOT_THIS_TIME"; }; ] -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_InputPassThrough INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" OUTPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ @Geometry(FIX_FMETYPE_FMEGEOMETRY) -FACTORY_DEF $(INSTANCE_FILTERING) TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_InstanceTest INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ TEST @Geometry(IS_GEOMETRY_INSTANCE) == 1 OUTPUT PASSED FEATURE_TYPE $(OUTPUT_INSTANCE_FTYPE) OUTPUT FAILED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ -FACTORY_DEF $(COLLECTION_HANDLING) TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_CollectionTest INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ TEST &fme_type == "fme_collection" OUTPUT FAILED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ OUTPUT PASSED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Collection___ -FACTORY_DEF $(COLLECTION_HANDLING) DeaggregateFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Deagg INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Collection___ HOMOGENIZE_COLLECTIONS YES RECURSIVE YES SET_FME_TYPE YES INSTANTIATE_GEOMETRY_INSTANCES_NEW OUTPUT POINT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT LINE FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT POLYGON FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT DONUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT AGGREGATE FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterPrepper INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ OUTPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_ddaaa359_030a_4211_b1d4_89adb5a5b9a72_targetFeatureType @Lookup($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterTable,&fme_type) -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Router INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ TEST @Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_ddaaa359_030a_4211_b1d4_89adb5a5b9a72_targetFeatureType) != "not_selected" OUTPUT PASSED FEATURE_TYPE * @FeatureType(@Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_ddaaa359_030a_4211_b1d4_89adb5a5b9a72_targetFeatureType)) @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_ddaaa359_030a_4211_b1d4_89adb5a5b9a72_targetFeatureType) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_" @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_ddaaa359_030a_4211_b1d4_89adb5a5b9a72_targetFeatureType) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_" MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "fme_rejection_code" "SET_TO" "INVALID_GEOMETRY_TYPE" } OUTPUT OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT" -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_LengthCalculatorInput INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_LINE" OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "Iterative_Snipper_length" @Length(REJECTABLE,3,"1") -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_OUTPUT" @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_OUTPUT" TEST @EvaluateExpression(FDIV,STRING_ENCODED,$($(IterativeSnipper_WORKSPACE_NAME)_SNIPMODE),$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode) = ToNumber ENCODED BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_PASSED" OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_FAILED" -# ------------------------------------------------------------------------- -Tcl2 proc $(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_doFetch {} { foreach {name val} {"Iterative_Snipper_maxLength {$($(IterativeSnipper_WORKSPACE_NAME)_SnipLength$encode)}"} { if { [string match {**} $val] == 1 } { set val [FME_Execute EvaluateExpression {STRING} $val {$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher}]; } elseif {[string match {*FME_CONDITIONAL*} $val] == 1} { set val [FME_Execute EvaluateExpression {STRING} $val {$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher}]; } else { set val [FME_DecodeTextOrAttr $val]; }; FME_SetAttribute [FME_DecodeText $name] $val } } -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_FAILED" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_OUTPUT" @Tcl2($(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_doFetch) -# ------------------------------------------------------------------------- -INCLUDE TCL - if {{OUTGOING} == {OUTGOING}} { set attrs [list {Iterative_Snipper_maxLength}]; } else { set attrAll {}; if {[string length $attrAll] == 0} { return; }; set attrs [split {} { }]; }; if {{NO_OP} == {NO_OP}} { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV; } else { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV_MULTI_FEATURE; }; foreach attr $attrs { lappend parmList $attr; lappend parmList {ValueIterative_Snipper_lengthdouble$($(IterativeSnipper_WORKSPACE_NAME)_SnipLength$encode)}; lappend parmList {FLOAT}; }; lappend parmList {$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator}; if {{NO_OP} == {OTHER_NULL_VALUE_2}} { lappend parmList {NO_OP}; lappend parmList {}; lappend parmList {0}; }; puts "MACRO __fme_expressionevaluator_evaluateArgs__ [join $parmList ,]"; -END_INCLUDE -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_PASSED" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator_OUTPUT" @EvaluateExpression($(__fme_expressionevaluator_evaluateArgs__)) -MACRO __fme_expressionevaluator_evaluateArgs__ -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Tester INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_OUTPUT" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator_OUTPUT" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_OUTPUT" TEST @EvaluateExpression(FDIV,STRING_ENCODED,ValueIterative_Snipper_length,$(IterativeSnipper_WORKSPACE_NAME)_Tester) <= @EvaluateExpression(FDIV,STRING_ENCODED,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Tester) ENCODED BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_PASSED" OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_FAILED" -# ------------------------------------------------------------------------- -# The Snipper takes the constant "end" to mean the last vertex of the line, -# but Workbench won't let us put an alpha string into the "last vertex" textfield. -# We'll interpret an ending vertex of -1 as being the same as "end". -# This is used only in the distance and percentage. -Tcl2 proc $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex {numIndex} { if {$numIndex < 0} { return "end"; } else { return $numIndex; } } -INCLUDE [ if { ({DISTANCE} == {DISTANCE} || {DISTANCE} == {PERCENTAGE}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip(@Tcl2("$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex 0"),@Tcl2("$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex @EvaluateExpression(FLOAT,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3)"),DISTANCE,3D,OUTPUT_REMNANT)}; } elseif { ({DISTANCE} == {MEASURE_RELATIVE_FROM_START} || {DISTANCE} == {MEASURE_REAL_VALUES}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip("0", "@EvaluateExpression(FLOAT,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3)", "", DISTANCE,OUTPUT_REMNANT)}; } elseif { ({DISTANCE} == {VERTEX}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip("","",VERTEX,OUTPUT_REMNANT)}; } ] -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Aggfilter INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_FAILED" TEST @Value(fme_geometry) != "fme_aggregate" OUTPUT PASSED FEATURE_TYPE ___TO_TYPEFILTER___ -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Typefilter INPUT FEATURE_TYPE ___TO_TYPEFILTER___ TEST @Value(fme_type) == "fme_line" TEST @Value(fme_type) == "fme_arc" TEST @Value(fme_geometry) == "fme_polygon" BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE ___TO_INPUT___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Input INPUT FEATURE_TYPE ___TO_INPUT___ OUTPUT FEATURE_TYPE ____TO_DEAGGREGATOR____ $($(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc) -FACTORY_DEF * DeaggregateFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_SplitRemnants INPUT FEATURE_TYPE ____TO_DEAGGREGATOR____ RECURSIVE No SPLIT_COMPOSITES No SET_FME_TYPE Yes PART_NUMBER_FIELD _part_number GEOMETRY_NAME_FIELD _geometry_name OUTPUT POINT FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT LINE FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT POLYGON FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT DONUT FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT AGGREGATE FEATURE_TYPE ___TO_NULLNUKER___ -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_NullNuker INPUT FEATURE_TYPE ___TO_NULLNUKER___ TEST @Value(_part_number) == 0 TEST @NumCoords() == 0 BOOLEAN_OPERATOR AND OUTPUT FAILED FEATURE_TYPE ___TO_OUTPUTTER___ -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Outputter INPUT FEATURE_TYPE ___TO_OUTPUTTER___ TEST @Value(_part_number) == 0 TEST @Tcl2("FME_AttributeExists _part_number") == 0 BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_OUTPUT" @RemoveAttributes(_part_number) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_REMNANTS" @RemoveAttributes(_part_number) -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_EXP "; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_PASSED" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_OUTPUT" OUTPUT { FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" @RemoveAttributes(fme_encoded,Iterative_Snipper_length,Iterative_Snipper_maxLength) @RemoveAttributes(fme_pcre_match"$($(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_EXP)") } -FACTORY_DEF * BranchingFactory TARGET_FACTORY "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581764121 Input Splitter" FACTORY_NAME "Loop to $(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1581764121 Input Splitter" MAXIMUM_COUNT -1 INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_REMNANTS" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Output1581764121 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Output" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_1581764121 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_" -INCLUDE [puts {MACRO WB_CURRENT_CONTEXT $(WB_OLD_CONTEXT_$(IterativeSnipper_WORKSPACE_NAME))}] -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Output Output Renamer/Nuker" INPUT FEATURE_TYPE IterativeSnipper_Output OUTPUT FEATURE_TYPE IterativeSnipper_Output -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Output Renamer/Nuker" INPUT FEATURE_TYPE IterativeSnipper_ OUTPUT FEATURE_TYPE IterativeSnipper_ -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {IterativeSnipper__Rejected_} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME IterativeSnipper__Rejected__Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE IterativeSnipper_ GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { IterativeSnipper__Rejected_ } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME IterativeSnipper__Rejected__Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA fme_rejection_code,varchar255,secteur_id,varchar255,nom_br,varchar255,nom_fr,varchar255,objectif_km,varchar255,km_redadeg,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -# Create the DomainName that this transformer will use. -# Because @Count itself will evalute the expression to calculate the -# domain, we don't need to do anything in Tcl per feature going by -INCLUDE [ set domainPrefix {}; if { {Local} == {Local} } { set domainPrefix [FME_EncodeText {Counter_2_}]; }; puts "MACRO Counter_2_FULL_DOMAIN ${domainPrefix}troncon_id"; ] -FACTORY_DEF * ExecuteFunctionFactory FACTORY_NAME Counter_2_Rejector COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE IterativeSnipper_Output FUNCTION_DEFINITION @Count(REJECTABLE_WITH_FLAG,fme_encoded,$(Counter_2_FULL_DOMAIN),"@EvaluateExpression(FDIV,FLOAT,$(START$encode),Counter_2)") RESULT_ATTRIBUTE "troncon_id" OUTPUT COMPLETE FEATURE_TYPE Counter_2_OUTPUT OUTPUT REJECTED FEATURE_TYPE Counter_2_ -FACTORY_DEF * TeeFactory FACTORY_NAME "Counter_2 Transformer Output Nuker" INPUT FEATURE_TYPE Counter_2_ -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_LengthCalculatorInput INPUT FEATURE_TYPE Counter_2_OUTPUT OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "longueur" @Length(REJECTABLE,2,"1") -FACTORY_DEF * TestFactory FACTORY_NAME LengthCalculator_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT FAILED FEATURE_TYPE LengthCalculator_OUTPUT @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter_3 INPUT FEATURE_TYPE LengthCalculator_OUTPUT SORT_BY secteur_id NUMERIC ASCENDING troncon_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_3_SORTED -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter_3 SORTED Splitter" INPUT FEATURE_TYPE Sorter_3_SORTED OUTPUT FEATURE_TYPE Sorter_3_SORTED_0_fFLYyOM90A0= OUTPUT FEATURE_TYPE Sorter_3_SORTED_1_2tOcv2i/uGI= OUTPUT FEATURE_TYPE Sorter_3_SORTED_2_h/1Aw1J8BQA= OUTPUT FEATURE_TYPE Sorter_3_SORTED_3_XoGbwsXKD4g= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "2_tronçons (Disabled) Nuker" INPUT FEATURE_TYPE Sorter_3_SORTED_2_h/1Aw1J8BQA= -# ------------------------------------------------------------------------- -Tcl2 set {CoordinateConcatenator_coordDelim} [FME_DecodeText {|}]; -Tcl2 set {CoordinateConcatenator_elementDelim} [FME_DecodeText {}]; -Tcl2 proc CoordinateConcatenator_coord_list {DIM} { global {CoordinateConcatenator_coordDelim}; global {CoordinateConcatenator_elementDelim}; set numCoords [FME_Coordinates numCoords]; set output {}; set includeX [string first {X} {Y X} ]; set includeY [string first {Y} {Y X} ]; set includeZ [string first {Z} {Y X} ]; if { $includeX == -1 && $includeY == -1 && $includeZ == -1 } { FME_SetAttribute _coordinates $output; return; }; for {set i 0} {$i < $numCoords} {incr i} { if {$includeX != -1} { append output [FME_Coordinates getCoord x $i]; }; if {$includeY != -1} { if {$includeX != -1} { append output [set {CoordinateConcatenator_elementDelim}] [FME_Coordinates getCoord y $i]; } else { append output [FME_Coordinates getCoord y $i]; }; }; if { $DIM == 3 && $includeZ != -1 } { if { $includeX != -1 || $includeY != -1 } { append output [set {CoordinateConcatenator_elementDelim}] [FME_Coordinates getCoord z $i]; } else { append output [FME_Coordinates getCoord z $i]; }; }; if {$i < ($numCoords - 1)} { append output [set {CoordinateConcatenator_coordDelim}] }; }; FME_SetAttribute _coordinates $output; } -FACTORY_DEF * TeeFactory FACTORY_NAME CoordinateConcatenator INPUT FEATURE_TYPE Sorter_3_SORTED_1_2tOcv2i/uGI= OUTPUT FEATURE_TYPE CoordinateConcatenator_OUTPUT @Tcl2("CoordinateConcatenator_coord_list @Dimension()") -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_6fc0f2ad_3bc7_4aef_9a8d_462dd86fe9b62_splitDelim [FME_DecodeText {|}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_6fc0f2ad_3bc7_4aef_9a8d_462dd86fe9b62_splitDelim]] } { set AttributeSplitter_6fc0f2ad_3bc7_4aef_9a8d_462dd86fe9b62_splitWidths [split [regsub -all {s$} {|} {}] s]; proc AttributeSplitter_doSplit {} { global AttributeSplitter_6fc0f2ad_3bc7_4aef_9a8d_462dd86fe9b62_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set attrNum 0; set listName [FME_DecodeText {_coords}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_6fc0f2ad_3bc7_4aef_9a8d_462dd86fe9b62_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_doSplit {} { global AttributeSplitter_6fc0f2ad_3bc7_4aef_9a8d_462dd86fe9b62_splitDelim; set delim [set AttributeSplitter_6fc0f2ad_3bc7_4aef_9a8d_462dd86fe9b62_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter INPUT FEATURE_TYPE CoordinateConcatenator_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_OUTPUT @Tcl2(AttributeSplitter_doSplit) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME ListElementCounter INPUT FEATURE_TYPE AttributeSplitter_OUTPUT OUTPUT FEATURE_TYPE ListElementCounter_OUTPUT "_vertex_count" @NumElements("_coords",ENCODED) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME GeometryRemover INPUT FEATURE_TYPE ListElementCounter_OUTPUT OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT @RemoveGeometry() -FACTORY_DEF * TeeFactory FACTORY_NAME "GeometryRemover OUTPUT Splitter" INPUT FEATURE_TYPE GeometryRemover_OUTPUT OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT_0_lyMsYNg46jM= OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT_1_OUiOuQAK2cA= -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_4_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_4_IntTester INPUT FEATURE_TYPE GeometryRemover_OUTPUT_1_OUiOuQAK2cA= TEST "@EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4)" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_4_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "@EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4)" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_4_OUTPUT @Tcl2("ListIndexer_4_indexer @EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4) 0 {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_4_OUTPUT @Tcl2("ListIndexer_4_indexer @EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4) @NumElements(_coords{}) {}") -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_3_5cfa5388_18d7_4633_bf80_d5e52dd86f922_splitDelim [FME_DecodeText {}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_3_5cfa5388_18d7_4633_bf80_d5e52dd86f922_splitDelim]] } { set AttributeSplitter_3_5cfa5388_18d7_4633_bf80_d5e52dd86f922_splitWidths [split [regsub -all {s$} {} {}] s]; proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_5cfa5388_18d7_4633_bf80_d5e52dd86f922_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_3_5cfa5388_18d7_4633_bf80_d5e52dd86f922_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_5cfa5388_18d7_4633_bf80_d5e52dd86f922_splitDelim; set delim [set AttributeSplitter_3_5cfa5388_18d7_4633_bf80_d5e52dd86f922_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter_3 INPUT FEATURE_TYPE ListIndexer_4_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_3_OUTPUT @Tcl2(AttributeSplitter_3_doSplit) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_5_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_5_IntTester INPUT FEATURE_TYPE AttributeSplitter_3_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_5_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_5_OUTPUT @Tcl2("ListIndexer_5_indexer 0 0 {x}") OUTPUT FAILED FEATURE_TYPE ListIndexer_5_OUTPUT @Tcl2("ListIndexer_5_indexer 0 @NumElements(_coords_vertex{}) {x}") -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_6_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_6_IntTester INPUT FEATURE_TYPE ListIndexer_5_OUTPUT TEST "1" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_6_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "1" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_6_OUTPUT @Tcl2("ListIndexer_6_indexer 1 0 {y}") OUTPUT FAILED FEATURE_TYPE ListIndexer_6_OUTPUT @Tcl2("ListIndexer_6_indexer 1 @NumElements(_coords_vertex{}) {y}") -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeRemover_2_LIST_EXP "; foreach attr [split "_coords_vertex _coords"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeRemover_2 INPUT FEATURE_TYPE ListIndexer_6_OUTPUT OUTPUT { FEATURE_TYPE AttributeRemover_2_OUTPUT @RemoveAttributes(fme_encoded,_coords_vertex0,_coords,_coords0) @RemoveAttributes(fme_pcre_match"$(AttributeRemover_2_LIST_EXP)") } -# ------------------------------------------------------------------------- -FACTORY_DEF * VertexCreatorFactory FACTORY_NAME VertexCreator_2 INPUT FEATURE_TYPE AttributeRemover_2_OUTPUT MODE ADD INDEX "" CONTINUE_ON_ERROR YES XVAL "@EvaluateExpression(FDIV,FLOAT,Valuex_coords_vertex,VertexCreator_2)" YVAL "@EvaluateExpression(FDIV,FLOAT,Valuey_coords_vertex,VertexCreator_2)" OUTPUT OUTPUT FEATURE_TYPE VertexCreator_2_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME AttributeCreator_2 COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE VertexCreator_2_OUTPUT MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "position_vertex" "SET_TO" "fin" } OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeCreator_2 OUTPUT Splitter" INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_0_j0uI5yR3ojs= OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_1_RySErNGX5NA= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "Vertex_fin (Disabled) Nuker" INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_0_j0uI5yR3ojs= -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_IntTester INPUT FEATURE_TYPE GeometryRemover_OUTPUT_0_lyMsYNg46jM= TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_OUTPUT @Tcl2("ListIndexer_indexer 0 0 {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_OUTPUT @Tcl2("ListIndexer_indexer 0 @NumElements(_coords{}) {}") -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_2_e78ba08b_a106_44fa_a2b6_d3b2afec94822_splitDelim [FME_DecodeText {}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_2_e78ba08b_a106_44fa_a2b6_d3b2afec94822_splitDelim]] } { set AttributeSplitter_2_e78ba08b_a106_44fa_a2b6_d3b2afec94822_splitWidths [split [regsub -all {s$} {} {}] s]; proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_e78ba08b_a106_44fa_a2b6_d3b2afec94822_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_2_e78ba08b_a106_44fa_a2b6_d3b2afec94822_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_e78ba08b_a106_44fa_a2b6_d3b2afec94822_splitDelim; set delim [set AttributeSplitter_2_e78ba08b_a106_44fa_a2b6_d3b2afec94822_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter_2 INPUT FEATURE_TYPE ListIndexer_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_2_OUTPUT @Tcl2(AttributeSplitter_2_doSplit) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_2_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_2_IntTester INPUT FEATURE_TYPE AttributeSplitter_2_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_2_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_2_OUTPUT @Tcl2("ListIndexer_2_indexer 0 0 {x}") OUTPUT FAILED FEATURE_TYPE ListIndexer_2_OUTPUT @Tcl2("ListIndexer_2_indexer 0 @NumElements(_coords_vertex{}) {x}") -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_3_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_3_IntTester INPUT FEATURE_TYPE ListIndexer_2_OUTPUT TEST "1" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_3_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "1" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_3_OUTPUT @Tcl2("ListIndexer_3_indexer 1 0 {y}") OUTPUT FAILED FEATURE_TYPE ListIndexer_3_OUTPUT @Tcl2("ListIndexer_3_indexer 1 @NumElements(_coords_vertex{}) {y}") -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeRemover_LIST_EXP "; foreach attr [split "_coords_vertex"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeRemover INPUT FEATURE_TYPE ListIndexer_3_OUTPUT OUTPUT { FEATURE_TYPE AttributeRemover_OUTPUT @RemoveAttributes(fme_encoded,_coords_vertex0,_coords0,_coordinates) @RemoveAttributes(fme_pcre_match"$(AttributeRemover_LIST_EXP)") } -# ------------------------------------------------------------------------- -FACTORY_DEF * VertexCreatorFactory FACTORY_NAME VertexCreator INPUT FEATURE_TYPE AttributeRemover_OUTPUT MODE ADD INDEX "" CONTINUE_ON_ERROR YES XVAL "@EvaluateExpression(FDIV,FLOAT,Valuex_coords_vertex,VertexCreator)" YVAL "@EvaluateExpression(FDIV,FLOAT,Valuey_coords_vertex,VertexCreator)" OUTPUT OUTPUT FEATURE_TYPE VertexCreator_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME AttributeCreator COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE VertexCreator_OUTPUT MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "position_vertex" "SET_TO" "debut" } OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeCreator OUTPUT Splitter" INPUT FEATURE_TYPE AttributeCreator_OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT_0_lQ+3mj5tm0E= OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT_1_Et/p63Aqn4M= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "Vertex_debut (Disabled) Nuker" INPUT FEATURE_TYPE AttributeCreator_OUTPUT_1_Et/p63Aqn4M= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} DuplicateRemoverFactory FACTORY_NAME DuplicateFilter COMMAND_PARM_EVALUATION SINGLE_PASS SUPPORTS_FEATURE_TABLES INPUT FEATURE_TYPE AttributeCreator_OUTPUT_0_lQ+3mj5tm0E= INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_1_RySErNGX5NA= KEY_ATTRIBUTES { y_coords_vertex x_coords_vertex } INPUT_IS_ORDERED NO OUTPUT DUPLICATE FEATURE_TYPE DuplicateFilter_DUPLICATE OUTPUT UNIQUE FEATURE_TYPE DuplicateFilter_UNIQUE -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "DuplicateFilter_Duplicate (Disabled) Nuker" INPUT FEATURE_TYPE DuplicateFilter_DUPLICATE -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeRemover_3_LIST_EXP "; foreach attr [split "_coords"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeRemover_3 INPUT FEATURE_TYPE DuplicateFilter_UNIQUE OUTPUT { FEATURE_TYPE AttributeRemover_3_OUTPUT @RemoveAttributes(fme_encoded,_coords,path_seq,_vertex_count,_coordinates) @RemoveAttributes(fme_pcre_match"$(AttributeRemover_3_LIST_EXP)") } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} OverlayFactory FACTORY_NAME PointOnLineOverlayer INPUT LINE FEATURE_TYPE BulkAttributeRenamer_2_OUTPUT INPUT POINT FEATURE_TYPE AttributeRemover_3_OUTPUT TOLERANCE 1 OVERLAP_COUNT_ATTRIBUTE "_overlaps" DEAGGREGATE_INPUT Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" LIST_NAME "" LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE CANDIDATE_LIST_NAME "" CANDIDATE_LIST_ATTRS_TO_INCLUDE { } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE MODE COMPLETE OVERLAY_TYPE POINT_ON_LINE OUTPUT POINT FEATURE_TYPE PointOnLineOverlayer_POINT -# ------------------------------------------------------------------------- -FACTORY_DEF {*} OverlayFactory FACTORY_NAME PointOnAreaOverlayer INPUT POINT FEATURE_TYPE PointOnLineOverlayer_POINT INPUT POLYGON FEATURE_TYPE BulkAttributeRenamer_OUTPUT OVERLAP_COUNT_ATTRIBUTE "_overlaps" DEAGGREGATE_INPUT Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" LIST_NAME "" LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE CANDIDATE_LIST_NAME "" CANDIDATE_LIST_ATTRS_TO_INCLUDE { } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE MODE COMPLETE OVERLAY_TYPE POINT_ON_AREA POLYS_FIRST "NO" REJECT_INVALID_GEOM YES OUTPUT POINT FEATURE_TYPE PointOnAreaOverlayer_POINT -FACTORY_DEF * TeeFactory FACTORY_NAME "PointOnAreaOverlayer POINT Splitter" INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT OUTPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_0_ZK7VGYHSo24= OUTPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_1_x2WusK23Nmo= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "PointOnAreaOverlayer_Point (Disabled) Nuker" INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_1_x2WusK23Nmo= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME CoordinateSystemSetter INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_0_ZK7VGYHSo24= OUTPUT FEATURE_TYPE CoordinateSystemSetter_OUTPUT @CoordSys("EPSG:2154") -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory INPUT FEATURE_TYPE CoordinateSystemSetter_OUTPUT TEST "Specify Coordinate" == "All Coordinates" OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_PASSED OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_FAILED -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_PASSED INPUT FEATURE_TYPE CoordinateExtractor_PASSED TEST @Dimension() == 2 OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_OUTPUT @ZValue("") @Coordinate(x,ALL,""{}.x,FLATTEN_AGGREGATE,YES) @Coordinate(y,ALL,""{}.y,FLATTEN_AGGREGATE,NO) @Coordinate(z,ALL,""{}.z,FLATTEN_AGGREGATE,NO) @Dimension(2) OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT @Coordinate(x,ALL,""{}.x,FLATTEN_AGGREGATE,YES) @Coordinate(y,ALL,""{}.y,FLATTEN_AGGREGATE,NO) @Coordinate(z,ALL,""{}.z,FLATTEN_AGGREGATE,NO) -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_FAILED INPUT FEATURE_TYPE CoordinateExtractor_FAILED TEST @Dimension() == 2 OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_FAILED_PASSED OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_FAILED_PASSED INPUT FEATURE_TYPE CoordinateExtractor_FAILED_PASSED TEST "" == "" OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) -# ------------------------------------------------------------------------- -Tcl2 proc AttributeRounder_round {places} { set attrs [split {pk_y pk_x} { }]; foreach attr $attrs { set attr [FME_DecodeText $attr]; set original [FME_GetAttribute $attr]; if {$original == {} || [FME_IsAttributeNull $attr]} { FME_LogMessage fme_warn 917357 {AttributeRounder} $attr; continue; }; set comment {"do not attempt rounding if not a number"}; if {[string is double $original] == 0} {continue}; if { [catch { set multiplier [expr pow(10,$places)]; set result [expr "round($original * $multiplier) / $multiplier"]; set comment {"when rounding integers, chop trailing .0 from the value"}; if {$places == 0 || [string is wideinteger $original] == 1} { set result [regsub {[.]0*$} $result {}]; }; };] == 0 } { FME_SetAttribute $attr $result; } else { FME_LogMessage fme_warn 917350 {AttributeRounder} $attr; }; }; } -FACTORY_DEF * TestFactory FACTORY_NAME AttributeRounder INPUT FEATURE_TYPE CoordinateExtractor_OUTPUT TEST "2" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_AttributeRounder INPUT FEATURE_TYPE __toOutput__ OUTPUT FEATURE_TYPE AttributeRounder_OUTPUT @Tcl2("AttributeRounder_round 2") -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeCopier INPUT FEATURE_TYPE AttributeRounder_OUTPUT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "pk_y" "pk_lat" "COPY" "" } ATTR_ACTION { "pk_x" "pk_long" "COPY" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeCopier_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeReprojector INPUT FEATURE_TYPE AttributeCopier_OUTPUT OUTPUT FEATURE_TYPE AttributeReprojector_OUTPUT @Reproject("EPSG:2154","LL-WGS84","pk_long","pk_lat") -# ------------------------------------------------------------------------- -Tcl2 proc AttributeRounder_2_round {places} { set attrs [split {longueur} { }]; foreach attr $attrs { set attr [FME_DecodeText $attr]; set original [FME_GetAttribute $attr]; if {$original == {} || [FME_IsAttributeNull $attr]} { FME_LogMessage fme_warn 917357 {AttributeRounder_2} $attr; continue; }; set comment {"do not attempt rounding if not a number"}; if {[string is double $original] == 0} {continue}; if { [catch { set multiplier [expr pow(10,$places)]; set result [expr "round($original * $multiplier) / $multiplier"]; set comment {"when rounding integers, chop trailing .0 from the value"}; if {$places == 0 || [string is wideinteger $original] == 1} { set result [regsub {[.]0*$} $result {}]; }; };] == 0 } { FME_SetAttribute $attr $result; } else { FME_LogMessage fme_warn 917350 {AttributeRounder_2} $attr; }; }; } -FACTORY_DEF * TestFactory FACTORY_NAME AttributeRounder_2 INPUT FEATURE_TYPE AttributeReprojector_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_2_AttributeRounder INPUT FEATURE_TYPE __toOutput__ OUTPUT FEATURE_TYPE AttributeRounder_2_OUTPUT @Tcl2("AttributeRounder_2_round 0") -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeRenamer INPUT FEATURE_TYPE AttributeRounder_2_OUTPUT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "municipality_nom" "municipality_name_fr" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "longueur" "length_real" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "km_redadeg" "length_theorical" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "municipality_admincode" "municipality_admincode" "RENAME_SET_DEFAULT" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter_2 INPUT FEATURE_TYPE AttributeRenamer_OUTPUT SORT_BY secteur_id NUMERIC ASCENDING troncon_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_2_SORTED -# ------------------------------------------------------------------------- -# Create the DomainName that this transformer will use. -# Because @Count itself will evalute the expression to calculate the -# domain, we don't need to do anything in Tcl per feature going by -INCLUDE [ set domainPrefix {}; if { {Local} == {Local} } { set domainPrefix [FME_EncodeText {Counter_}]; }; puts "MACRO Counter_FULL_DOMAIN ${domainPrefix}pk_id"; ] -FACTORY_DEF * ExecuteFunctionFactory FACTORY_NAME Counter_Rejector COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE Sorter_2_SORTED FUNCTION_DEFINITION @Count(REJECTABLE_WITH_FLAG,fme_encoded,$(Counter_FULL_DOMAIN),"@EvaluateExpression(FDIV,FLOAT,$(START$encode),Counter)") RESULT_ATTRIBUTE "pk_id" OUTPUT COMPLETE FEATURE_TYPE Counter_OUTPUT OUTPUT REJECTED FEATURE_TYPE Counter_ -FACTORY_DEF * TeeFactory FACTORY_NAME "Counter OUTPUT Splitter" INPUT FEATURE_TYPE Counter_OUTPUT OUTPUT FEATURE_TYPE Counter_OUTPUT_0_/sTFA1dnbN8= OUTPUT FEATURE_TYPE Counter_OUTPUT_1_bU15iCfwGHA= OUTPUT FEATURE_TYPE Counter_OUTPUT_2_pA+nVUfM3k0= OUTPUT FEATURE_TYPE Counter_OUTPUT_3_WeyqcBK0djk= -FACTORY_DEF * TeeFactory FACTORY_NAME "Counter Transformer Output Nuker" INPUT FEATURE_TYPE Counter_ -# ------------------------------------------------------------------------- -FACTORY_DEF {*} ConnectionFactory FACTORY_NAME LineBuilder INPUT FEATURE_TYPE Counter_OUTPUT_2_pA+nVUfM3k0= ACCUM_INPUT_ATTRS One LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE REMOVE_DUPLICATES NO OUTPUT LINE FEATURE_TYPE LineBuilder_LINE -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "pk (Disabled) Nuker" INPUT FEATURE_TYPE Counter_OUTPUT_0_/sTFA1dnbN8= -# ------------------------------------------------------------------------- -INCLUDE [if { {ATTRIBUTES} == {ATTRIBUTES} } { puts "MACRO FeatureMerger_REFERENCE_INFO ATTRIBUTES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] -FACTORY_DEF {*} ReferenceFactory FACTORY_NAME FeatureMerger INPUT REFERENCER FEATURE_TYPE Sorter_4_SORTED_0_bGs2+JFzNGU= INPUT REFERENCEE FEATURE_TYPE AttributeRenamer_2_OUTPUT_0_XZPnkgk0+40= REFERENCE_INFO $(FeatureMerger_REFERENCE_INFO) REFERENCE_TABLE @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger) @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger) AUTO ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "REQUESTOR_IF_CONFLICT" IGNORE_NULLS "No" HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES NO REFERENCEES_FIRST No REJECT_INVALID_GEOM YES CLEANING_TOLERANCE OUTPUT COMPLETE FEATURE_TYPE FeatureMerger_MERGED -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_2_LengthCalculatorInput INPUT FEATURE_TYPE FeatureMerger_MERGED OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_2_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "km_reels" @Length(REJECTABLE,2,"1") -FACTORY_DEF * TestFactory FACTORY_NAME LengthCalculator_2_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT FAILED FEATURE_TYPE LengthCalculator_2_OUTPUT @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -# ------------------------------------------------------------------------- -Tcl2 regsub {^[^a-zA-Z]*([a-zA-Z]).*} {.2f} {\1} formatChar; if { [string first $formatChar {duiofxeEgG}] != -1 } { proc {StringFormatter_getAttribute} {attr} { return [regsub {^(-?)0*(.)} [FME_GetAttribute $attr] {\1\2}] } } else { proc {StringFormatter_getAttribute} {attr} { return [FME_GetAttribute $attr] } } -Tcl2 proc StringFormatter_formatter {} { set attrs [split {km_reels} {,}]; foreach attr $attrs { set attrVal [FME_GetAttribute $attr]; set length [string length $attrVal]; if {$length > 0} { FME_SetAttribute $attr [format %.2f [{StringFormatter_getAttribute} $attr]]; }; }; } -FACTORY_DEF * TeeFactory FACTORY_NAME StringFormatter INPUT FEATURE_TYPE LengthCalculator_2_OUTPUT OUTPUT FEATURE_TYPE StringFormatter_OUTPUT @Tcl2(StringFormatter_formatter) -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter INPUT FEATURE_TYPE StringFormatter_OUTPUT SORT_BY secteur_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_SORTED -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter SORTED Splitter" INPUT FEATURE_TYPE Sorter_SORTED OUTPUT FEATURE_TYPE Sorter_SORTED_0_3iJewJ+xcb8= OUTPUT FEATURE_TYPE Sorter_SORTED_1_AdG4IKX8gxs= OUTPUT FEATURE_TYPE Sorter_SORTED_2_WrWvotwy67E= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "secteurs (Disabled) Nuker" INPUT FEATURE_TYPE Sorter_SORTED_0_3iJewJ+xcb8= -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC Sorter_SORTED_2_WrWvotwy67E= TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,1,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_secteurs.geojson COORDINATE_SYSTEM EPSG:4326 GEOMETRY ROUTE FME_GENERIC Sorter_3_SORTED_3_XoGbwsXKD4g= TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,2,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_troncons COORDINATE_SYSTEM EPSG:4326 GEOMETRY ROUTE FME_GENERIC Counter_OUTPUT_3_WeyqcBK0djk= TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,3,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_auto COORDINATE_SYSTEM EPSG:4326 GEOMETRY ROUTE FME_GENERIC Counter_OUTPUT_1_bU15iCfwGHA= TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_auto COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC LineBuilder_LINE TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_sens_verif COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC Sorter_3_SORTED_0_fFLYyOM90A0= TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_troncons COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC Sorter_SORTED_1_AdG4IKX8gxs= TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_secteurs COORDINATE_SYSTEM EPSG:2154 GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- - -FACTORY_DEF * CreationFactory FACTORY_NAME VisualizerProcessor CREATE_AT_END OUTPUT FEATURE_TYPE __NUKEME__ @TCL("if [file exists {$(WORKSPACE_TEMP_DIR)}] {set files [glob -nocomplain -directory {$(WORKSPACE_TEMP_DIR)} -tails *.ffs]; if {[llength $files] == 1} { set theFile {$(WORKSPACE_TEMP_DIR)/}; append theFile [lindex $files 0]; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -f FFS \042$theFile\042 & \175; } elseif { [llength $files] == 0 } { catch { file delete -force {$(WORKSPACE_TEMP_DIR)} }; } else { set filesNoExt {}; set lastfile {}; foreach {fileName} [lsort $files] { set fileNoExt [string trimright $fileName {.ffs}]; if [regexp {(.*)_[0-9]*$} $fileNoExt wholething fileNoExtBase] { if { $fileNoExtBase == $lastfile } { continue } }; set lastfile $fileNoExt; lappend filesNoExt $fileNoExt }; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -d {$(WORKSPACE_TEMP_DIR)} -a ffs -f FFS $filesNoExt & \175; }; }; ") -FACTORY_DEF * TeeFactory FACTORY_NAME VisualizerCleaner INPUT FEATURE_TYPE __NUKEME__ -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_pk_sens_verif postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid 2154 postgis_vacuum_analyze NO postgis_allow_serial_writing NO secteur_id int4 -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_pk_auto postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid 2154 postgis_vacuum_analyze NO postgis_allow_serial_writing NO pk_id text pk_x text pk_y text pk_long text pk_lat text length_real text length_theorical text secteur_id int8 municipality_admincode text municipality_postcode text municipality_name_fr text municipality_name_br text way_osm_id text way_highway text way_type text way_oneway text way_ref text way_name_fr text way_name_br text -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_trace_secteurs postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO secteur_id int2 nom_fr text nom_br text km_reels numeric(20,10) -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_trace_troncons postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO troncon_id int2 secteur_id int2 -# ------------------------------------------------------------------------- -GEOJSON_1_DEF phase_3_trace_secteurs.geojson secteur_id int nom_fr string nom_br string km_reels float -# ------------------------------------------------------------------------- -GEOJSON_2_DEF phase_3_trace_troncons troncon_id int secteur_id int -# ------------------------------------------------------------------------- -GEOJSON_3_DEF phase_3_pk_auto pk_id string pk_x string pk_y string pk_long string pk_lat string length_real string length_theorical string secteur_id int municipality_admincode string municipality_postcode string municipality_name_fr string municipality_name_br string way_osm_id string way_highway string way_type string way_oneway string way_ref string way_name_fr string way_name_br string diff --git a/scripts/traitements_phase_3_decoupage v2 2018.fmw b/scripts/traitements_phase_3_decoupage v2 2018.fmw deleted file mode 100644 index 42d0d25..0000000 --- a/scripts/traitements_phase_3_decoupage v2 2018.fmw +++ /dev/null @@ -1,7574 +0,0 @@ -#! -#! redadeg" -# --SourceDataset_POSTGIS "breizhpolenovoredadeg" -# --SourceDataset_POSTGRES "breizhpolenovoredadeg" -# --postgres_sql_where_clause "" -# -#! ATTR_TYPE_ENCODING="SDF" -#! BEGIN_PYTHON="" -#! BEGIN_TCL="" -#! CATEGORY="" -#! DESCRIPTION="" -#! DESTINATION="NONE" -#! DESTINATION_ROUTING_FILE="" -#! DOC_EXTENTS="21509.9 5596.82" -#! DOC_TOP_LEFT="-8898.04 -4208.43" -#! END_PYTHON="" -#! END_TCL="" -#! EXPLICIT_BOOKMARK_ORDER="false" -#! FME_BUILD_NUM="18592" -#! FME_DOCUMENT_GUID="653f1f51-b710-4bf7-83fa-0e5da492586b" -#! FME_DOCUMENT_PRIORGUID="696c9d7c-e37d-4232-b9cf-4183183cacd1,75bea4c9-a241-4c15-b15f-d04ed56c4dc9,0a67c2df-8a2f-4f57-9949-8e922409485f,f6d95960-7dda-46c7-8546-119d6e5eb63b" -#! FME_GEOMETRY_HANDLING="Enhanced" -#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" -#! FME_REPROJECTION_ENGINE="FME" -#! FME_SERVER_SERVICES="" -#! FME_STROKE_MAX_DEVIATION="0" -#! HISTORY="" -#! IGNORE_READER_FAILURE="No" -#! LAST_SAVE_BUILD="FME(R) 2018.1.2.1 (20190319 - Build 18592 - macosx)" -#! LAST_SAVE_DATE="2020-02-18T23:59:01" -#! LOG_FILE="" -#! LOG_MAX_RECORDED_FEATURES="200" -#! MARKDOWN_DESCRIPTION="" -#! MARKDOWN_USAGE="" -#! MAX_LOG_FEATURES="200" -#! MULTI_WRITER_DATASET_ORDER="BY_ID" -#! PASSWORD="" -#! PYTHON_COMPATIBILITY="27" -#! REDIRECT_TERMINATORS="NONE" -#! SHOW_ANNOTATIONS="true" -#! SHOW_INFO_NODES="true" -#! SOURCE="NONE" -#! SOURCE_ROUTING_FILE="" -#! TERMINATE_REJECTED="YES" -#! TITLE="" -#! USAGE="" -#! USE_MARKDOWN="" -#! VIEW_POSITION="-5246.11 1405.28" -#! WARN_INVALID_XFORM_PARAM="Yes" -#! WORKSPACE_VERSION="1" -#! ZOOM_SCALE="76" -#! > -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 27 -GUI IGNORE SourceDataset_POSTGRES_1,POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1,POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1,POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1,POSTGRES_IN_ADVANCED_POSTGRES_1,POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1,POSTGRES_IN_BEGIN_SQL_POSTGRES_1,POSTGRES_IN_END_SQL_POSTGRES_1,POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1,SourceDataset_POSTGIS_1,POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_METHOD_POSTGIS_1,POSTGIS_IN_ADVANCED_POSTGIS_1,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1,POSTGIS_IN_BEGIN_SQL_POSTGIS_1,POSTGIS_IN_END_SQL_POSTGIS_1,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1,DestDataset_POSTGIS_2,POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2,POSTGIS_OUT_ADVANCED_POSTGIS_2,POSTGIS_OUT_BULK_COPY_POSTGIS_2,POSTGIS_OUT_START_TRANSACTION_POSTGIS_2,POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2,POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2,POSTGIS_OUT_BEGIN_SQL_POSTGIS_2,POSTGIS_OUT_END_SQL_POSTGIS_2,DestDataset_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1,GEOJSON_OUT_WRITE_BOM_GEOJSON_1,GEOJSON_OUT_STRICT_SPEC_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1,GEOJSON_OUT_INDENT_SIZE_GEOJSON_1,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1,DestDataset_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2,GEOJSON_OUT_WRITE_BOM_GEOJSON_2,GEOJSON_OUT_STRICT_SPEC_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2,GEOJSON_OUT_INDENT_SIZE_GEOJSON_2,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2,DestDataset_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3,GEOJSON_OUT_WRITE_BOM_GEOJSON_3,GEOJSON_OUT_STRICT_SPEC_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3,GEOJSON_OUT_INDENT_SIZE_GEOJSON_3,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 -DEFAULT_MACRO DestDataset_GEOJSON data/phase_3_trace_secteurs.geojson -GUI FILENAME DestDataset_GEOJSON GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO DestDataset_GEOJSON_5 data/phase_3_trace_troncons.geojson -GUI FILENAME DestDataset_GEOJSON_5 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO DestDataset_GEOJSON_4 data/phase_3_pk_auto.geojson -GUI FILENAME DestDataset_GEOJSON_4 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO DestDataset_POSTGIS breizhpolenovoredadeg -GUI OPTIONAL NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO SourceDataset_POSTGIS breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO SourceDataset_POSTGRES breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGRES FMT:POSTGRES%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO postgres_sql_where_clause -GUI OPTIONAL TEXT_EDIT_SQL_CFG postgres_sql_where_clause MODE,WHERE;FORMAT,POSTGRES;FORMAT,POSTGRES;DATASET,breizhpolenovoatredadeg;CONNECTION_PARAMS,FEATURES_PER_FETCH10000SCHEMAS_FOR_TABLE_LISTINGpublicNAMED_CONNECTIONbreizhpolenovoatredadegREAD_TIME_WITH_TIMEZONEYes_MERGE_SCHEMASYESQUERY_FEATURE_TYPES_FOR_MERGE_FILTERSYes;START_TABLE,public.secteur secteur WHERE Clause: -DEFAULT_MACRO START 13 -GUI IGNORE OPTIONAL INT START Count Start: -INCLUDE [ if {{$(DestDataset_GEOJSON)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_GEOJSON_5)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON_5' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_GEOJSON_4)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON_4' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGIS)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGRES)} == {}} { puts_real {Parameter 'SourceDataset_POSTGRES' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -MULTI_READER_TYPE{0} POSTGRES -MULTI_READER_KEYWORD{0} POSTGRES_1 -MULTI_READER_GEN_DIRECTIVES{0} EXPOSE_ATTRS_GROUP,,BEGIN_SQL,,READ_TIME_WITH_TIMEZONE,Yes,SCHEMAS_FOR_TABLE_LISTING,public,NAMED_CONNECTION,breizhpolenovoatredadeg,END_SQL,,ADVANCED,,TABLELIST,public.secteur,WHERE_CLAUSE,,_MERGE_SCHEMAS,YES,FEATURES_PER_FETCH,10000,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,POSTGRES_EXPOSE_FORMAT_ATTRS, -MULTI_READER_TYPE{1} POSTGIS -MULTI_READER_KEYWORD{1} POSTGIS_1 -MULTI_READER_GEN_DIRECTIVES{1} USE_TRUE_POSTGIS_TYPES,yes,CLIP_TO_ENVELOPE,NO,SEARCH_ENVELOPE_MAXY,0,POSTGIS_EXPOSE_FORMAT_ATTRS,,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,ADVANCED,,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,USE_SEARCH_ENVELOPE,NO,FEATURES_PER_FETCH,10000,DISABLE_COLLECTION_SPLITTING,yes,SEARCH_ENVELOPE_MINX,0,SEARCH_ENVELOPE_MINY,0,EXPOSE_ATTRS_GROUP,,SEARCH_METHOD,MBR_OVERLAPS,NAMED_CONNECTION,breizhpolenovoatredadeg,SEARCH_ENVELOPE_MAXX,0,READ_TIME_WITH_TIMEZONE,Yes,TABLELIST,public.osm_communespublic.phase_2_trace_pgr,END_SQL,,WHERE_CLAUSE,,_MERGE_SCHEMAS,YES,SCHEMAS_FOR_TABLE_LISTING,public,BEGIN_SQL, -WRITER_TYPE MULTI_WRITER -MULTI_WRITER_DATASET_ORDER BY_ID -MULTI_WRITER_FIRST_WRITER_ID 0 -MULTI_WRITER_TYPE{0} POSTGIS -MULTI_WRITER_KEYWORD{0} POSTGIS_2 -MULTI_WRITER_TYPE{1} GEOJSON -MULTI_WRITER_KEYWORD{1} GEOJSON_1 -MULTI_WRITER_TYPE{2} GEOJSON -MULTI_WRITER_KEYWORD{2} GEOJSON_2 -MULTI_WRITER_TYPE{3} GEOJSON -MULTI_WRITER_KEYWORD{3} GEOJSON_3 -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGRES_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGRES POSTGRES_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGRES_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGRES POSTGRES_1 -DEFAULT_MACRO SourceDataset_POSTGRES_1 $(SourceDataset_POSTGRES) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGRES_1 FMT:POSTGRES Connection: -DEFAULT_MACRO POSTGRES_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGRES_1 Yes -POSTGRES_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGRES_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_READ_TIME_WITH_TIMEZONE_POSTGRES_1 Yes -POSTGRES_1_READ_TIME_WITH_TIMEZONE "$(POSTGRES_IN_READ_TIME_WITH_TIMEZONE_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1 POSTGRES_IN_NAMED_CONNECTION%POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 Database Connection -DEFAULT_MACRO POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1 POSTGRES_IN_TABLELIST%POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 Constraints -DEFAULT_MACRO POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 -POSTGRES_1_WHERE_CLAUSE "$(POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 MODE,WHERE;FORMAT,POSTGRES WHERE Clause: -DEFAULT_MACRO POSTGRES_IN_EXPOSE_ATTRS_GROUP_POSTGRES_1 -POSTGRES_1_EXPOSE_ATTRS_GROUP "$(POSTGRES_IN_EXPOSE_ATTRS_GROUP_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_ADVANCED_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_ADVANCED_POSTGRES_1 POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1%POSTGRES_IN_BEGIN_SQL_POSTGRES_1%POSTGRES_IN_END_SQL_POSTGRES_1 Advanced -DEFAULT_MACRO POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1 10000 -POSTGRES_1_FEATURES_PER_FETCH "$(POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1)" -GUI FLOAT POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGRES_IN_BEGIN_SQL_POSTGRES_1 -POSTGRES_1_BEGIN_SQL "$(POSTGRES_IN_BEGIN_SQL_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_BEGIN_SQL_POSTGRES_1 MODE,SQL;FORMAT,POSTGRES SQL To Run Before Read -DEFAULT_MACRO POSTGRES_IN_END_SQL_POSTGRES_1 -POSTGRES_1_END_SQL "$(POSTGRES_IN_END_SQL_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_END_SQL_POSTGRES_1 MODE,SQL;FORMAT,POSTGRES SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGRES_IN_ATTRIBUTE_READING_POSTGRES_1 DEFLINE_ATTRS -POSTGRES_1_ATTRIBUTE_READING "$(POSTGRES_IN_ATTRIBUTE_READING_POSTGRES_1)" -# ============================================================================ -POSTGRES_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 public -GUI OPTIONAL TEXT POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 Schemas for Table Listing: -POSTGRES_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1) -POSTGRES_1_DATASET "$(SourceDataset_POSTGRES_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FMT:POSTGIS Connection: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1 Yes -POSTGIS_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1 Yes -POSTGIS_1_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1 yes -POSTGIS_1_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1 yes -POSTGIS_1_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 -POSTGIS_1_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1 -POSTGIS_1_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBR_OVERLAPS -POSTGIS_1_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_1)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_1 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1%POSTGIS_IN_BEGIN_SQL_POSTGIS_1%POSTGIS_IN_END_SQL_POSTGIS_1 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 10000 -POSTGIS_1_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_1 -POSTGIS_1_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_1 -POSTGIS_1_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1 DEFLINE_ATTRS -POSTGIS_1_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1)" -# ============================================================================ -POSTGIS_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 public -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Schemas for Table Listing: -POSTGIS_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1) -POSTGIS_1_DATASET "$(SourceDataset_POSTGIS_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_2" -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS_2 FMT:POSTGIS Connection: -POSTGIS_2_PLUGIN_MAX_CHANNELS 1 -DEFAULT_MACRO POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2 Yes -POSTGIS_2_STRICT_TEMPORAL_TYPE_HANDLING "$(POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 POSTGIS_OUT_NAMED_CONNECTION Database Connection -# ============================================================================ -# Write geometry (planar) or geography (geodetic) column -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2 geometry -POSTGIS_2_SPATIAL_COLUMN_TYPE "$(POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2)" -# ============================================================================ -# Default spatial column name -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2 geom -POSTGIS_2_SPATIAL_COLUMN_NAME "$(POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2 yes -POSTGIS_2_GENERIC_GEOMETRY "$(POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2 FEATURE_TYPE -POSTGIS_2_COORDINATE_SYSTEM_GRANULARITY "$(POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_ADVANCED_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_ADVANCED_POSTGIS_2 POSTGIS_OUT_BULK_COPY_POSTGIS_2%POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2%POSTGIS_OUT_START_TRANSACTION_POSTGIS_2%POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2%POSTGIS_OUT_BEGIN_SQL_POSTGIS_2%POSTGIS_OUT_END_SQL_POSTGIS_2 Advanced -DEFAULT_MACRO POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES -POSTGIS_2_BULK_COPY "$(POSTGIS_OUT_BULK_COPY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES%NO Bulk Insert -DEFAULT_MACRO POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 0 -POSTGIS_2_START_TRANSACTION "$(POSTGIS_OUT_START_TRANSACTION_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 Starting Feature: -DEFAULT_MACRO POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 1000 -POSTGIS_2_TRANSACTION_INTERVAL "$(POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 Features Per Transaction -DEFAULT_MACRO POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 NO -POSTGIS_2_INSERT_TEXT_GEOMETRY "$(POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 YES%NO Insert WKT -DEFAULT_MACRO POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 -POSTGIS_2_BEGIN_SQL "$(POSTGIS_OUT_BEGIN_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Write -DEFAULT_MACRO POSTGIS_OUT_END_SQL_POSTGIS_2 -POSTGIS_2_END_SQL "$(POSTGIS_OUT_END_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_END_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run After Write -# ============================================================================ -POSTGIS_2_GENERATE_FME_BUILD_NUM 18592 -POSTGIS_2_DATASET "$(DestDataset_POSTGIS_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_1" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_1 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_1 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_1 -DEFAULT_MACRO DestDataset_GEOJSON_1 $(DestDataset_GEOJSON) -GUI FILENAME DestDataset_GEOJSON_1 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1%GEOJSON_OUT_WRITE_BOM_GEOJSON_1%GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1 UTF-8 -GEOJSON_1_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_1 No -GEOJSON_1_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_1 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Yes -GEOJSON_1_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1%GEOJSON_OUT_INDENT_SIZE_GEOJSON_1%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1 YES -GEOJSON_1_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 0 -GEOJSON_1_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 10 -GEOJSON_1_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1 Yes -GEOJSON_1_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Yes -GEOJSON_1_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 -GEOJSON_1_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_1 Yes -GEOJSON_1_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_1)" -# ============================================================================ -GEOJSON_1_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_1_DATASET "$(DestDataset_GEOJSON_1)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_2" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_2 -DEFAULT_MACRO DestDataset_GEOJSON_2 $(DestDataset_GEOJSON_5) -GUI FILENAME DestDataset_GEOJSON_2 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2%GEOJSON_OUT_WRITE_BOM_GEOJSON_2%GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2 UTF-8 -GEOJSON_2_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_2 No -GEOJSON_2_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_2 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Yes -GEOJSON_2_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2%GEOJSON_OUT_INDENT_SIZE_GEOJSON_2%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2 YES -GEOJSON_2_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 0 -GEOJSON_2_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 10 -GEOJSON_2_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2 Yes -GEOJSON_2_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Yes -GEOJSON_2_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 -GEOJSON_2_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_2 Yes -GEOJSON_2_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_2)" -# ============================================================================ -GEOJSON_2_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_2_DATASET "$(DestDataset_GEOJSON_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_3" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_3 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_3 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_3 -DEFAULT_MACRO DestDataset_GEOJSON_3 $(DestDataset_GEOJSON_4) -GUI FILENAME DestDataset_GEOJSON_3 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3%GEOJSON_OUT_WRITE_BOM_GEOJSON_3%GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3 UTF-8 -GEOJSON_3_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_3 No -GEOJSON_3_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_3 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Yes -GEOJSON_3_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3%GEOJSON_OUT_INDENT_SIZE_GEOJSON_3%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3 YES -GEOJSON_3_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 0 -GEOJSON_3_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 10 -GEOJSON_3_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3 Yes -GEOJSON_3_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Yes -GEOJSON_3_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 -GEOJSON_3_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_3 Yes -GEOJSON_3_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_3)" -# ============================================================================ -GEOJSON_3_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_3_DATASET "$(DestDataset_GEOJSON_3)" -#! END_DEST_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)traitements_phase_3_decoupage.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -DEFAULT_MACRO DATASET_KEYWORD_POSTGRES_1 POSTGRES_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_1 POSTGIS_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_2 POSTGIS_2 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_1 GEOJSON_1 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_2 GEOJSON_2 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_3 GEOJSON_3 -# ------------------------------------------------------------------------- - -POSTGRES_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_2_COORDINATE_SYSTEM EPSG:2154 -GEOJSON_1_COORDINATE_SYSTEM EPSG:4326 -GEOJSON_2_COORDINATE_SYSTEM EPSG:4326 -GEOJSON_3_COORDINATE_SYSTEM EPSG:4326 -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME traitements_phase_3_decoupage -MACRO FME_VIEWER_APP fmedatainspector -# ------------------------------------------------------------------------- - -INCLUDE [ if {[info exists env(FME_TEMP)] && [file isdirectory $env(FME_TEMP)]} {set gVisualizerTemp $env(FME_TEMP)} elseif {[info exists env(TEMP)] && [file isdirectory $env(TEMP)]} {set gVisualizerTemp $env(TEMP)} elseif { $tcl_platform(platform) == "unix" } {set gVisualizerTemp "/tmp"} else {set gVisualizerTemp c:}; regsub -all {[ ,&]} {$(WORKSPACE_NAME)} {_} wsname; set gVisualizerTemp $gVisualizerTemp/${wsname}_[clock format [clock seconds] -format %H%M%S]; puts "MACRO WORKSPACE_TEMP_DIR $gVisualizerTemp"; -MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/inspector.ffs -MACRO VISUALIZER_SCHEMA_FILE $(WORKSPACE_TEMP_DIR)/inspector.fsc -MACRO VISUALIZER_CREATE_SPATIAL_INDEX YES -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE POSTGRES POSTGRES_1::public.secteur multi_reader_keyword,$(DATASET_KEYWORD_POSTGRES_1) TO FME_GENERIC ::public.secteur ALIAS_GEOMETRY ROUTE POSTGIS POSTGIS_1::public.phase_2_trace_pgr multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.phase_2_trace_pgr ALIAS_GEOMETRY ROUTE POSTGIS POSTGIS_1::public.osm_municipalities multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.osm_municipalities ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * -POSTGRES_1_MERGE_DEF POSTGRES_1::public.secteur EXACT public.secteur DEFLINE postgres_type,postgres_none,postgres_sql_where_clause,$(postgres_sql_where_clause$encode),postgres_sql_statement,,id,int4,nom_br,text,nom_fr,text,objectif_km,int4,km_redadeg,int4 -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_2_trace_pgr EXACT public.phase_2_trace_pgr DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,secteur_id,int4,path_seq,int8,node,int8,cost,float8,agg_cost,float8,osm_id,int8,highway,text,type,text,oneway,text,ref,text,name_fr,text,name_br,text -POSTGIS_1_MERGE_DEF POSTGIS_1::public.osm_municipalities EXACT public.osm_municipalities DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,id,serialPrimaryKey,osm_id,int8,type,text,admin_level,text,name,text,name_fr,text,name_br,text,source_name_br,text,admincode,textBTree,postcode,text,wikidata,text,surf_ha,numeric1000500,x,numeric1000500,y,numeric1000500 -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_2_trace_pgr (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.phase_2_trace_pgr OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_0_lZ0XqLzCYmQ= OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_1_dRsdNGVAD0c= -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.osm_municipalities (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.osm_municipalities OUTPUT FEATURE_TYPE public.osm_municipalities_POSTGIS_1 -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.secteur (POSTGRES_1) Splitter" INPUT FEATURE_TYPE public.secteur OUTPUT FEATURE_TYPE public.secteur_POSTGRES_1 -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME BulkAttributeRenamer INPUT FEATURE_TYPE public.osm_municipalities_POSTGIS_1 OUTPUT { FEATURE_TYPE BulkAttributeRenamer_OUTPUT @RenameAttributes(PATTERN_REPLACE, ADDPREFIX, , "", "municipality_", "", "", "-_", "RENAME", "NONFME") } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeRenamer_2 INPUT FEATURE_TYPE public.secteur_POSTGRES_1 ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "id" "secteur_id" "RENAME_SET_DEFAULT" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeRenamer_2 OUTPUT Splitter" INPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT_0_XZPnkgk0+40= OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT_1_/5K/VQuHWx4= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME BulkAttributeRenamer_2 INPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_1_dRsdNGVAD0c= OUTPUT { FEATURE_TYPE BulkAttributeRenamer_2_OUTPUT @RenameAttributes(PATTERN_REPLACE, ADDPREFIX, , "", "way_", "", "", "-_", "RENAME", "NONFME") } -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter_5 INPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_0_lZ0XqLzCYmQ= SORT_BY path_seq NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_5_SORTED -# ------------------------------------------------------------------------- -FACTORY_DEF {*} ArcFactory FACTORY_NAME LineCombiner INPUT FEATURE_TYPE Sorter_5_SORTED END_NODED PRESERVE_ORIENTATION no DEAGGREGATE_GEOMETRY Deaggregate CLOSE_LOOPS yes ACCUMULATE_ATTRIBUTES ONE LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE DIRECTION_NAME "" LINES_AS_SEGMENTS Yes CONSIDER_NODE_ELEVATION NO CONNECT_Z_MODE IGNORE_Z BREAK_CONNECTION_ATTRIBUTES { secteur_id } BREAK_CONNECTION_ACROSS_SETS No OUTPUT LINE FEATURE_TYPE LineCombiner_LINE OUTPUT REJECTED FEATURE_TYPE LineCombiner_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LineCombiner_ INPUT FEATURE_TYPE LineCombiner_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LineCombineroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeKeeper_2_46c800b2_bd82_43bb_b150_f6578c8788dd6_LIST_EXP "; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeKeeper_2 INPUT FEATURE_TYPE LineCombiner_LINE OUTPUT { FEATURE_TYPE AttributeKeeper_2_OUTPUT @KeepAttributes(fme_encoded,objectif_km,km_redadeg,secteur_id,fme_pcre_match,"^fme_$(AttributeKeeper_2_46c800b2_bd82_43bb_b150_f6578c8788dd6_LIST_EXP)") } -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeKeeper_2 OUTPUT Splitter" INPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT OUTPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT_0_muAz4GqwTdk= OUTPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT_1_eKOY+pR0mH0= -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {1_line_by_secteur} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME 1_line_by_secteur_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT_1_eKOY+pR0mH0= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { 1_line_by_secteur } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME 1_line_by_secteur_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA secteur_id,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -INCLUDE [if { {ATTRIBUTES} == {ATTRIBUTES} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO ATTRIBUTES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] -FACTORY_DEF {*} ReferenceFactory FACTORY_NAME FeatureMerger_2 INPUT REFERENCER FEATURE_TYPE AttributeKeeper_2_OUTPUT_0_muAz4GqwTdk= INPUT REFERENCEE FEATURE_TYPE AttributeRenamer_2_OUTPUT_1_/5K/VQuHWx4= REFERENCE_INFO $(FeatureMerger_2_REFERENCE_INFO) REFERENCE_TABLE @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger_2) @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger_2) AUTO ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "REQUESTOR_IF_CONFLICT" IGNORE_NULLS "No" HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES NO REFERENCEES_FIRST No REJECT_INVALID_GEOM YES CLEANING_TOLERANCE OUTPUT COMPLETE FEATURE_TYPE FeatureMerger_2_MERGED OUTPUT REJECTED FEATURE_TYPE FeatureMerger_2_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME FeatureMerger_2_ INPUT FEATURE_TYPE FeatureMerger_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, FeatureMerger_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter_4 INPUT FEATURE_TYPE FeatureMerger_2_MERGED SORT_BY secteur_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_4_SORTED -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter_4 SORTED Splitter" INPUT FEATURE_TYPE Sorter_4_SORTED OUTPUT FEATURE_TYPE Sorter_4_SORTED_0_bGs2+JFzNGU= OUTPUT FEATURE_TYPE Sorter_4_SORTED_1_xZN7XGJzQYs= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Input Input Collector" INPUT FEATURE_TYPE Sorter_4_SORTED_1_xZN7XGJzQYs= OUTPUT FEATURE_TYPE IterativeSnipper_Input -MACRO IterativeSnipper_WORKSPACE_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_XFORMER_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_TRANSFORMER_GROUP -MACRO $(IterativeSnipper_WORKSPACE_NAME)___COMPOUND_PARAMETERS -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SUB_DOC_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SNIPMODE ToLength -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SnipLength @Value(km_redadeg) -DEFAULT_MACRO IterativeSnipper_WORKSPACE_NAME "" -INCLUDE [puts {MACRO WB_OLD_CONTEXT_$(IterativeSnipper_WORKSPACE_NAME) $(WB_CURRENT_CONTEXT)}; puts {MACRO WB_CURRENT_CONTEXT $(IterativeSnipper_WORKSPACE_NAME)}] -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Input1582066741 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1582066741 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_LengthCalculatorInput INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "Iterative_Snipper_length" @Length(REJECTABLE,3,"1") -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_" @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_OUTPUT" @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_" OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, IterativeSnipper_LengthCalculator_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -MACRO OUTPUT_LINE_FTYPE not_selected -MACRO OUTPUT_LINE_FTYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_LINE -MACRO OUTPUT_INSTANCE_FTYPE not_selected -Lookup $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterTable "" "not_selected" fme_line $(OUTPUT_LINE_FTYPE) -MACRO COLLECTION_HANDLING NOT_THIS_TIME -MACRO INSTANCE_FILTERING * -INCLUDE [ if 0 { puts "MACRO COLLECTION_HANDLING *"; if { puts "MACRO INSTANCE_FILTERING NOT_THIS_TIME"; }; }; if {{$(OUTPUT_INSTANCE_FTYPE)} == "not_selected"} { puts "MACRO INSTANCE_FILTERING NOT_THIS_TIME"; }; ] -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_InputPassThrough INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" OUTPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ @Geometry(FIX_FMETYPE_FMEGEOMETRY) -FACTORY_DEF $(INSTANCE_FILTERING) TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_InstanceTest INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ TEST @Geometry(IS_GEOMETRY_INSTANCE) == 1 OUTPUT PASSED FEATURE_TYPE $(OUTPUT_INSTANCE_FTYPE) OUTPUT FAILED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ -FACTORY_DEF $(COLLECTION_HANDLING) TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_CollectionTest INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ TEST &fme_type == "fme_collection" OUTPUT FAILED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ OUTPUT PASSED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Collection___ -FACTORY_DEF $(COLLECTION_HANDLING) DeaggregateFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Deagg INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Collection___ HOMOGENIZE_COLLECTIONS YES RECURSIVE YES SET_FME_TYPE YES INSTANTIATE_GEOMETRY_INSTANCES_NEW OUTPUT POINT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT LINE FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT POLYGON FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT DONUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ OUTPUT AGGREGATE FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterPrepper INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ OUTPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_23e6861c_9582_45b3_b9a7_012163256aaa6_targetFeatureType @Lookup($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterTable,&fme_type) -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Router INPUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ TEST @Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_23e6861c_9582_45b3_b9a7_012163256aaa6_targetFeatureType) != "not_selected" OUTPUT PASSED FEATURE_TYPE * @FeatureType(@Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_23e6861c_9582_45b3_b9a7_012163256aaa6_targetFeatureType)) @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_23e6861c_9582_45b3_b9a7_012163256aaa6_targetFeatureType) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_" @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_23e6861c_9582_45b3_b9a7_012163256aaa6_targetFeatureType) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_" MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "fme_rejection_code" "SET_TO" "INVALID_GEOMETRY_TYPE" } OUTPUT OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT" -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_LengthCalculatorInput INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_LINE" OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "Iterative_Snipper_length" @Length(REJECTABLE,3,"1") -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_" @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_OUTPUT" @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_" OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, IterativeSnipper_LengthCalculatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_OUTPUT" TEST @EvaluateExpression(FDIV,STRING_ENCODED,$($(IterativeSnipper_WORKSPACE_NAME)_SNIPMODE),$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode) = ToNumber ENCODED BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_PASSED" OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_FAILED" -# ------------------------------------------------------------------------- -Tcl2 proc $(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_doFetch {} { foreach {name val} {"Iterative_Snipper_maxLength {$($(IterativeSnipper_WORKSPACE_NAME)_SnipLength$encode)}"} { if { [string match {**} $val] == 1 } { set val [FME_Execute EvaluateExpression {STRING} $val {$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher}]; } elseif {[string match {*FME_CONDITIONAL*} $val] == 1} { set val [FME_Execute EvaluateExpression {STRING} $val {$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher}]; } else { set val [FME_DecodeTextOrAttr $val]; }; FME_SetAttribute [FME_DecodeText $name] $val } } -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_FAILED" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_OUTPUT" @Tcl2($(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_doFetch) -# ------------------------------------------------------------------------- -INCLUDE TCL - if {{OUTGOING} == {OUTGOING}} { set attrs [list {Iterative_Snipper_maxLength}]; } else { set attrAll {}; if {[string length $attrAll] == 0} { return; }; set attrs [split {} { }]; }; if {{NO_OP} == {NO_OP}} { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV; } else { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV_MULTI_FEATURE; }; foreach attr $attrs { lappend parmList $attr; lappend parmList {ValueIterative_Snipper_lengthdouble$($(IterativeSnipper_WORKSPACE_NAME)_SnipLength$encode)}; lappend parmList {FLOAT}; }; lappend parmList {$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator}; if {{NO_OP} == {OTHER_NULL_VALUE_2}} { lappend parmList {NO_OP}; lappend parmList {}; lappend parmList {0}; }; puts "MACRO __fme_expressionevaluator_evaluateArgs__ [join $parmList ,]"; -END_INCLUDE -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_PASSED" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator_OUTPUT" @EvaluateExpression($(__fme_expressionevaluator_evaluateArgs__)) -MACRO __fme_expressionevaluator_evaluateArgs__ -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Tester INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_OUTPUT" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator_OUTPUT" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_OUTPUT" TEST @EvaluateExpression(FDIV,STRING_ENCODED,ValueIterative_Snipper_length,$(IterativeSnipper_WORKSPACE_NAME)_Tester) <= @EvaluateExpression(FDIV,STRING_ENCODED,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Tester) ENCODED BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_PASSED" OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_FAILED" -# ------------------------------------------------------------------------- -# The Snipper takes the constant "end" to mean the last vertex of the line, -# but Workbench won't let us put an alpha string into the "last vertex" textfield. -# We'll interpret an ending vertex of -1 as being the same as "end". -# This is used only in the distance and percentage. -Tcl2 proc $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex {numIndex} { if {$numIndex < 0} { return "end"; } else { return $numIndex; } } -INCLUDE [ if { ({DISTANCE} == {DISTANCE} || {DISTANCE} == {PERCENTAGE}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip(@Tcl2("$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex 0"),@Tcl2("$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex @EvaluateExpression(FLOAT,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3)"),DISTANCE,3D,OUTPUT_REMNANT)}; } elseif { ({DISTANCE} == {MEASURE_RELATIVE_FROM_START} || {DISTANCE} == {MEASURE_REAL_VALUES}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip("0", "@EvaluateExpression(FLOAT,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3)", "", DISTANCE,OUTPUT_REMNANT)}; } elseif { ({DISTANCE} == {VERTEX}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip("","",VERTEX,OUTPUT_REMNANT)}; } ] -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Aggfilter INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_FAILED" TEST @Value(fme_geometry) != "fme_aggregate" OUTPUT PASSED FEATURE_TYPE ___TO_TYPEFILTER___ OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_" @SupplyAttributes(fme_rejection_code,INVALID_GEOMETRY_TYPE) -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Typefilter INPUT FEATURE_TYPE ___TO_TYPEFILTER___ TEST @Value(fme_type) == "fme_line" TEST @Value(fme_type) == "fme_arc" TEST @Value(fme_geometry) == "fme_polygon" BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE ___TO_INPUT___ OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_" @SupplyAttributes(fme_rejection_code,INVALID_GEOMETRY_TYPE) -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Input INPUT FEATURE_TYPE ___TO_INPUT___ OUTPUT FEATURE_TYPE ____TO_DEAGGREGATOR____ $($(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc) -FACTORY_DEF * DeaggregateFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_SplitRemnants INPUT FEATURE_TYPE ____TO_DEAGGREGATOR____ RECURSIVE No SPLIT_COMPOSITES No SET_FME_TYPE Yes PART_NUMBER_FIELD _part_number GEOMETRY_NAME_FIELD _geometry_name OUTPUT POINT FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT LINE FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT POLYGON FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT DONUT FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT AGGREGATE FEATURE_TYPE ___TO_NULLNUKER___ -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_NullNuker INPUT FEATURE_TYPE ___TO_NULLNUKER___ TEST @Value(_part_number) == 0 TEST @NumCoords() == 0 BOOLEAN_OPERATOR AND OUTPUT FAILED FEATURE_TYPE ___TO_OUTPUTTER___ -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Outputter INPUT FEATURE_TYPE ___TO_OUTPUTTER___ TEST @Value(_part_number) == 0 TEST @Tcl2("FME_AttributeExists _part_number") == 0 BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_OUTPUT" @RemoveAttributes(_part_number) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_REMNANTS" @RemoveAttributes(_part_number) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_" OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, IterativeSnipper_Snipper_3outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_EXP "; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_PASSED" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_OUTPUT" OUTPUT { FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" @RemoveAttributes(fme_encoded,Iterative_Snipper_length,Iterative_Snipper_maxLength) @RemoveAttributes(fme_pcre_match"$($(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_EXP)") } -FACTORY_DEF * BranchingFactory TARGET_FACTORY "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1582066741 Input Splitter" FACTORY_NAME "Loop to $(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1582066741 Input Splitter" MAXIMUM_COUNT -1 INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_REMNANTS" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Output1582066741 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Output" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_1582066741 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_" -INCLUDE [puts {MACRO WB_CURRENT_CONTEXT $(WB_OLD_CONTEXT_$(IterativeSnipper_WORKSPACE_NAME))}] -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Output Output Renamer/Nuker" INPUT FEATURE_TYPE IterativeSnipper_Output OUTPUT FEATURE_TYPE IterativeSnipper_Output -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Output Renamer/Nuker" INPUT FEATURE_TYPE IterativeSnipper_ OUTPUT FEATURE_TYPE IterativeSnipper_ -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {IterativeSnipper__Rejected_} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME IterativeSnipper__Rejected__Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE IterativeSnipper_ GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { IterativeSnipper__Rejected_ } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME IterativeSnipper__Rejected__Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA fme_rejection_code,varchar255,secteur_id,varchar255,nom_br,varchar255,nom_fr,varchar255,objectif_km,varchar255,km_redadeg,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -# Create the DomainName that this transformer will use. -# Because @Count itself will evalute the expression to calculate the -# domain, we don't need to do anything in Tcl per feature going by -INCLUDE [ set domainPrefix {}; if { {Local} == {Local} } { set domainPrefix [FME_EncodeText {Counter_2_}]; }; puts "MACRO Counter_2_FULL_DOMAIN ${domainPrefix}troncon_id"; ] -FACTORY_DEF * ExecuteFunctionFactory FACTORY_NAME Counter_2_Rejector COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE IterativeSnipper_Output FUNCTION_DEFINITION @Count(REJECTABLE_WITH_FLAG,fme_encoded,$(Counter_2_FULL_DOMAIN),"@EvaluateExpression(FDIV,FLOAT,$(START$encode),Counter_2)") RESULT_ATTRIBUTE "troncon_id" OUTPUT COMPLETE FEATURE_TYPE Counter_2_OUTPUT OUTPUT REJECTED FEATURE_TYPE Counter_2_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME Counter_2_ INPUT FEATURE_TYPE Counter_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, Counter_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_LengthCalculatorInput INPUT FEATURE_TYPE Counter_2_OUTPUT OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "longueur" @Length(REJECTABLE,2,"1") -FACTORY_DEF * TestFactory FACTORY_NAME LengthCalculator_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE LengthCalculator_ @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE LengthCalculator_OUTPUT @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_ INPUT FEATURE_TYPE LengthCalculator_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LengthCalculatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter_3 INPUT FEATURE_TYPE LengthCalculator_OUTPUT SORT_BY secteur_id NUMERIC ASCENDING troncon_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_3_SORTED -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter_3 SORTED Splitter" INPUT FEATURE_TYPE Sorter_3_SORTED OUTPUT FEATURE_TYPE Sorter_3_SORTED_0_fFLYyOM90A0= OUTPUT FEATURE_TYPE Sorter_3_SORTED_1_2tOcv2i/uGI= OUTPUT FEATURE_TYPE Sorter_3_SORTED_2_h/1Aw1J8BQA= OUTPUT FEATURE_TYPE Sorter_3_SORTED_3_XoGbwsXKD4g= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "2_tronçons (Disabled) Nuker" INPUT FEATURE_TYPE Sorter_3_SORTED_2_h/1Aw1J8BQA= -# ------------------------------------------------------------------------- -Tcl2 set {CoordinateConcatenator_coordDelim} [FME_DecodeText {|}]; -Tcl2 set {CoordinateConcatenator_elementDelim} [FME_DecodeText {}]; -Tcl2 proc CoordinateConcatenator_coord_list {DIM} { global {CoordinateConcatenator_coordDelim}; global {CoordinateConcatenator_elementDelim}; set numCoords [FME_Coordinates numCoords]; set output {}; set includeX [string first {X} {Y X} ]; set includeY [string first {Y} {Y X} ]; set includeZ [string first {Z} {Y X} ]; if { $includeX == -1 && $includeY == -1 && $includeZ == -1 } { FME_SetAttribute _coordinates $output; return; }; for {set i 0} {$i < $numCoords} {incr i} { if {$includeX != -1} { append output [FME_Coordinates getCoord x $i]; }; if {$includeY != -1} { if {$includeX != -1} { append output [set {CoordinateConcatenator_elementDelim}] [FME_Coordinates getCoord y $i]; } else { append output [FME_Coordinates getCoord y $i]; }; }; if { $DIM == 3 && $includeZ != -1 } { if { $includeX != -1 || $includeY != -1 } { append output [set {CoordinateConcatenator_elementDelim}] [FME_Coordinates getCoord z $i]; } else { append output [FME_Coordinates getCoord z $i]; }; }; if {$i < ($numCoords - 1)} { append output [set {CoordinateConcatenator_coordDelim}] }; }; FME_SetAttribute _coordinates $output; } -FACTORY_DEF * TeeFactory FACTORY_NAME CoordinateConcatenator INPUT FEATURE_TYPE Sorter_3_SORTED_1_2tOcv2i/uGI= OUTPUT FEATURE_TYPE CoordinateConcatenator_OUTPUT @Tcl2("CoordinateConcatenator_coord_list @Dimension()") -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_8affaf1f_2774_4c17_90e4_868e02e665736_splitDelim [FME_DecodeText {|}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_8affaf1f_2774_4c17_90e4_868e02e665736_splitDelim]] } { set AttributeSplitter_8affaf1f_2774_4c17_90e4_868e02e665736_splitWidths [split [regsub -all {s$} {|} {}] s]; proc AttributeSplitter_doSplit {} { global AttributeSplitter_8affaf1f_2774_4c17_90e4_868e02e665736_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set attrNum 0; set listName [FME_DecodeText {_coords}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_8affaf1f_2774_4c17_90e4_868e02e665736_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_doSplit {} { global AttributeSplitter_8affaf1f_2774_4c17_90e4_868e02e665736_splitDelim; set delim [set AttributeSplitter_8affaf1f_2774_4c17_90e4_868e02e665736_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter INPUT FEATURE_TYPE CoordinateConcatenator_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_OUTPUT @Tcl2(AttributeSplitter_doSplit) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME ListElementCounter INPUT FEATURE_TYPE AttributeSplitter_OUTPUT OUTPUT FEATURE_TYPE ListElementCounter_OUTPUT "_vertex_count" @NumElements("_coords",ENCODED) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME GeometryRemover INPUT FEATURE_TYPE ListElementCounter_OUTPUT OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT @RemoveGeometry() -FACTORY_DEF * TeeFactory FACTORY_NAME "GeometryRemover OUTPUT Splitter" INPUT FEATURE_TYPE GeometryRemover_OUTPUT OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT_0_lyMsYNg46jM= OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT_1_OUiOuQAK2cA= -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_4_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_4_IntTester INPUT FEATURE_TYPE GeometryRemover_OUTPUT_1_OUiOuQAK2cA= TEST "@EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4)" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_4_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_4_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "@EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4)" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_4_OUTPUT @Tcl2("ListIndexer_4_indexer @EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4) 0 {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_4_OUTPUT @Tcl2("ListIndexer_4_indexer @EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4) @NumElements(_coords{}) {}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_4_ INPUT FEATURE_TYPE ListIndexer_4_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_4outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_3_d955635c_c939_4478_bd25_c88a0c1c611c6_splitDelim [FME_DecodeText {}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_3_d955635c_c939_4478_bd25_c88a0c1c611c6_splitDelim]] } { set AttributeSplitter_3_d955635c_c939_4478_bd25_c88a0c1c611c6_splitWidths [split [regsub -all {s$} {} {}] s]; proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_d955635c_c939_4478_bd25_c88a0c1c611c6_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_3_d955635c_c939_4478_bd25_c88a0c1c611c6_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_d955635c_c939_4478_bd25_c88a0c1c611c6_splitDelim; set delim [set AttributeSplitter_3_d955635c_c939_4478_bd25_c88a0c1c611c6_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter_3 INPUT FEATURE_TYPE ListIndexer_4_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_3_OUTPUT @Tcl2(AttributeSplitter_3_doSplit) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_5_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_5_IntTester INPUT FEATURE_TYPE AttributeSplitter_3_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_5_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_5_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_5_OUTPUT @Tcl2("ListIndexer_5_indexer 0 0 {x}") OUTPUT FAILED FEATURE_TYPE ListIndexer_5_OUTPUT @Tcl2("ListIndexer_5_indexer 0 @NumElements(_coords_vertex{}) {x}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_5_ INPUT FEATURE_TYPE ListIndexer_5_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_5outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_6_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_6_IntTester INPUT FEATURE_TYPE ListIndexer_5_OUTPUT TEST "1" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_6_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_6_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "1" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_6_OUTPUT @Tcl2("ListIndexer_6_indexer 1 0 {y}") OUTPUT FAILED FEATURE_TYPE ListIndexer_6_OUTPUT @Tcl2("ListIndexer_6_indexer 1 @NumElements(_coords_vertex{}) {y}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_6_ INPUT FEATURE_TYPE ListIndexer_6_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_6outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeRemover_2_LIST_EXP "; foreach attr [split "_coords_vertex _coords"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeRemover_2 INPUT FEATURE_TYPE ListIndexer_6_OUTPUT OUTPUT { FEATURE_TYPE AttributeRemover_2_OUTPUT @RemoveAttributes(fme_encoded,_coords_vertex0,_coords,_coords0) @RemoveAttributes(fme_pcre_match"$(AttributeRemover_2_LIST_EXP)") } -# ------------------------------------------------------------------------- -FACTORY_DEF * VertexCreatorFactory FACTORY_NAME VertexCreator_2 INPUT FEATURE_TYPE AttributeRemover_2_OUTPUT MODE ADD INDEX "" CONTINUE_ON_ERROR YES XVAL "@EvaluateExpression(FDIV,FLOAT,Valuex_coords_vertex,VertexCreator_2)" YVAL "@EvaluateExpression(FDIV,FLOAT,Valuey_coords_vertex,VertexCreator_2)" OUTPUT OUTPUT FEATURE_TYPE VertexCreator_2_OUTPUT OUTPUT REJECTED FEATURE_TYPE VertexCreator_2_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME VertexCreator_2_ INPUT FEATURE_TYPE VertexCreator_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, VertexCreator_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME AttributeCreator_2 COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE VertexCreator_2_OUTPUT MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "position_vertex" "SET_TO" "fin" } OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeCreator_2 OUTPUT Splitter" INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_0_j0uI5yR3ojs= OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_1_RySErNGX5NA= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "Vertex_fin (Disabled) Nuker" INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_0_j0uI5yR3ojs= -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_IntTester INPUT FEATURE_TYPE GeometryRemover_OUTPUT_0_lyMsYNg46jM= TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_OUTPUT @Tcl2("ListIndexer_indexer 0 0 {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_OUTPUT @Tcl2("ListIndexer_indexer 0 @NumElements(_coords{}) {}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_ INPUT FEATURE_TYPE ListIndexer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_2_bf6d2454_f5a3_44ec_8e43_f1d833573f466_splitDelim [FME_DecodeText {}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_2_bf6d2454_f5a3_44ec_8e43_f1d833573f466_splitDelim]] } { set AttributeSplitter_2_bf6d2454_f5a3_44ec_8e43_f1d833573f466_splitWidths [split [regsub -all {s$} {} {}] s]; proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_bf6d2454_f5a3_44ec_8e43_f1d833573f466_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_2_bf6d2454_f5a3_44ec_8e43_f1d833573f466_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_bf6d2454_f5a3_44ec_8e43_f1d833573f466_splitDelim; set delim [set AttributeSplitter_2_bf6d2454_f5a3_44ec_8e43_f1d833573f466_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter_2 INPUT FEATURE_TYPE ListIndexer_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_2_OUTPUT @Tcl2(AttributeSplitter_2_doSplit) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_2_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_2_IntTester INPUT FEATURE_TYPE AttributeSplitter_2_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_2_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_2_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_2_OUTPUT @Tcl2("ListIndexer_2_indexer 0 0 {x}") OUTPUT FAILED FEATURE_TYPE ListIndexer_2_OUTPUT @Tcl2("ListIndexer_2_indexer 0 @NumElements(_coords_vertex{}) {x}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_2_ INPUT FEATURE_TYPE ListIndexer_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_3_indexer {index numElements prefix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_3_IntTester INPUT FEATURE_TYPE ListIndexer_2_OUTPUT TEST "1" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_3_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_3_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "1" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_3_OUTPUT @Tcl2("ListIndexer_3_indexer 1 0 {y}") OUTPUT FAILED FEATURE_TYPE ListIndexer_3_OUTPUT @Tcl2("ListIndexer_3_indexer 1 @NumElements(_coords_vertex{}) {y}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_3_ INPUT FEATURE_TYPE ListIndexer_3_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_3outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeRemover_LIST_EXP "; foreach attr [split "_coords_vertex"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeRemover INPUT FEATURE_TYPE ListIndexer_3_OUTPUT OUTPUT { FEATURE_TYPE AttributeRemover_OUTPUT @RemoveAttributes(fme_encoded,_coords_vertex0,_coords0,_coordinates) @RemoveAttributes(fme_pcre_match"$(AttributeRemover_LIST_EXP)") } -# ------------------------------------------------------------------------- -FACTORY_DEF * VertexCreatorFactory FACTORY_NAME VertexCreator INPUT FEATURE_TYPE AttributeRemover_OUTPUT MODE ADD INDEX "" CONTINUE_ON_ERROR YES XVAL "@EvaluateExpression(FDIV,FLOAT,Valuex_coords_vertex,VertexCreator)" YVAL "@EvaluateExpression(FDIV,FLOAT,Valuey_coords_vertex,VertexCreator)" OUTPUT OUTPUT FEATURE_TYPE VertexCreator_OUTPUT OUTPUT REJECTED FEATURE_TYPE VertexCreator_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME VertexCreator_ INPUT FEATURE_TYPE VertexCreator_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, VertexCreatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME AttributeCreator COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE VertexCreator_OUTPUT MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "position_vertex" "SET_TO" "debut" } OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeCreator OUTPUT Splitter" INPUT FEATURE_TYPE AttributeCreator_OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT_0_lQ+3mj5tm0E= OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT_1_Et/p63Aqn4M= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "Vertex_debut (Disabled) Nuker" INPUT FEATURE_TYPE AttributeCreator_OUTPUT_1_Et/p63Aqn4M= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} DuplicateRemoverFactory FACTORY_NAME DuplicateFilter COMMAND_PARM_EVALUATION SINGLE_PASS SUPPORTS_FEATURE_TABLES INPUT FEATURE_TYPE AttributeCreator_OUTPUT_0_lQ+3mj5tm0E= INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_1_RySErNGX5NA= KEY_ATTRIBUTES { y_coords_vertex x_coords_vertex } INPUT_IS_ORDERED NO OUTPUT DUPLICATE FEATURE_TYPE DuplicateFilter_DUPLICATE OUTPUT UNIQUE FEATURE_TYPE DuplicateFilter_UNIQUE -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "DuplicateFilter_Duplicate (Disabled) Nuker" INPUT FEATURE_TYPE DuplicateFilter_DUPLICATE -# ------------------------------------------------------------------------- -INCLUDE [ set macroLine "MACRO AttributeRemover_3_LIST_EXP "; foreach attr [split "_coords"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append macroLine ",^$attr$"; }; puts $macroLine; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME AttributeRemover_3 INPUT FEATURE_TYPE DuplicateFilter_UNIQUE OUTPUT { FEATURE_TYPE AttributeRemover_3_OUTPUT @RemoveAttributes(fme_encoded,_coords,path_seq,_vertex_count,_coordinates) @RemoveAttributes(fme_pcre_match"$(AttributeRemover_3_LIST_EXP)") } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} OverlayFactory FACTORY_NAME PointOnLineOverlayer INPUT LINE FEATURE_TYPE BulkAttributeRenamer_2_OUTPUT INPUT POINT FEATURE_TYPE AttributeRemover_3_OUTPUT TOLERANCE 1 OVERLAP_COUNT_ATTRIBUTE "_overlaps" DEAGGREGATE_INPUT Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" LIST_NAME "" LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE CANDIDATE_LIST_NAME "" CANDIDATE_LIST_ATTRS_TO_INCLUDE { } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE MODE COMPLETE OVERLAY_TYPE POINT_ON_LINE OUTPUT POINT FEATURE_TYPE PointOnLineOverlayer_POINT OUTPUT ILLEGAL_GEOM FEATURE_TYPE PointOnLineOverlayer_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME PointOnLineOverlayer_ INPUT FEATURE_TYPE PointOnLineOverlayer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, PointOnLineOverlayeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} OverlayFactory FACTORY_NAME PointOnAreaOverlayer INPUT POINT FEATURE_TYPE PointOnLineOverlayer_POINT INPUT POLYGON FEATURE_TYPE BulkAttributeRenamer_OUTPUT OVERLAP_COUNT_ATTRIBUTE "_overlaps" DEAGGREGATE_INPUT Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" LIST_NAME "" LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE CANDIDATE_LIST_NAME "" CANDIDATE_LIST_ATTRS_TO_INCLUDE { } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE MODE COMPLETE OVERLAY_TYPE POINT_ON_AREA POLYS_FIRST "NO" REJECT_INVALID_GEOM YES OUTPUT POINT FEATURE_TYPE PointOnAreaOverlayer_POINT OUTPUT ILLEGAL_GEOM FEATURE_TYPE PointOnAreaOverlayer_ -FACTORY_DEF * TeeFactory FACTORY_NAME "PointOnAreaOverlayer POINT Splitter" INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT OUTPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_0_ZK7VGYHSo24= OUTPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_1_x2WusK23Nmo= -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME PointOnAreaOverlayer_ INPUT FEATURE_TYPE PointOnAreaOverlayer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, PointOnAreaOverlayeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "PointOnAreaOverlayer_Point (Disabled) Nuker" INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_1_x2WusK23Nmo= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME CoordinateSystemSetter INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_0_ZK7VGYHSo24= OUTPUT FEATURE_TYPE CoordinateSystemSetter_OUTPUT @CoordSys("EPSG:2154") -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory INPUT FEATURE_TYPE CoordinateSystemSetter_OUTPUT TEST "Specify Coordinate" == "All Coordinates" OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_PASSED OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_FAILED -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_PASSED INPUT FEATURE_TYPE CoordinateExtractor_PASSED TEST @Dimension() == 2 OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_OUTPUT @ZValue("") @Coordinate(x,ALL,""{}.x,FLATTEN_AGGREGATE,YES) @Coordinate(y,ALL,""{}.y,FLATTEN_AGGREGATE,NO) @Coordinate(z,ALL,""{}.z,FLATTEN_AGGREGATE,NO) @Dimension(2) OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT @Coordinate(x,ALL,""{}.x,FLATTEN_AGGREGATE,YES) @Coordinate(y,ALL,""{}.y,FLATTEN_AGGREGATE,NO) @Coordinate(z,ALL,""{}.z,FLATTEN_AGGREGATE,NO) -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_FAILED INPUT FEATURE_TYPE CoordinateExtractor_FAILED TEST @Dimension() == 2 OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_FAILED_PASSED OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_FAILED_PASSED INPUT FEATURE_TYPE CoordinateExtractor_FAILED_PASSED TEST "" == "" OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) -# ------------------------------------------------------------------------- -Tcl2 proc AttributeRounder_round {places} { set attrs [split {pk_y pk_x} { }]; foreach attr $attrs { set attr [FME_DecodeText $attr]; set original [FME_GetAttribute $attr]; if {$original == {} || [FME_IsAttributeNull $attr]} { FME_LogMessage fme_warn 917357 {AttributeRounder} $attr; continue; }; set comment {"do not attempt rounding if not a number"}; if {[string is double $original] == 0} {continue}; if { [catch { set multiplier [expr pow(10,$places)]; set result [expr "round($original * $multiplier) / $multiplier"]; set comment {"when rounding integers, chop trailing .0 from the value"}; if {$places == 0 || [string is wideinteger $original] == 1} { set result [regsub {[.]0*$} $result {}]; }; };] == 0 } { FME_SetAttribute $attr $result; } else { FME_LogMessage fme_warn 917350 {AttributeRounder} $attr; }; }; } -FACTORY_DEF * TestFactory FACTORY_NAME AttributeRounder INPUT FEATURE_TYPE CoordinateExtractor_OUTPUT TEST "2" TYPE INT ENCODED OUTPUT FAILED FEATURE_TYPE AttributeRounder_ fme_rejection_code "INVALID_PARAMETER_DECIMAL_PLACES" OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_AttributeRounder INPUT FEATURE_TYPE __toOutput__ OUTPUT FEATURE_TYPE AttributeRounder_OUTPUT @Tcl2("AttributeRounder_round 2") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_ INPUT FEATURE_TYPE AttributeRounder_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, AttributeRounderoutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeCopier INPUT FEATURE_TYPE AttributeRounder_OUTPUT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "pk_y" "pk_lat" "COPY" "" } ATTR_ACTION { "pk_x" "pk_long" "COPY" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeCopier_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeReprojector INPUT FEATURE_TYPE AttributeCopier_OUTPUT OUTPUT FEATURE_TYPE AttributeReprojector_OUTPUT @Reproject("EPSG:2154","LL-WGS84","pk_long","pk_lat") -# ------------------------------------------------------------------------- -Tcl2 proc AttributeRounder_2_round {places} { set attrs [split {longueur} { }]; foreach attr $attrs { set attr [FME_DecodeText $attr]; set original [FME_GetAttribute $attr]; if {$original == {} || [FME_IsAttributeNull $attr]} { FME_LogMessage fme_warn 917357 {AttributeRounder_2} $attr; continue; }; set comment {"do not attempt rounding if not a number"}; if {[string is double $original] == 0} {continue}; if { [catch { set multiplier [expr pow(10,$places)]; set result [expr "round($original * $multiplier) / $multiplier"]; set comment {"when rounding integers, chop trailing .0 from the value"}; if {$places == 0 || [string is wideinteger $original] == 1} { set result [regsub {[.]0*$} $result {}]; }; };] == 0 } { FME_SetAttribute $attr $result; } else { FME_LogMessage fme_warn 917350 {AttributeRounder_2} $attr; }; }; } -FACTORY_DEF * TestFactory FACTORY_NAME AttributeRounder_2 INPUT FEATURE_TYPE AttributeReprojector_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT FAILED FEATURE_TYPE AttributeRounder_2_ fme_rejection_code "INVALID_PARAMETER_DECIMAL_PLACES" OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_2_AttributeRounder INPUT FEATURE_TYPE __toOutput__ OUTPUT FEATURE_TYPE AttributeRounder_2_OUTPUT @Tcl2("AttributeRounder_2_round 0") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_2_ INPUT FEATURE_TYPE AttributeRounder_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, AttributeRounder_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeRenamer INPUT FEATURE_TYPE AttributeRounder_2_OUTPUT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "municipality_nom" "municipality_name_fr" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "longueur" "length_real" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "km_redadeg" "length_theorical" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "municipality_admincode" "municipality_admincode" "RENAME_SET_DEFAULT" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter_2 INPUT FEATURE_TYPE AttributeRenamer_OUTPUT SORT_BY secteur_id NUMERIC ASCENDING troncon_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_2_SORTED -# ------------------------------------------------------------------------- -# Create the DomainName that this transformer will use. -# Because @Count itself will evalute the expression to calculate the -# domain, we don't need to do anything in Tcl per feature going by -INCLUDE [ set domainPrefix {}; if { {Local} == {Local} } { set domainPrefix [FME_EncodeText {Counter_}]; }; puts "MACRO Counter_FULL_DOMAIN ${domainPrefix}pk_id"; ] -FACTORY_DEF * ExecuteFunctionFactory FACTORY_NAME Counter_Rejector COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE Sorter_2_SORTED FUNCTION_DEFINITION @Count(REJECTABLE_WITH_FLAG,fme_encoded,$(Counter_FULL_DOMAIN),"@EvaluateExpression(FDIV,FLOAT,$(START$encode),Counter)") RESULT_ATTRIBUTE "pk_id" OUTPUT COMPLETE FEATURE_TYPE Counter_OUTPUT OUTPUT REJECTED FEATURE_TYPE Counter_ -FACTORY_DEF * TeeFactory FACTORY_NAME "Counter OUTPUT Splitter" INPUT FEATURE_TYPE Counter_OUTPUT OUTPUT FEATURE_TYPE Counter_OUTPUT_0_/sTFA1dnbN8= OUTPUT FEATURE_TYPE Counter_OUTPUT_1_bU15iCfwGHA= OUTPUT FEATURE_TYPE Counter_OUTPUT_2_pA+nVUfM3k0= OUTPUT FEATURE_TYPE Counter_OUTPUT_3_WeyqcBK0djk= -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME Counter_ INPUT FEATURE_TYPE Counter_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, CounteroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} ConnectionFactory FACTORY_NAME LineBuilder INPUT FEATURE_TYPE Counter_OUTPUT_2_pA+nVUfM3k0= ACCUM_INPUT_ATTRS One LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE REMOVE_DUPLICATES NO OUTPUT LINE FEATURE_TYPE LineBuilder_LINE OUTPUT BAD_INPUT FEATURE_TYPE LineBuilder_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LineBuilder_ INPUT FEATURE_TYPE LineBuilder_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LineBuilderoutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "pk (Disabled) Nuker" INPUT FEATURE_TYPE Counter_OUTPUT_0_/sTFA1dnbN8= -# ------------------------------------------------------------------------- -INCLUDE [if { {ATTRIBUTES} == {ATTRIBUTES} } { puts "MACRO FeatureMerger_REFERENCE_INFO ATTRIBUTES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] -FACTORY_DEF {*} ReferenceFactory FACTORY_NAME FeatureMerger INPUT REFERENCER FEATURE_TYPE Sorter_4_SORTED_0_bGs2+JFzNGU= INPUT REFERENCEE FEATURE_TYPE AttributeRenamer_2_OUTPUT_0_XZPnkgk0+40= REFERENCE_INFO $(FeatureMerger_REFERENCE_INFO) REFERENCE_TABLE @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger) @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger) AUTO ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "REQUESTOR_IF_CONFLICT" IGNORE_NULLS "No" HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES NO REFERENCEES_FIRST No REJECT_INVALID_GEOM YES CLEANING_TOLERANCE OUTPUT COMPLETE FEATURE_TYPE FeatureMerger_MERGED OUTPUT REJECTED FEATURE_TYPE FeatureMerger_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME FeatureMerger_ INPUT FEATURE_TYPE FeatureMerger_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, FeatureMergeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_2_LengthCalculatorInput INPUT FEATURE_TYPE FeatureMerger_MERGED OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_2_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "km_reels" @Length(REJECTABLE,2,"1") -FACTORY_DEF * TestFactory FACTORY_NAME LengthCalculator_2_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE LengthCalculator_2_ @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE LengthCalculator_2_OUTPUT @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_2_ INPUT FEATURE_TYPE LengthCalculator_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LengthCalculator_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 regsub {^[^a-zA-Z]*([a-zA-Z]).*} {.2f} {\1} formatChar; if { [string first $formatChar {duiofxeEgG}] != -1 } { proc {StringFormatter_getAttribute} {attr} { return [regsub {^(-?)0*(.)} [FME_GetAttribute $attr] {\1\2}] } } else { proc {StringFormatter_getAttribute} {attr} { return [FME_GetAttribute $attr] } } -Tcl2 proc StringFormatter_formatter {} { set attrs [split {km_reels} {,}]; foreach attr $attrs { set attrVal [FME_GetAttribute $attr]; set length [string length $attrVal]; if {$length > 0} { FME_SetAttribute $attr [format %.2f [{StringFormatter_getAttribute} $attr]]; }; }; } -FACTORY_DEF * TeeFactory FACTORY_NAME StringFormatter INPUT FEATURE_TYPE LengthCalculator_2_OUTPUT OUTPUT FEATURE_TYPE StringFormatter_OUTPUT @Tcl2(StringFormatter_formatter) -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter INPUT FEATURE_TYPE StringFormatter_OUTPUT SORT_BY secteur_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_SORTED -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter SORTED Splitter" INPUT FEATURE_TYPE Sorter_SORTED OUTPUT FEATURE_TYPE Sorter_SORTED_0_3iJewJ+xcb8= OUTPUT FEATURE_TYPE Sorter_SORTED_1_AdG4IKX8gxs= OUTPUT FEATURE_TYPE Sorter_SORTED_2_WrWvotwy67E= -# ------------------------------------------------------------------------- -INCLUDE TCL - if {{OUTGOING} == {OUTGOING}} { set attrs [list {km_reels}]; } else { set attrAll {}; if {[string length $attrAll] == 0} { return; }; set attrs [split {} { }]; }; if {{NO_OP} == {NO_OP}} { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV; } else { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV_MULTI_FEATURE; }; foreach attr $attrs { lappend parmList $attr; lappend parmList {roundLength10001}; lappend parmList {FLOAT}; }; lappend parmList {ExpressionEvaluator_2}; if {{NO_OP} == {OTHER_NULL_VALUE_2}} { lappend parmList {NO_OP}; lappend parmList {}; lappend parmList {0}; }; puts "MACRO __fme_expressionevaluator_evaluateArgs__ [join $parmList ,]"; -END_INCLUDE -FACTORY_DEF * TeeFactory FACTORY_NAME ExpressionEvaluator_2 INPUT FEATURE_TYPE Sorter_SORTED_2_WrWvotwy67E= OUTPUT FEATURE_TYPE ExpressionEvaluator_2_OUTPUT @EvaluateExpression($(__fme_expressionevaluator_evaluateArgs__)) -MACRO __fme_expressionevaluator_evaluateArgs__ -# ------------------------------------------------------------------------- -FACTORY_DEF * GeneralizeFactory FACTORY_NAME Generalizer_2 INPUT FEATURE_TYPE ExpressionEvaluator_2_OUTPUT REJECT_INVALID_GEOM Yes ALLOW_NULLS yes REJECT_NOT_DEFAULT Yes PRESERVE_SHARED_BOUNDARIES Yes PRESERVE_PATH_SEGMENTS YES ALGORITHM Douglas TOLERANCE "10" CLEANING_TOLERANCE NONE OUTPUT GENERALIZED FEATURE_TYPE Generalizer_2_OUTPUT OUTPUT REJECTED FEATURE_TYPE Generalizer_2_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME Generalizer_2_ INPUT FEATURE_TYPE Generalizer_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, Generalizer_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -DEFAULT_MACRO Aggregator_BREAK_ATTR -INCLUDE [if {"No" == "Yes"} {puts {MACRO Aggregator_BREAK_ATTR BREAK_BEFORE_FIELD_CHANGE secteur_id} }] -FACTORY_DEF {*} AggregateFactory FACTORY_NAME Aggregator INPUT FEATURE_TYPE Sorter_SORTED_1_AdG4IKX8gxs= MODE ONE_LEVEL GROUP_BY { secteur_id } $(Aggregator_BREAK_ATTR) REMOVE_GEOMETRY NO ACCUMULATE_ATTRIBUTES One LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE SEPARATOR PRODUCE_MULTIS YES OUTPUT AGGREGATE FEATURE_TYPE Aggregator_AGGREGATE -# ------------------------------------------------------------------------- -INCLUDE TCL - if {{OUTGOING} == {OUTGOING}} { set attrs [list {km_reels}]; } else { set attrAll {}; if {[string length $attrAll] == 0} { return; }; set attrs [split {} { }]; }; if {{NO_OP} == {NO_OP}} { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV; } else { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV_MULTI_FEATURE; }; foreach attr $attrs { lappend parmList $attr; lappend parmList {roundLength10001}; lappend parmList {FLOAT}; }; lappend parmList {ExpressionEvaluator}; if {{NO_OP} == {OTHER_NULL_VALUE_2}} { lappend parmList {NO_OP}; lappend parmList {}; lappend parmList {0}; }; puts "MACRO __fme_expressionevaluator_evaluateArgs__ [join $parmList ,]"; -END_INCLUDE -FACTORY_DEF * TeeFactory FACTORY_NAME ExpressionEvaluator INPUT FEATURE_TYPE Aggregator_AGGREGATE OUTPUT FEATURE_TYPE ExpressionEvaluator_OUTPUT @EvaluateExpression($(__fme_expressionevaluator_evaluateArgs__)) -MACRO __fme_expressionevaluator_evaluateArgs__ -# ------------------------------------------------------------------------- -FACTORY_DEF * GeneralizeFactory FACTORY_NAME Generalizer INPUT FEATURE_TYPE ExpressionEvaluator_OUTPUT REJECT_INVALID_GEOM Yes ALLOW_NULLS yes REJECT_NOT_DEFAULT Yes PRESERVE_SHARED_BOUNDARIES Yes PRESERVE_PATH_SEGMENTS YES ALGORITHM Douglas TOLERANCE "10" CLEANING_TOLERANCE NONE OUTPUT GENERALIZED FEATURE_TYPE Generalizer_OUTPUT OUTPUT REJECTED FEATURE_TYPE Generalizer_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME Generalizer_ INPUT FEATURE_TYPE Generalizer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, GeneralizeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {secteurs} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME secteurs_Prepper COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE Sorter_SORTED_0_3iJewJ+xcb8= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_BY { } GROUP_ATTRIBUTE_PREFIX { secteurs } RASTER_REDUCTION NoReduction POINT_CLOUD_REDUCTION NO_THINNING OUTPUT RESULT FEATURE_TYPE __viewme__ -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF * RecorderFactory FACTORY_NAME secteurs_Recorder COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE "$(VISUALIZER_FEATURE_FILE)" STORE_SCANNED_SCHEMA YES CREATE_SPATIAL_INDEX "$(VISUALIZER_CREATE_SPATIAL_INDEX)" INSPECTOR "$(VISUALIZER_CREATE_SPATIAL_INDEX)" FSC_SCHEMA secteur_id,varchar255,nom_br,varchar255,nom_fr,varchar255,objectif_km,varchar255,km_redadeg,varchar255,km_reels,varchar255 MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC Generalizer_2_OUTPUT TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,1,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_secteurs.geojson COORDINATE_SYSTEM EPSG:4326 GEOMETRY ROUTE FME_GENERIC Counter_OUTPUT_1_bU15iCfwGHA= TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_auto COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC LineBuilder_LINE TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_sens_verif COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC Sorter_3_SORTED_0_fFLYyOM90A0= TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_troncons COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC Generalizer_OUTPUT TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_secteurs COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC Counter_OUTPUT_3_WeyqcBK0djk= TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,3,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_auto COORDINATE_SYSTEM EPSG:4326 GEOMETRY ROUTE FME_GENERIC Sorter_3_SORTED_3_XoGbwsXKD4g= TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,2,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_troncons COORDINATE_SYSTEM EPSG:4326 GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- - -FACTORY_DEF * CreationFactory FACTORY_NAME VisualizerProcessor CREATE_AT_END OUTPUT FEATURE_TYPE __NUKEME__ @TCL("if [file exists {$(WORKSPACE_TEMP_DIR)}] {set files [glob -nocomplain -directory {$(WORKSPACE_TEMP_DIR)} -tails *.ffs]; if {[llength $files] == 1} { set theFile {$(WORKSPACE_TEMP_DIR)/}; append theFile [lindex $files 0]; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -f FFS \042$theFile\042 & \175; } elseif { [llength $files] == 0 } { catch { file delete -force {$(WORKSPACE_TEMP_DIR)} }; } else { set filesNoExt {}; set lastfile {}; foreach {fileName} [lsort $files] { set fileNoExt [string trimright $fileName {.ffs}]; if [regexp {(.*)_[0-9]*$} $fileNoExt wholething fileNoExtBase] { if { $fileNoExtBase == $lastfile } { continue } }; set lastfile $fileNoExt; lappend filesNoExt $fileNoExt }; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -d {$(WORKSPACE_TEMP_DIR)} -a ffs -f FFS $filesNoExt & \175; }; }; ") -FACTORY_DEF * TeeFactory FACTORY_NAME VisualizerCleaner INPUT FEATURE_TYPE __NUKEME__ -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_pk_auto postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid 2154 postgis_vacuum_analyze NO postgis_allow_serial_writing NO pk_id text pk_x text pk_y text pk_long text pk_lat text length_real text length_theorical text secteur_id int8 municipality_admincode text municipality_postcode text municipality_name_fr text municipality_name_br text way_osm_id text way_highway text way_type text way_oneway text way_ref text way_name_fr text way_name_br text -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_trace_secteurs postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO secteur_id int2 nom_fr text nom_br text km_reels numeric(20,10) -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_trace_troncons postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO troncon_id int2 secteur_id int2 -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_pk_sens_verif postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid 2154 postgis_vacuum_analyze NO postgis_allow_serial_writing NO secteur_id int4 -# ------------------------------------------------------------------------- -GEOJSON_1_DEF phase_3_trace_secteurs.geojson secteur_id int nom_fr string nom_br string km_reels float -# ------------------------------------------------------------------------- -GEOJSON_2_DEF phase_3_trace_troncons troncon_id int secteur_id int -# ------------------------------------------------------------------------- -GEOJSON_3_DEF phase_3_pk_auto pk_id string pk_x string pk_y string pk_long string pk_lat string length_real string length_theorical string secteur_id int municipality_admincode string municipality_postcode string municipality_name_fr string municipality_name_br string way_osm_id string way_highway string way_type string way_oneway string way_ref string way_name_fr string way_name_br string diff --git a/scripts/traitements_phase_3_decoupage.fmw b/scripts/traitements_phase_3_decoupage.fmw deleted file mode 100644 index 34e4364..0000000 --- a/scripts/traitements_phase_3_decoupage.fmw +++ /dev/null @@ -1,8268 +0,0 @@ -#! -#! redadeg_2021redadeg" -# --SourceDataset_POSTGIS "bed110redadeg_2021redadeg" -# --SourceDataset_POSTGRES "bed110redadeg_2021redadeg" -# --postgres_sql_where_clause "" -# --secteur_id "30" -# -#! ARCGIS_COMPATIBILITY="ARCGIS_AUTO" -#! ATTR_TYPE_ENCODING="SDF" -#! BEGIN_PYTHON="" -#! BEGIN_TCL="" -#! CATEGORY="" -#! DESCRIPTION="" -#! DESTINATION="NONE" -#! DESTINATION_ROUTING_FILE="" -#! DOC_EXTENTS="21444.1 5596.82" -#! DOC_TOP_LEFT="-9055.93 -4208.43" -#! END_PYTHON="" -#! END_TCL="" -#! EXPLICIT_BOOKMARK_ORDER="false" -#! FME_BUILD_NUM="21306" -#! FME_DOCUMENT_GUID="c89bcf9f-b915-4d0f-b73e-9e4d1291bced" -#! FME_DOCUMENT_PRIORGUID="696c9d7c-e37d-4232-b9cf-4183183cacd1,75bea4c9-a241-4c15-b15f-d04ed56c4dc9,0a67c2df-8a2f-4f57-9949-8e922409485f,f6d95960-7dda-46c7-8546-119d6e5eb63b,653f1f51-b710-4bf7-83fa-0e5da492586b,8013bf53-d4d1-489c-95c0-3551575f08f6,7fc5c6e2-9111-4f5d-b392-34e5bc16d647" -#! FME_GEOMETRY_HANDLING="Enhanced" -#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" -#! FME_NAMES_ENCODING="UTF-8" -#! FME_REPROJECTION_ENGINE="FME" -#! FME_SERVER_SERVICES="" -#! FME_STROKE_MAX_DEVIATION="0" -#! HISTORY="" -#! IGNORE_READER_FAILURE="No" -#! LAST_SAVE_BUILD="FME(R) 2021.0.0.1 (20210315 - Build 21306 - macosx)" -#! LAST_SAVE_DATE="2021-05-18T09:21:57" -#! LOG_FILE="" -#! LOG_MAX_RECORDED_FEATURES="200" -#! MARKDOWN_DESCRIPTION="" -#! MARKDOWN_USAGE="" -#! MAX_LOG_FEATURES="200" -#! MULTI_WRITER_DATASET_ORDER="BY_ID" -#! PASSWORD="" -#! PYTHON_COMPATIBILITY="38" -#! REDIRECT_TERMINATORS="NONE" -#! SAVE_ON_PROMPT_AND_RUN="Yes" -#! SHOW_ANNOTATIONS="true" -#! SHOW_INFO_NODES="true" -#! SOURCE="NONE" -#! SOURCE_ROUTING_FILE="" -#! TERMINATE_REJECTED="YES" -#! TITLE="" -#! USAGE="" -#! USE_MARKDOWN="" -#! VIEW_POSITION="-9655.36 1606.6" -#! WARN_INVALID_XFORM_PARAM="Yes" -#! WORKSPACE_VERSION="1" -#! ZOOM_SCALE="76" -#! > -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 38 -ARCGIS_COMPATIBILITY ARCGIS_AUTO -GUI IGNORE SourceDataset_POSTGRES_1,POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1,POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1,POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1,POSTGRES_IN_ADVANCED_POSTGRES_1,POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1,POSTGRES_IN_BEGIN_SQL_POSTGRES_1,POSTGRES_IN_END_SQL_POSTGRES_1,POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1,SourceDataset_POSTGIS_1,POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_METHOD_POSTGIS_1,POSTGIS_IN_ADVANCED_POSTGIS_1,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1,POSTGIS_IN_BEGIN_SQL_POSTGIS_1,POSTGIS_IN_END_SQL_POSTGIS_1,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1,DestDataset_POSTGIS_2,POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2,POSTGIS_OUT_ADVANCED_POSTGIS_2,POSTGIS_OUT_BULK_COPY_POSTGIS_2,POSTGIS_OUT_START_TRANSACTION_POSTGIS_2,POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2,POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2,POSTGIS_OUT_BEGIN_SQL_POSTGIS_2,POSTGIS_OUT_END_SQL_POSTGIS_2,DestDataset_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1,GEOJSON_OUT_WRITE_BOM_GEOJSON_1,GEOJSON_OUT_STRICT_SPEC_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1,GEOJSON_OUT_INDENT_SIZE_GEOJSON_1,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1,DestDataset_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2,GEOJSON_OUT_WRITE_BOM_GEOJSON_2,GEOJSON_OUT_STRICT_SPEC_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2,GEOJSON_OUT_INDENT_SIZE_GEOJSON_2,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2,DestDataset_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3,GEOJSON_OUT_WRITE_BOM_GEOJSON_3,GEOJSON_OUT_STRICT_SPEC_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3,GEOJSON_OUT_INDENT_SIZE_GEOJSON_3,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 -# ============================================================================ -DEFAULT_MACRO DestDataset_GEOJSON ../data/2021/phase_3_trace_secteurs.geojson -DEFAULT_MACRO DestDataset_GEOJSON_5 ../data/2021/phase_3_trace_troncons.geojson -DEFAULT_MACRO DestDataset_GEOJSON_4 ../data/2021/phase_3_pk_auto.geojson -DEFAULT_MACRO DestDataset_POSTGIS bed110redadeg_2021redadeg -DEFAULT_MACRO SourceDataset_POSTGIS bed110redadeg_2021redadeg -DEFAULT_MACRO SourceDataset_POSTGRES bed110redadeg_2021redadeg -DEFAULT_MACRO postgres_sql_where_clause -DEFAULT_MACRO secteur_id 30 -DEFAULT_MACRO FME_USER_PARAM_PRIVATE_GRP -DEFAULT_MACRO START 13 -# ============================================================================ -GUI FILENAME DestDataset_GEOJSON GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -GUI FILENAME DestDataset_GEOJSON_5 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -GUI FILENAME DestDataset_GEOJSON_4 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -GUI OPTIONAL NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGRES FMT:POSTGRES%FAMILY:PostgreSQL Connection: -GUI OPTIONAL TEXT_EDIT_SQL_CFG postgres_sql_where_clause MODE,WHERE;FORMAT,POSTGRES;FORMAT,POSTGRES;DATASET,breizhpolenovoatredadeg;CONNECTION_PARAMS,FEATURES_PER_FETCH10000SCHEMAS_FOR_TABLE_LISTINGpublicNAMED_CONNECTIONbreizhpolenovoatredadegREAD_TIME_WITH_TIMEZONEYes_MERGE_SCHEMASYESQUERY_FEATURE_TYPES_FOR_MERGE_FILTERSYes;START_TABLE,public.secteur secteur WHERE Clause: -GUI RANGE_SLIDER secteur_id "RANGE:[,]" secteur_id: -# ============================================================================ -USER_PARAMETERS eyJwYXJhbWV0ZXJzIjpbeyJhY2Nlc3NNb2RlIjoid3JpdGUiLCJkZWZhdWx0VmFsdWUiOiIuLi9kYXRhLzIwMjEvcGhhc2VfM190cmFjZV9zZWN0ZXVycy5nZW9qc29uIiwiZmlsdGVycyI6W3siZGVzY3JpcHRpb24iOiJHZW9KU09OIEZpbGVzIiwiZmlsdGVyIjpbIiouanNvbiJdfSx7ImRlc2NyaXB0aW9uIjoiQWxsIEZpbGVzIiwiZmlsdGVyIjpbIioiXX1dLCJpdGVtc1RvU2VsZWN0IjoiZmlsZXMiLCJuYW1lIjoiRGVzdERhdGFzZXRfR0VPSlNPTiIsInByb21wdCI6IkRlc3RpbmF0aW9uIEdlb0pTT04gRmlsZToiLCJyZXF1aXJlZCI6dHJ1ZSwic2VsZWN0TXVsdGlwbGUiOmZhbHNlLCJ0eXBlIjoiZmlsZSIsInZhbGlkYXRlRXhpc3RlbmNlIjpmYWxzZSwidmFsdWVUeXBlIjoic3RyaW5nIn0seyJhY2Nlc3NNb2RlIjoid3JpdGUiLCJkZWZhdWx0VmFsdWUiOiIuLi9kYXRhLzIwMjEvcGhhc2VfM190cmFjZV90cm9uY29ucy5nZW9qc29uIiwiZmlsdGVycyI6W3siZGVzY3JpcHRpb24iOiJHZW9KU09OIEZpbGVzIiwiZmlsdGVyIjpbIiouanNvbiJdfSx7ImRlc2NyaXB0aW9uIjoiQWxsIEZpbGVzIiwiZmlsdGVyIjpbIioiXX1dLCJpdGVtc1RvU2VsZWN0IjoiZmlsZXMiLCJuYW1lIjoiRGVzdERhdGFzZXRfR0VPSlNPTl81IiwicHJvbXB0IjoiRGVzdGluYXRpb24gR2VvSlNPTiBGaWxlOiIsInJlcXVpcmVkIjp0cnVlLCJzZWxlY3RNdWx0aXBsZSI6ZmFsc2UsInR5cGUiOiJmaWxlIiwidmFsaWRhdGVFeGlzdGVuY2UiOmZhbHNlLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifSx7ImFjY2Vzc01vZGUiOiJ3cml0ZSIsImRlZmF1bHRWYWx1ZSI6Ii4uL2RhdGEvMjAyMS9waGFzZV8zX3BrX2F1dG8uZ2VvanNvbiIsImZpbHRlcnMiOlt7ImRlc2NyaXB0aW9uIjoiR2VvSlNPTiBGaWxlcyIsImZpbHRlciI6WyIqLmpzb24iXX0seyJkZXNjcmlwdGlvbiI6IkFsbCBGaWxlcyIsImZpbHRlciI6WyIqIl19XSwiaXRlbXNUb1NlbGVjdCI6ImZpbGVzIiwibmFtZSI6IkRlc3REYXRhc2V0X0dFT0pTT05fNCIsInByb21wdCI6IkRlc3RpbmF0aW9uIEdlb0pTT04gRmlsZToiLCJyZXF1aXJlZCI6dHJ1ZSwic2VsZWN0TXVsdGlwbGUiOmZhbHNlLCJ0eXBlIjoiZmlsZSIsInZhbGlkYXRlRXhpc3RlbmNlIjpmYWxzZSwidmFsdWVUeXBlIjoic3RyaW5nIn0seyJjaG9pY2VTZXR0aW5ncyI6eyJjaG9pY2VTZXQiOiJkYkNvbm5lY3Rpb25zIiwiZm9ybWF0IjoiUE9TVEdJUyJ9LCJkZWZhdWx0VmFsdWUiOiJiZWQxMTA8YXQ+cmVkYWRlZ18yMDIxPGF0PnJlZGFkZWciLCJuYW1lIjoiRGVzdERhdGFzZXRfUE9TVEdJUyIsInByb21wdCI6IkNvbm5lY3Rpb246IiwicmVxdWlyZWQiOmZhbHNlLCJ0eXBlIjoiZHJvcGRvd24iLCJ2YWx1ZVR5cGUiOiJzdHJpbmdFbmNvZGVkIn0seyJjaG9pY2VTZXR0aW5ncyI6eyJjaG9pY2VTZXQiOiJkYkNvbm5lY3Rpb25zIiwiZm9ybWF0IjoiUE9TVEdJUyJ9LCJkZWZhdWx0VmFsdWUiOiJiZWQxMTA8YXQ+cmVkYWRlZ18yMDIxPGF0PnJlZGFkZWciLCJuYW1lIjoiU291cmNlRGF0YXNldF9QT1NUR0lTIiwicHJvbXB0IjoiQ29ubmVjdGlvbjoiLCJyZXF1aXJlZCI6dHJ1ZSwidHlwZSI6ImRyb3Bkb3duIiwidmFsdWVUeXBlIjoic3RyaW5nRW5jb2RlZCJ9LHsiY2hvaWNlU2V0dGluZ3MiOnsiY2hvaWNlU2V0IjoiZGJDb25uZWN0aW9ucyIsImZvcm1hdCI6IlBPU1RHUkVTIn0sImRlZmF1bHRWYWx1ZSI6ImJlZDExMDxhdD5yZWRhZGVnXzIwMjE8YXQ+cmVkYWRlZyIsIm5hbWUiOiJTb3VyY2VEYXRhc2V0X1BPU1RHUkVTIiwicHJvbXB0IjoiQ29ubmVjdGlvbjoiLCJyZXF1aXJlZCI6dHJ1ZSwidHlwZSI6ImRyb3Bkb3duIiwidmFsdWVUeXBlIjoic3RyaW5nRW5jb2RlZCJ9LHsiZWRpdG9yIjoic3FsIiwibmFtZSI6InBvc3RncmVzX3NxbF93aGVyZV9jbGF1c2UiLCJwcm9tcHQiOiJzZWN0ZXVyIFdIRVJFIENsYXVzZToiLCJyZXF1aXJlZCI6ZmFsc2UsInNxbFNldHRpbmdzIjp7ImNvbm5lY3Rpb25QYXJhbXMiOnsiRkVBVFVSRVNfUEVSX0ZFVENIIjoiMTAwMDAiLCJOQU1FRF9DT05ORUNUSU9OIjoiYnJlaXpocG9sZW5vdm88YXQ+cmVkYWRlZyIsIlFVRVJZX0ZFQVRVUkVfVFlQRVNfRk9SX01FUkdFX0ZJTFRFUlMiOiJZZXMiLCJSRUFEX1RJTUVfV0lUSF9USU1FWk9ORSI6IlllcyIsIlNDSEVNQVNfRk9SX1RBQkxFX0xJU1RJTkciOiJwdWJsaWMiLCJfTUVSR0VfU0NIRU1BUyI6IllFUyJ9LCJkYXRhc2V0IjoiYnJlaXpocG9sZW5vdm88YXQ+cmVkYWRlZyIsImZvcm1hdCI6IlBPU1RHUkVTIiwibW9kZSI6IndoZXJlIiwic3RhcnRUYWJsZUV4cGFuZGVkIjoicHVibGljLnNlY3RldXIifSwidHlwZSI6InRleHQiLCJ2YWx1ZVR5cGUiOiJzdHJpbmdFbmNvZGVkIn0seyJkZWZhdWx0VmFsdWUiOiIxMCIsIm5hbWUiOiJzZWN0ZXVyX2lkIiwicHJvbXB0Ijoic2VjdGV1cl9pZDoiLCJyZXF1aXJlZCI6dHJ1ZSwic2hvd1NsaWRlciI6ZmFsc2UsInR5cGUiOiJudW1iZXIiLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifSx7ImhpZGRlbiI6dHJ1ZSwibmFtZSI6IkZNRV9VU0VSX1BBUkFNX1BSSVZBVEVfR1JQIiwicGFyYW1ldGVycyI6W3siZGVmYXVsdFZhbHVlIjoiMTMiLCJoaWRkZW4iOnRydWUsIm11bHRpcGxlT2YiOjEsIm5hbWUiOiJTVEFSVCIsInByb21wdCI6IkNvdW50IFN0YXJ0OiIsInJlcXVpcmVkIjpmYWxzZSwic3VwcG9ydGVkVmFsdWVUeXBlcyI6WyJleHByZXNzaW9uIiwiZ2xvYmFsUGFyYW1ldGVyIl0sInR5cGUiOiJudW1iZXIiLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifV0sInByb21wdCI6IlByaXZhdGUgUGFyYW1ldGVycyIsInJlcXVpcmVkIjpmYWxzZSwidHlwZSI6Imdyb3VwIiwidmFsdWVUeXBlIjoic3RyaW5nIn1dfQ== -# ============================================================================ -INCLUDE [ if {{$(DestDataset_GEOJSON)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_GEOJSON_5)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON_5' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_GEOJSON_4)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON_4' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGIS)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(SourceDataset_POSTGRES)} == {}} { puts_real {Parameter 'SourceDataset_POSTGRES' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(secteur_id)} == {}} { puts_real {Parameter 'secteur_id' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -MULTI_READER_TYPE{0} POSTGRES -MULTI_READER_KEYWORD{0} POSTGRES_1 -MULTI_READER_GEN_DIRECTIVES{0} EXPOSE_ATTRS_GROUP,,BEGIN_SQL,,READ_TIME_WITH_TIMEZONE,Yes,SCHEMAS_FOR_TABLE_LISTING,public,NAMED_CONNECTION,breizhpolenovoatredadeg,END_SQL,,ADVANCED,,TABLELIST,public.secteur,WHERE_CLAUSE,,_MERGE_SCHEMAS,YES,FEATURES_PER_FETCH,10000,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,POSTGRES_EXPOSE_FORMAT_ATTRS, -MULTI_READER_TYPE{1} POSTGIS -MULTI_READER_KEYWORD{1} POSTGIS_1 -MULTI_READER_GEN_DIRECTIVES{1} USE_TRUE_POSTGIS_TYPES,yes,CLIP_TO_ENVELOPE,NO,SEARCH_ENVELOPE_MAXY,0,POSTGIS_EXPOSE_FORMAT_ATTRS,,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,ADVANCED,,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,USE_SEARCH_ENVELOPE,NO,FEATURES_PER_FETCH,10000,DISABLE_COLLECTION_SPLITTING,yes,SEARCH_ENVELOPE_MINX,0,SEARCH_ENVELOPE_MINY,0,EXPOSE_ATTRS_GROUP,,SEARCH_METHOD,MBR_OVERLAPS,NAMED_CONNECTION,breizhpolenovoatredadeg,SEARCH_ENVELOPE_MAXX,0,READ_TIME_WITH_TIMEZONE,Yes,TABLELIST,public.osm_communespublic.phase_2_trace_pgr,END_SQL,,WHERE_CLAUSE,,_MERGE_SCHEMAS,YES,SCHEMAS_FOR_TABLE_LISTING,public,BEGIN_SQL, -WRITER_TYPE MULTI_WRITER -MULTI_WRITER_DATASET_ORDER BY_ID -MULTI_WRITER_FIRST_WRITER_ID 0 -MULTI_WRITER_TYPE{0} POSTGIS -MULTI_WRITER_KEYWORD{0} POSTGIS_2 -MULTI_WRITER_TYPE{1} GEOJSON -MULTI_WRITER_KEYWORD{1} GEOJSON_1 -MULTI_WRITER_TYPE{2} GEOJSON -MULTI_WRITER_KEYWORD{2} GEOJSON_2 -MULTI_WRITER_TYPE{3} GEOJSON -MULTI_WRITER_KEYWORD{3} GEOJSON_3 -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGRES_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGRES POSTGRES_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGRES_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGRES POSTGRES_1 -DEFAULT_MACRO SourceDataset_POSTGRES_1 $(SourceDataset_POSTGRES) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGRES_1 FMT:POSTGRES Connection: -DEFAULT_MACRO POSTGRES_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGRES_1 Yes -POSTGRES_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGRES_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_READ_TIME_WITH_TIMEZONE_POSTGRES_1 Yes -POSTGRES_1_READ_TIME_WITH_TIMEZONE "$(POSTGRES_IN_READ_TIME_WITH_TIMEZONE_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_FME_CONNECTION_GROUP_POSTGRES_1 POSTGRES_IN_NAMED_CONNECTION%POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 Database Connection -DEFAULT_MACRO POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_FME_GROUP_NAMED1_POSTGRES_1 POSTGRES_IN_TABLELIST%POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 Constraints -DEFAULT_MACRO POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 -POSTGRES_1_WHERE_CLAUSE "$(POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_WHERE_CLAUSE_POSTGRES_1 MODE,WHERE;FORMAT,POSTGRES WHERE Clause: -DEFAULT_MACRO POSTGRES_IN_EXPOSE_ATTRS_GROUP_POSTGRES_1 -POSTGRES_1_EXPOSE_ATTRS_GROUP "$(POSTGRES_IN_EXPOSE_ATTRS_GROUP_POSTGRES_1)" -DEFAULT_MACRO POSTGRES_IN_ADVANCED_POSTGRES_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGRES_IN_ADVANCED_POSTGRES_1 POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1%POSTGRES_IN_BEGIN_SQL_POSTGRES_1%POSTGRES_IN_END_SQL_POSTGRES_1 Advanced -DEFAULT_MACRO POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1 10000 -POSTGRES_1_FEATURES_PER_FETCH "$(POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1)" -GUI FLOAT POSTGRES_IN_FEATURES_PER_FETCH_POSTGRES_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGRES_IN_BEGIN_SQL_POSTGRES_1 -POSTGRES_1_BEGIN_SQL "$(POSTGRES_IN_BEGIN_SQL_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_BEGIN_SQL_POSTGRES_1 MODE,SQL;FORMAT,POSTGRES SQL To Run Before Read -DEFAULT_MACRO POSTGRES_IN_END_SQL_POSTGRES_1 -POSTGRES_1_END_SQL "$(POSTGRES_IN_END_SQL_POSTGRES_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGRES_IN_END_SQL_POSTGRES_1 MODE,SQL;FORMAT,POSTGRES SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGRES_IN_ATTRIBUTE_READING_POSTGRES_1 DEFLINE_ATTRS -POSTGRES_1_ATTRIBUTE_READING "$(POSTGRES_IN_ATTRIBUTE_READING_POSTGRES_1)" -# ============================================================================ -POSTGRES_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 public -GUI OPTIONAL TEXT POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1 Schemas for Table Listing: -POSTGRES_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGRES_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGRES_1) -POSTGRES_1_DATASET "$(SourceDataset_POSTGRES_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FMT:POSTGIS Connection: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1 Yes -POSTGIS_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1 Yes -POSTGIS_1_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1 yes -POSTGIS_1_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1 yes -POSTGIS_1_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 -POSTGIS_1_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1 -POSTGIS_1_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBR_OVERLAPS -POSTGIS_1_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_1)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_1 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1%POSTGIS_IN_BEGIN_SQL_POSTGIS_1%POSTGIS_IN_END_SQL_POSTGIS_1 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 10000 -POSTGIS_1_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_1 -POSTGIS_1_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_1 -POSTGIS_1_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1 DEFLINE_ATTRS -POSTGIS_1_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1)" -# ============================================================================ -POSTGIS_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 public -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Schemas for Table Listing: -POSTGIS_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1) -POSTGIS_1_DATASET "$(SourceDataset_POSTGIS_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_2" -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS_2 FMT:POSTGIS Connection: -POSTGIS_2_PLUGIN_MAX_CHANNELS 1 -DEFAULT_MACRO POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2 Yes -POSTGIS_2_STRICT_TEMPORAL_TYPE_HANDLING "$(POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 POSTGIS_OUT_NAMED_CONNECTION Database Connection -# ============================================================================ -# Write geometry (planar) or geography (geodetic) column -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2 geometry -POSTGIS_2_SPATIAL_COLUMN_TYPE "$(POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2)" -# ============================================================================ -# Default spatial column name -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2 geom -POSTGIS_2_SPATIAL_COLUMN_NAME "$(POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2 yes -POSTGIS_2_GENERIC_GEOMETRY "$(POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2 FEATURE_TYPE -POSTGIS_2_COORDINATE_SYSTEM_GRANULARITY "$(POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_ADVANCED_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_ADVANCED_POSTGIS_2 POSTGIS_OUT_BULK_COPY_POSTGIS_2%POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2%POSTGIS_OUT_START_TRANSACTION_POSTGIS_2%POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2%POSTGIS_OUT_BEGIN_SQL_POSTGIS_2%POSTGIS_OUT_END_SQL_POSTGIS_2 Advanced -DEFAULT_MACRO POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES -POSTGIS_2_BULK_COPY "$(POSTGIS_OUT_BULK_COPY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES%NO Bulk Insert -DEFAULT_MACRO POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 0 -POSTGIS_2_START_TRANSACTION "$(POSTGIS_OUT_START_TRANSACTION_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 Starting Feature: -DEFAULT_MACRO POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 1000 -POSTGIS_2_TRANSACTION_INTERVAL "$(POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 Features Per Transaction -DEFAULT_MACRO POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 NO -POSTGIS_2_INSERT_TEXT_GEOMETRY "$(POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 YES%NO Insert WKT -DEFAULT_MACRO POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 -POSTGIS_2_BEGIN_SQL "$(POSTGIS_OUT_BEGIN_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Write -DEFAULT_MACRO POSTGIS_OUT_END_SQL_POSTGIS_2 -POSTGIS_2_END_SQL "$(POSTGIS_OUT_END_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_END_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run After Write -# ============================================================================ -POSTGIS_2_GENERATE_FME_BUILD_NUM 18592 -POSTGIS_2_DATASET "$(DestDataset_POSTGIS_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_1" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_1 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_1 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_1 -DEFAULT_MACRO DestDataset_GEOJSON_1 $(DestDataset_GEOJSON) -GUI FILENAME DestDataset_GEOJSON_1 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1%GEOJSON_OUT_WRITE_BOM_GEOJSON_1%GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1 UTF-8 -GEOJSON_1_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_1 No -GEOJSON_1_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_1 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Yes -GEOJSON_1_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1%GEOJSON_OUT_INDENT_SIZE_GEOJSON_1%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1 YES -GEOJSON_1_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 0 -GEOJSON_1_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 10 -GEOJSON_1_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1 Yes -GEOJSON_1_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Yes -GEOJSON_1_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 -GEOJSON_1_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_1 Yes -GEOJSON_1_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_1)" -# ============================================================================ -GEOJSON_1_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_1_DATASET "$(DestDataset_GEOJSON_1)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_2" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_2 -DEFAULT_MACRO DestDataset_GEOJSON_2 $(DestDataset_GEOJSON_5) -GUI FILENAME DestDataset_GEOJSON_2 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_2 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2%GEOJSON_OUT_WRITE_BOM_GEOJSON_2%GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2 UTF-8 -GEOJSON_2_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_2 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_2 No -GEOJSON_2_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_2 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Yes -GEOJSON_2_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_2 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_2 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2%GEOJSON_OUT_INDENT_SIZE_GEOJSON_2%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2 YES -GEOJSON_2_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_2 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 0 -GEOJSON_2_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_2 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 10 -GEOJSON_2_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_2 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_2 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2 Yes -GEOJSON_2_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_2 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Yes -GEOJSON_2_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_2 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_2 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 -GEOJSON_2_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_2 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_2 Yes -GEOJSON_2_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_2)" -# ============================================================================ -GEOJSON_2_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_2_DATASET "$(DestDataset_GEOJSON_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_3" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_3 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_3 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_3 -DEFAULT_MACRO DestDataset_GEOJSON_3 $(DestDataset_GEOJSON_4) -GUI FILENAME DestDataset_GEOJSON_3 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_3 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3%GEOJSON_OUT_WRITE_BOM_GEOJSON_3%GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3 UTF-8 -GEOJSON_3_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_3 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_3 No -GEOJSON_3_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_3 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Yes -GEOJSON_3_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_3 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_3 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3%GEOJSON_OUT_INDENT_SIZE_GEOJSON_3%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3 YES -GEOJSON_3_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_3 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 0 -GEOJSON_3_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_3 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 10 -GEOJSON_3_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_3 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_3 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3 Yes -GEOJSON_3_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_3 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Yes -GEOJSON_3_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_3 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_3 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 -GEOJSON_3_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_3 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_3 Yes -GEOJSON_3_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_3)" -# ============================================================================ -GEOJSON_3_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_3_DATASET "$(DestDataset_GEOJSON_3)" -#! END_DEST_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)traitements_phase_3_decoupage.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -FME_NAMES_ENCODING UTF-8 -DEFAULT_MACRO DATASET_KEYWORD_POSTGRES_1 POSTGRES_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_1 POSTGIS_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_2 POSTGIS_2 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_1 GEOJSON_1 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_2 GEOJSON_2 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_3 GEOJSON_3 -# ------------------------------------------------------------------------- - -POSTGRES_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_2_COORDINATE_SYSTEM EPSG:2154 -GEOJSON_1_COORDINATE_SYSTEM EPSG:4326 -GEOJSON_2_COORDINATE_SYSTEM EPSG:4326 -GEOJSON_3_COORDINATE_SYSTEM EPSG:4326 -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME traitements_phase_3_decoupage -MACRO FME_VIEWER_APP fmedatainspector -# ------------------------------------------------------------------------- - -INCLUDE [ if {[info exists env(FME_TEMP)] && [file isdirectory $env(FME_TEMP)]} {set gVisualizerTemp $env(FME_TEMP)} elseif {[info exists env(TEMP)] && [file isdirectory $env(TEMP)]} {set gVisualizerTemp $env(TEMP)} elseif { $tcl_platform(platform) == "unix" } {set gVisualizerTemp "/tmp"} else {set gVisualizerTemp c:}; regsub -all {[ ,&]} {$(WORKSPACE_NAME)} {_} wsname; set gVisualizerTemp $gVisualizerTemp/${wsname}_[clock format [clock seconds] -format %H%M%S]; puts "MACRO WORKSPACE_TEMP_DIR $gVisualizerTemp"; -MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/inspector.ffs -MACRO VISUALIZER_SCHEMA_FILE $(WORKSPACE_TEMP_DIR)/inspector.fsc -MACRO VISUALIZER_CREATE_SPATIAL_INDEX YES -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE POSTGRES POSTGRES_1::public.secteur multi_reader_keyword,$(DATASET_KEYWORD_POSTGRES_1) TO FME_GENERIC ::public.secteur ALIAS_GEOMETRY ROUTE POSTGIS POSTGIS_1::public.osm_municipalities multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.osm_municipalities ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * -POSTGRES_1_MERGE_DEF POSTGRES_1::public.secteur EXACT public.secteur DEFLINE postgres_type,postgres_none,postgres_sql_where_clause,$(postgres_sql_where_clause$encode),postgres_sql_statement,,id,int4,nom_br,text,nom_fr,text,objectif_km,int4,km_redadeg,int4 -POSTGIS_1_MERGE_DEF POSTGIS_1::public.osm_municipalities EXACT public.osm_municipalities DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,id,serialPrimaryKey,osm_id,int8,type,text,admin_level,text,name,text,name_fr,text,name_br,text,source_name_br,text,admincode,textBTree,postcode,text,wikidata,text,surf_ha,numeric1000500,x,numeric1000500,y,numeric1000500 -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_2_trace_pgr EXACT public.phase_2_trace_pgr -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.secteur_POSTGRES_1 Splitter" INPUT FEATURE_TYPE public.secteur OUTPUT FEATURE_TYPE public.secteur_POSTGRES_1 -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_2_trace_pgr_POSTGIS_1 Splitter" INPUT FEATURE_TYPE public.phase_2_trace_pgr OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_0_lZ0XqLzCYmQ= OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_1_dRsdNGVAD0c= -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.osm_municipalities_POSTGIS_1 Splitter" INPUT FEATURE_TYPE public.osm_municipalities OUTPUT FEATURE_TYPE public.osm_municipalities_POSTGIS_1 -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -MACRO SQLCreator_DIRECTIVES NAMED_CONNECTION bed110redadeg_2021redadeg -FACTORY_DEF {*} CreationFactory FACTORY_NAME { SQLCreator_Creator } OUTPUT { FEATURE_TYPE _____CREATED______ } -FACTORY_DEF {*} QueryFactory FACTORY_NAME { SQLCreator } INPUT FEATURE_TYPE _____CREATED______ QUERY_SQL { SELECTvertexsecteur_iddp.geomFROMSELECTrow_numberoverasvertexsecteur_idpath_seqST_DumpPointsthe_geomASdpFROMphase_2_trace_pgrWHEREsecteur_id=$(secteur_id$encode)ORDERBYsecteur_idpath_seqass } COMBINE_ATTRIBUTES RESULT_ONLY COMBINE_GEOMETRY RESULT_ONLY READER_TYPE { POSTGIS } READER_DATASET { "bed110redadeg_2021redadeg" } READER_PARAMS { $(SQLCreator_DIRECTIVES) } READER_COORDSYS { "EPSG:2154" } QUERYFCT_PROPAGATE_IDS_ON_SQL_EXECUTE YES CONTINUE_ON_READER_ERROR YES OUTPUT { RESULT FEATURE_TYPE SQLCreator_RESULT @SupplyAttributes(fme_feature_type,SQLCreator) } OUTPUT { READER_ERROR FEATURE_TYPE SQLCreator_ } -FACTORY_DEF * BranchingFactory FACTORY_NAME "SQLCreator_RESULT Brancher -1 183" INPUT FEATURE_TYPE SQLCreator_RESULT TARGET_FACTORY "$(WB_CURRENT_CONTEXT)_CREATOR_BRANCH_TARGET" MAXIMUM_COUNT None OUTPUT PASSED FEATURE_TYPE * -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME SQLCreator_ INPUT FEATURE_TYPE SQLCreator_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, SQLCreatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "$(WB_CURRENT_CONTEXT)_CREATOR_BRANCH_TARGET" INPUT FEATURE_TYPE * OUTPUT FEATURE_TYPE * -# ------------------------------------------------------------------------- -FACTORY_DEF {*} ConnectionFactory FACTORY_NAME { LineBuilder_2 } INPUT FEATURE_TYPE SQLCreator_RESULT GROUP_BY { secteur_id } FLUSH_WHEN_GROUPS_CHANGE { No } ACCUM_INPUT_ATTRS { One } LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE { } REMOVE_DUPLICATES { NO } OUTPUT { LINE FEATURE_TYPE LineBuilder_2_LINE } OUTPUT { BAD_INPUT FEATURE_TYPE LineBuilder_2_ } -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LineBuilder_2_ INPUT FEATURE_TYPE LineBuilder_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LineBuilder_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME { BulkAttributeRenamer } INPUT FEATURE_TYPE public.osm_municipalities_POSTGIS_1 OUTPUT { FEATURE_TYPE BulkAttributeRenamer_OUTPUT @RenameAttributes(PATTERN_REPLACE, ADDPREFIX, , "", "municipality_", "", "", "-_", "RENAME", "NONFME") } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME { AttributeRenamer_2 } INPUT FEATURE_TYPE public.secteur_POSTGRES_1 ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "id" "secteur_id" "RENAME_SET_DEFAULT" "" } OUTPUT { OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT } -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeRenamer_2 OUTPUT Splitter" INPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT_0_XZPnkgk0+40= OUTPUT FEATURE_TYPE AttributeRenamer_2_OUTPUT_1_/5K/VQuHWx4= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} SortFactory FACTORY_NAME { Sorter_5 } INPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_0_lZ0XqLzCYmQ= FLUSH_WHEN_GROUPS_CHANGE { No } SORT_BY { path_seq NUMERIC ASCENDING } OUTPUT { SORTED FEATURE_TYPE Sorter_5_SORTED } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttributeKeeperFactory FACTORY_NAME { AttributeKeeper_2 } INPUT FEATURE_TYPE Sorter_5_SORTED KEEP_ATTRS { secteur_id } KEEP_LISTS { } KEEP_FME_ATTRIBUTES Yes BUILD_FEATURE_TABLES { NO } OUTPUT_ON_ATTRIBUTE_CHANGE { } OUTPUT { OUTPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} ArcFactory FACTORY_NAME LineCombiner INPUT FEATURE_TYPE AttributeKeeper_2_OUTPUT END_NODED PRESERVE_ORIENTATION no DEAGGREGATE_GEOMETRY Deaggregate CLOSE_LOOPS yes ACCUMULATE_ATTRIBUTES ONE LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE DIRECTION_NAME "" LINES_AS_SEGMENTS No CONSIDER_NODE_ELEVATION NO CONNECT_Z_MODE IGNORE_Z BREAK_CONNECTION_ATTRIBUTES { secteur_id } BREAK_CONNECTION_ACROSS_SETS No OUTPUT LINE FEATURE_TYPE LineCombiner_LINE OUTPUT REJECTED FEATURE_TYPE LineCombiner_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LineCombiner_ INPUT FEATURE_TYPE LineCombiner_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LineCombineroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -INCLUDE [if { {ATTRIBUTES} == {ATTRIBUTES} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO ATTRIBUTES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] -FACTORY_DEF {*} ReferenceFactory FACTORY_NAME FeatureMerger_2 INPUT REFERENCER FEATURE_TYPE LineCombiner_LINE INPUT REFERENCER FEATURE_TYPE LineBuilder_2_LINE INPUT REFERENCEE FEATURE_TYPE AttributeRenamer_2_OUTPUT_1_/5K/VQuHWx4= REFERENCE_INFO $(FeatureMerger_2_REFERENCE_INFO) REFERENCE_TABLE @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger_2) @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger_2) AUTO ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "REQUESTOR_IF_CONFLICT" IGNORE_NULLS "No" HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES NO REFERENCEES_FIRST No REJECT_INVALID_GEOM YES CLEANING_TOLERANCE OUTPUT COMPLETE FEATURE_TYPE FeatureMerger_2_MERGED OUTPUT REJECTED FEATURE_TYPE FeatureMerger_2_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME FeatureMerger_2_ INPUT FEATURE_TYPE FeatureMerger_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, FeatureMerger_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} SortFactory FACTORY_NAME { Sorter_4 } INPUT FEATURE_TYPE FeatureMerger_2_MERGED FLUSH_WHEN_GROUPS_CHANGE { No } SORT_BY { secteur_id NUMERIC ASCENDING } OUTPUT { SORTED FEATURE_TYPE Sorter_4_SORTED } -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter_4 SORTED Splitter" INPUT FEATURE_TYPE Sorter_4_SORTED OUTPUT FEATURE_TYPE Sorter_4_SORTED_0_bGs2+JFzNGU= OUTPUT FEATURE_TYPE Sorter_4_SORTED_1_xZN7XGJzQYs= OUTPUT FEATURE_TYPE Sorter_4_SORTED_2_ymgKSdsXa+o= -# ------------------------------------------------------------------------- -INCLUDE [if { {ATTRIBUTES} == {ATTRIBUTES} } { puts "MACRO FeatureMerger_REFERENCE_INFO ATTRIBUTES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] -FACTORY_DEF {*} ReferenceFactory FACTORY_NAME FeatureMerger INPUT REFERENCER FEATURE_TYPE Sorter_4_SORTED_0_bGs2+JFzNGU= INPUT REFERENCEE FEATURE_TYPE AttributeRenamer_2_OUTPUT_0_XZPnkgk0+40= REFERENCE_INFO $(FeatureMerger_REFERENCE_INFO) REFERENCE_TABLE @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger) @EvaluateExpression(FDIV,STRING_ENCODED,Valuesecteur_id,FeatureMerger) AUTO ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "REQUESTOR_IF_CONFLICT" IGNORE_NULLS "No" HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES NO REFERENCEES_FIRST No REJECT_INVALID_GEOM YES CLEANING_TOLERANCE OUTPUT COMPLETE FEATURE_TYPE FeatureMerger_MERGED OUTPUT REJECTED FEATURE_TYPE FeatureMerger_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME FeatureMerger_ INPUT FEATURE_TYPE FeatureMerger_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, FeatureMergeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_2_LengthCalculatorInput INPUT FEATURE_TYPE FeatureMerger_MERGED OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_2_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "km_reels" @Length(REJECTABLE,2,"1") -FACTORY_DEF * TestFactory FACTORY_NAME LengthCalculator_2_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE LengthCalculator_2_ @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE LengthCalculator_2_OUTPUT @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_2_ INPUT FEATURE_TYPE LengthCalculator_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LengthCalculator_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 regsub {^[^a-zA-Z]*([a-zA-Z]).*} {.2f} {\1} formatChar; if { [string first $formatChar {duiofxeEgG}] != -1 } { proc {StringFormatter_getAttribute} {attr} { return [regsub {^(-?)0*(.)} [FME_GetAttribute $attr] {\1\2}] } } else { proc {StringFormatter_getAttribute} {attr} { return [FME_GetAttribute $attr] } } -Tcl2 proc StringFormatter_formatter {} { set attrs [split {km_reels} {,}]; foreach attr $attrs { set attrVal [FME_GetAttribute $attr]; set length [string length $attrVal]; if {$length > 0} { FME_SetAttribute $attr [format %.2f [{StringFormatter_getAttribute} $attr]]; }; }; } -FACTORY_DEF {*} TeeFactory FACTORY_NAME { StringFormatter } INPUT FEATURE_TYPE LengthCalculator_2_OUTPUT OUTPUT { FEATURE_TYPE StringFormatter_OUTPUT @Tcl2(StringFormatter_formatter) } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} SortFactory FACTORY_NAME { Sorter } INPUT FEATURE_TYPE StringFormatter_OUTPUT FLUSH_WHEN_GROUPS_CHANGE { No } SORT_BY { secteur_id NUMERIC ASCENDING } OUTPUT { SORTED FEATURE_TYPE Sorter_SORTED } -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter SORTED Splitter" INPUT FEATURE_TYPE Sorter_SORTED OUTPUT FEATURE_TYPE Sorter_SORTED_0_3iJewJ+xcb8= OUTPUT FEATURE_TYPE Sorter_SORTED_1_AdG4IKX8gxs= OUTPUT FEATURE_TYPE Sorter_SORTED_2_WrWvotwy67E= -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {secteurs} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME { secteurs_Prepper } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE Sorter_SORTED_0_3iJewJ+xcb8= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_ATTRIBUTE_PREFIX { secteurs } RASTER_REDUCTION { NoReduction } POINT_CLOUD_REDUCTION { NO_THINNING } OUTPUT { RESULT FEATURE_TYPE __viewme__ } -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF {*} RecorderFactory FACTORY_NAME { secteurs_Recorder } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE { "$(VISUALIZER_FEATURE_FILE)" } STORE_SCANNED_SCHEMA YES NORMALIZE_LIST_ATTRIBUTES_ON_SCHEMA YES CREATE_SPATIAL_INDEX { "$(VISUALIZER_CREATE_SPATIAL_INDEX)" } INSPECTOR { "$(VISUALIZER_CREATE_SPATIAL_INDEX)" } FSC_SCHEMA { secteur_id,int32,vertex,buffer,nom_br,buffer,nom_fr,buffer,objectif_km,int32,km_redadeg,int32,km_reels,real64 } MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -DEFAULT_MACRO Aggregator_BREAK_ATTR -INCLUDE [if {"No" == "Yes"} {puts {MACRO Aggregator_BREAK_ATTR BREAK_BEFORE_FIELD_CHANGE secteur_id} }] -FACTORY_DEF {*} AggregateFactory FACTORY_NAME Aggregator INPUT FEATURE_TYPE Sorter_SORTED_1_AdG4IKX8gxs= MODE ONE_LEVEL GROUP_BY { secteur_id } $(Aggregator_BREAK_ATTR) REMOVE_GEOMETRY NO ACCUMULATE_ATTRIBUTES One LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE SEPARATOR PRODUCE_MULTIS YES OUTPUT AGGREGATE FEATURE_TYPE Aggregator_AGGREGATE -# ------------------------------------------------------------------------- -INCLUDE TCL - if {{OUTGOING} == {OUTGOING}} { set attrs [list {km_reels}]; } else { set attrAll {}; if {[string length $attrAll] == 0} { return; }; set attrs [split {} { }]; }; if {{NO_OP} == {NO_OP}} { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV; } else { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV_MULTI_FEATURE; }; foreach attr $attrs { lappend parmList $attr; lappend parmList {roundLength10001}; lappend parmList {FLOAT}; }; lappend parmList {ExpressionEvaluator}; if {{NO_OP} == {OTHER_NULL_VALUE_2}} { lappend parmList {NO_OP}; lappend parmList {}; lappend parmList {0}; }; puts "MACRO __fme_expressionevaluator_evaluateArgs__ [join $parmList ,]"; -END_INCLUDE -FACTORY_DEF {*} TeeFactory FACTORY_NAME { ExpressionEvaluator } INPUT FEATURE_TYPE Aggregator_AGGREGATE OUTPUT { FEATURE_TYPE ExpressionEvaluator_OUTPUT @EvaluateExpression($(__fme_expressionevaluator_evaluateArgs__)) } -MACRO __fme_expressionevaluator_evaluateArgs__ -# ------------------------------------------------------------------------- -FACTORY_DEF {*} GeneralizeFactory FACTORY_NAME { Generalizer } INPUT FEATURE_TYPE ExpressionEvaluator_OUTPUT FLUSH_WHEN_GROUPS_CHANGE { } REJECT_INVALID_GEOM Yes ALLOW_NULLS yes REJECT_NOT_DEFAULT Yes PRESERVE_SHARED_BOUNDARIES { Yes } PRESERVE_PATH_SEGMENTS { YES } ALGORITHM { Douglas } TOLERANCE { "10" } FILLET_RADIUS { "" } CLEANING_TOLERANCE { NONE } OUTPUT { GENERALIZED FEATURE_TYPE Generalizer_OUTPUT } OUTPUT { REJECTED FEATURE_TYPE Generalizer_ } -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME Generalizer_ INPUT FEATURE_TYPE Generalizer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, GeneralizeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -INCLUDE TCL - if {{OUTGOING} == {OUTGOING}} { set attrs [list {km_reels}]; } else { set attrAll {}; if {[string length $attrAll] == 0} { return; }; set attrs [split {} { }]; }; if {{NO_OP} == {NO_OP}} { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV; } else { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV_MULTI_FEATURE; }; foreach attr $attrs { lappend parmList $attr; lappend parmList {roundLength10001}; lappend parmList {FLOAT}; }; lappend parmList {ExpressionEvaluator_2}; if {{NO_OP} == {OTHER_NULL_VALUE_2}} { lappend parmList {NO_OP}; lappend parmList {}; lappend parmList {0}; }; puts "MACRO __fme_expressionevaluator_evaluateArgs__ [join $parmList ,]"; -END_INCLUDE -FACTORY_DEF {*} TeeFactory FACTORY_NAME { ExpressionEvaluator_2 } INPUT FEATURE_TYPE Sorter_SORTED_2_WrWvotwy67E= OUTPUT { FEATURE_TYPE ExpressionEvaluator_2_OUTPUT @EvaluateExpression($(__fme_expressionevaluator_evaluateArgs__)) } -MACRO __fme_expressionevaluator_evaluateArgs__ -# ------------------------------------------------------------------------- -FACTORY_DEF {*} GeneralizeFactory FACTORY_NAME { Generalizer_2 } INPUT FEATURE_TYPE ExpressionEvaluator_2_OUTPUT FLUSH_WHEN_GROUPS_CHANGE { } REJECT_INVALID_GEOM Yes ALLOW_NULLS yes REJECT_NOT_DEFAULT Yes PRESERVE_SHARED_BOUNDARIES { Yes } PRESERVE_PATH_SEGMENTS { YES } ALGORITHM { Douglas } TOLERANCE { "10" } FILLET_RADIUS { "" } CLEANING_TOLERANCE { NONE } OUTPUT { GENERALIZED FEATURE_TYPE Generalizer_2_OUTPUT } OUTPUT { REJECTED FEATURE_TYPE Generalizer_2_ } -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME Generalizer_2_ INPUT FEATURE_TYPE Generalizer_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, Generalizer_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Input Input Collector" INPUT FEATURE_TYPE Sorter_4_SORTED_1_xZN7XGJzQYs= OUTPUT FEATURE_TYPE IterativeSnipper_Input -MACRO IterativeSnipper_WORKSPACE_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_XFORMER_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_TRANSFORMER_GROUP -MACRO $(IterativeSnipper_WORKSPACE_NAME)___COMPOUND_PARAMETERS -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SUB_DOC_NAME IterativeSnipper -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SNIPMODE ToLength -MACRO $(IterativeSnipper_WORKSPACE_NAME)_SnipLength @Value(km_redadeg) -DEFAULT_MACRO IterativeSnipper_WORKSPACE_NAME "" -INCLUDE [puts {MACRO WB_OLD_CONTEXT_$(IterativeSnipper_WORKSPACE_NAME) $(WB_CURRENT_CONTEXT)}; puts {MACRO WB_CURRENT_CONTEXT $(IterativeSnipper_WORKSPACE_NAME)}] -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Input1621322517 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1621322517 Input Splitter" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_LengthCalculatorInput INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "Iterative_Snipper_length" @Length(REJECTABLE,3,"1") -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_" @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_OUTPUT" @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_" OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, IterativeSnipper_LengthCalculator_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -MACRO OUTPUT_LINE_FTYPE not_selected -MACRO OUTPUT_LINE_FTYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_LINE -MACRO OUTPUT_INSTANCE_FTYPE not_selected -Lookup $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterTable "" "not_selected" fme_line $(OUTPUT_LINE_FTYPE) -MACRO COLLECTION_HANDLING NOT_THIS_TIME -MACRO INSTANCE_FILTERING * -INCLUDE [ if 0 { puts "MACRO COLLECTION_HANDLING *"; if { puts "MACRO INSTANCE_FILTERING NOT_THIS_TIME"; }; }; if {{$(OUTPUT_INSTANCE_FTYPE)} == "not_selected"} { puts "MACRO INSTANCE_FILTERING NOT_THIS_TIME"; }; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_InputPassThrough } INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Input" OUTPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ @Geometry(FIX_FMETYPE_FMEGEOMETRY) } -FACTORY_DEF {$(INSTANCE_FILTERING)} TestFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_InstanceTest } INPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ } TEST @Geometry(IS_GEOMETRY_INSTANCE) == 1 OUTPUT { PASSED FEATURE_TYPE $(OUTPUT_INSTANCE_FTYPE) } OUTPUT { FAILED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ } -FACTORY_DEF {$(COLLECTION_HANDLING)} TestFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_CollectionTest } INPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ } TEST &fme_type == "fme_collection" OUTPUT { FAILED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ } OUTPUT { PASSED FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Collection___ } -FACTORY_DEF {$(COLLECTION_HANDLING)} DeaggregateFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Deagg } INPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Collection___ } HOMOGENIZE_COLLECTIONS YES RECURSIVE YES SET_FME_TYPE YES INSTANTIATE_GEOMETRY_INSTANCES_NEW { } OUTPUT { POINT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ } OUTPUT { LINE FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ } OUTPUT { POLYGON FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ } OUTPUT { DONUT FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ } OUTPUT { AGGREGATE FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ } -FACTORY_DEF {*} TeeFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterPrepper } INPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___HomogeneousAggregate___ } INPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Not_Collection___ } INPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Input___ } OUTPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ @SupplyAttributes("$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_8c963b75_dc12_48a6_a7db_df257b52cf267_targetFeatureType", @Lookup($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_RouterTable,&fme_type)) } -FACTORY_DEF {*} TestFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_Router } INPUT { FEATURE_TYPE $(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter___Prepped___ } TEST { @Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_8c963b75_dc12_48a6_a7db_df257b52cf267_targetFeatureType) != "not_selected" } OUTPUT { PASSED FEATURE_TYPE * @FeatureType(@Value($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_8c963b75_dc12_48a6_a7db_df257b52cf267_targetFeatureType)) @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_8c963b75_dc12_48a6_a7db_df257b52cf267_targetFeatureType) } OUTPUT { FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_" @RemoveAttributes($(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_8c963b75_dc12_48a6_a7db_df257b52cf267_targetFeatureType) } -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_LengthCalculatorInput INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_LINE" OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "Iterative_Snipper_length" @Length(REJECTABLE,3,"1") -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_" @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_OUTPUT" @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_" OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, IterativeSnipper_LengthCalculatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_OUTPUT" TEST "@EvaluateExpression(FDIV,STRING_ENCODED,$($(IterativeSnipper_WORKSPACE_NAME)_SNIPMODE),$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode)" = ToNumber ENCODED BOOLEAN_OPERATOR OR COMPOSITE_TEST_EXPR "" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_PASSED" OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_FAILED" -# ------------------------------------------------------------------------- -INCLUDE TCL - if {{OUTGOING} == {OUTGOING}} { set attrs [list {Iterative_Snipper_maxLength}]; } else { set attrAll {}; if {[string length $attrAll] == 0} { return; }; set attrs [split {} { }]; }; if {{NO_OP} == {NO_OP}} { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV; } else { set parmList ATTR_CREATE_EXPR_PROPAGATE_MISSING_TYPED_FDIV_MULTI_FEATURE; }; foreach attr $attrs { lappend parmList $attr; lappend parmList {ValueIterative_Snipper_lengthdouble$($(IterativeSnipper_WORKSPACE_NAME)_SnipLength$encode)}; lappend parmList {FLOAT}; }; lappend parmList {$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator}; if {{NO_OP} == {OTHER_NULL_VALUE_2}} { lappend parmList {NO_OP}; lappend parmList {}; lappend parmList {0}; }; puts "MACRO __fme_expressionevaluator_evaluateArgs__ [join $parmList ,]"; -END_INCLUDE -FACTORY_DEF {*} TeeFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator } INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_PASSED" OUTPUT { FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator_OUTPUT" @EvaluateExpression($(__fme_expressionevaluator_evaluateArgs__)) } -MACRO __fme_expressionevaluator_evaluateArgs__ -# ------------------------------------------------------------------------- -Tcl2 proc $(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_doFetch {} { foreach {name val} {"Iterative_Snipper_maxLength {$($(IterativeSnipper_WORKSPACE_NAME)_SnipLength$encode)}"} { if { [string match {**} $val] == 1 } { set val [FME_Execute EvaluateExpression {STRING} $val {$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher}]; } elseif {[string match {*FME_CONDITIONAL*} $val] == 1} { set val [FME_Execute EvaluateExpression {STRING} $val {$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher}]; } else { set val [FME_DecodeTextOrAttr $val]; }; FME_SetAttribute [FME_DecodeText $name] $val } } -FACTORY_DEF {*} TeeFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher } INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snip_Mode_FAILED" OUTPUT { FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_OUTPUT" @Tcl2($(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_doFetch) } -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Tester INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LengthCalculator_2_OUTPUT" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ExpressionEvaluator_OUTPUT" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_ParameterFetcher_OUTPUT" TEST "@EvaluateExpression(FDIV,STRING_ENCODED,ValueIterative_Snipper_length,$(IterativeSnipper_WORKSPACE_NAME)_Tester)" <= "@EvaluateExpression(FDIV,STRING_ENCODED,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Tester)" ENCODED BOOLEAN_OPERATOR OR COMPOSITE_TEST_EXPR "" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_PASSED" OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_FAILED" -# ------------------------------------------------------------------------- -# The Snipper takes the constant "end" to mean the last vertex of the line, -# but Workbench won't let us put an alpha string into the "last vertex" textfield. -# We'll interpret an ending vertex of -1 as being the same as "end". -# This is used only in the distance and percentage. -Tcl2 proc $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex {numIndex} { if {$numIndex < 0} { return "end"; } else { return $numIndex; } } -INCLUDE [ if { ({DISTANCE} == {DISTANCE} || {DISTANCE} == {PERCENTAGE}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip(@Tcl2("$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex 0"),@Tcl2("$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_fixIndex @EvaluateExpression(FLOAT,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3)"),DISTANCE,3D,OUTPUT_REMNANT)}; } elseif { ({DISTANCE} == {MEASURE_RELATIVE_FROM_START} || {DISTANCE} == {MEASURE_REAL_VALUES}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip("0", "@EvaluateExpression(FLOAT,ValueIterative_Snipper_maxLength,$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3)", "", DISTANCE,OUTPUT_REMNANT)}; } elseif { ({DISTANCE} == {VERTEX}) } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc @Snip("","",VERTEX,OUTPUT_REMNANT)}; } ] -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Aggfilter INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_FAILED" TEST @Value(fme_geometry) != "fme_aggregate" OUTPUT PASSED FEATURE_TYPE ___TO_TYPEFILTER___ OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_" @SupplyAttributes(fme_rejection_code,INVALID_GEOMETRY_TYPE) -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Typefilter INPUT FEATURE_TYPE ___TO_TYPEFILTER___ TEST @Value(fme_type) == "fme_line" TEST @Value(fme_type) == "fme_arc" TEST @Value(fme_geometry) == "fme_polygon" BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE ___TO_INPUT___ OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_" @SupplyAttributes(fme_rejection_code,INVALID_GEOMETRY_TYPE) -FACTORY_DEF * TeeFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Input INPUT FEATURE_TYPE ___TO_INPUT___ OUTPUT FEATURE_TYPE ____TO_DEAGGREGATOR____ $($(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_snipFunc) -FACTORY_DEF * DeaggregateFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_SplitRemnants INPUT FEATURE_TYPE ____TO_DEAGGREGATOR____ RECURSIVE No SPLIT_COMPOSITES No SET_FME_TYPE Yes PART_NUMBER_FIELD _part_number GEOMETRY_NAME_FIELD _geometry_name OUTPUT POINT FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT LINE FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT POLYGON FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT DONUT FEATURE_TYPE ___TO_NULLNUKER___ OUTPUT AGGREGATE FEATURE_TYPE ___TO_NULLNUKER___ -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_NullNuker INPUT FEATURE_TYPE ___TO_NULLNUKER___ TEST @Value(_part_number) == 0 TEST @NumCoords() == 0 BOOLEAN_OPERATOR AND OUTPUT FAILED FEATURE_TYPE ___TO_OUTPUTTER___ -FACTORY_DEF * TestFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_Outputter INPUT FEATURE_TYPE ___TO_OUTPUTTER___ TEST @Value(_part_number) == 0 TEST @Tcl2("FME_AttributeExists _part_number") == 0 BOOLEAN_OPERATOR OR OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_OUTPUT" @RemoveAttributes(_part_number) OUTPUT FAILED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_REMNANTS" @RemoveAttributes(_part_number) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_" OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, IterativeSnipper_Snipper_3outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -# Build the List removal function and regular expression if there was any list attributes to be removed. -# If not, then we will not have any extra list removal call to @RemoveAttributes, which speeds the -# normal, non-list removal especially when in Bulk Mode. Note that this computation of the regular expressions is done -# once during mapping file parse time. -INCLUDE [ set listAttributeRemoveRegexps {}; set anyList {no}; foreach attr [split ""] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append listAttributeRemoveRegexps ",^$attr$"; set anyList {yes}; }; if { ${anyList} == {no} } { puts {MACRO $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_FUNC } } else { puts "MACRO $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_FUNC @RemoveAttributes(fme_pcre_match\"$listAttributeRemoveRegexps\")" }; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME { $(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover } INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Tester_PASSED" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_OUTPUT" OUTPUT { FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" @RemoveAttributes(fme_encoded,Iterative_Snipper_length,Iterative_Snipper_maxLength) $($(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_LIST_FUNC) } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME $(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_GeometryFilter_" MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "fme_rejection_code" "SET_TO" "INVALID_GEOMETRY_TYPE" } OUTPUT OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT" -FACTORY_DEF * BranchingFactory TARGET_FACTORY "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1621322517 Input Splitter" FACTORY_NAME "Loop to $(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT1621322517 Input Splitter" MAXIMUM_COUNT -1 INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Snipper_3_REMNANTS" OUTPUT PASSED FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_LoopINPUT" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_Output1621322517 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeRemover_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_Output" -FACTORY_DEF * TeeFactory FACTORY_NAME "$(IterativeSnipper_WORKSPACE_NAME)_1621322517 Output Collector" INPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_AttributeCreator_OUTPUT" OUTPUT FEATURE_TYPE "$(IterativeSnipper_WORKSPACE_NAME)_" -INCLUDE [puts {MACRO WB_CURRENT_CONTEXT $(WB_OLD_CONTEXT_$(IterativeSnipper_WORKSPACE_NAME))}] -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Output Output Renamer/Nuker" INPUT FEATURE_TYPE IterativeSnipper_Output OUTPUT FEATURE_TYPE IterativeSnipper_Output -FACTORY_DEF * TeeFactory FACTORY_NAME "IterativeSnipper Output Renamer/Nuker" INPUT FEATURE_TYPE IterativeSnipper_ OUTPUT FEATURE_TYPE IterativeSnipper_ -# ------------------------------------------------------------------------- -# Create the DomainName that this transformer will use. -# Because @Count itself will evalute the expression to calculate the -# domain, we don't need to do anything in Tcl per feature going by -INCLUDE [ set domainPrefix {}; if { {Local} == {Local} } { set domainPrefix [FME_EncodeText {Counter_2_}]; }; puts "MACRO Counter_2_FULL_DOMAIN ${domainPrefix}troncon_id"; ] -FACTORY_DEF {*} ExecuteFunctionFactory FACTORY_NAME { Counter_2_Rejector } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE IterativeSnipper_Output FUNCTION_DEFINITION { @Count(REJECTABLE_WITH_FLAG,fme_encoded,$(Counter_2_FULL_DOMAIN),"@EvaluateExpression(FDIV,FLOAT,$(START$encode),Counter_2)") } RESULT_ATTRIBUTE { "troncon_id" } FEATURE_TABLE_SHIM_SUPPORT Yes OUTPUT { COMPLETE FEATURE_TYPE Counter_2_OUTPUT } OUTPUT { REJECTED FEATURE_TYPE Counter_2_ } -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME Counter_2_ INPUT FEATURE_TYPE Counter_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, Counter_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_LengthCalculatorInput INPUT FEATURE_TYPE Counter_2_OUTPUT OUTPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_LengthCalculator INPUT FEATURE_TYPE ___TOLENGTHCALCULATOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) OUTPUT FEATURE_TYPE ___TOREJECTOR___ "longueur" @Length(REJECTABLE,2,"1") -FACTORY_DEF * TestFactory FACTORY_NAME LengthCalculator_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) != "" OUTPUT PASSED FEATURE_TYPE LengthCalculator_ @RemoveAttributes(___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE LengthCalculator_OUTPUT @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LengthCalculator_ INPUT FEATURE_TYPE LengthCalculator_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LengthCalculatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} SortFactory FACTORY_NAME { Sorter_3 } INPUT FEATURE_TYPE LengthCalculator_OUTPUT FLUSH_WHEN_GROUPS_CHANGE { No } SORT_BY { secteur_id NUMERIC ASCENDING troncon_id NUMERIC ASCENDING } OUTPUT { SORTED FEATURE_TYPE Sorter_3_SORTED } -FACTORY_DEF * TeeFactory FACTORY_NAME "Sorter_3 SORTED Splitter" INPUT FEATURE_TYPE Sorter_3_SORTED OUTPUT FEATURE_TYPE Sorter_3_SORTED_0_fFLYyOM90A0= OUTPUT FEATURE_TYPE Sorter_3_SORTED_1_2tOcv2i/uGI= OUTPUT FEATURE_TYPE Sorter_3_SORTED_2_h/1Aw1J8BQA= OUTPUT FEATURE_TYPE Sorter_3_SORTED_3_XoGbwsXKD4g= -# ------------------------------------------------------------------------- -Tcl2 set {CoordinateConcatenator_coordDelim} [FME_DecodeText {|}]; -Tcl2 set {CoordinateConcatenator_elementDelim} [FME_DecodeText {}]; -Tcl2 proc CoordinateConcatenator_coord_list {DIM} { global {CoordinateConcatenator_coordDelim}; global {CoordinateConcatenator_elementDelim}; set numCoords [FME_Coordinates numCoords]; set output {}; set includeX [string first {X} {Y X} ]; set includeY [string first {Y} {Y X} ]; set includeZ [string first {Z} {Y X} ]; if { $includeX == -1 && $includeY == -1 && $includeZ == -1 } { FME_SetAttribute _coordinates $output; return; }; for {set i 0} {$i < $numCoords} {incr i} { if {$includeX != -1} { append output [FME_Coordinates getCoord x $i]; }; if {$includeY != -1} { if {$includeX != -1} { append output [set {CoordinateConcatenator_elementDelim}] [FME_Coordinates getCoord y $i]; } else { append output [FME_Coordinates getCoord y $i]; }; }; if { $DIM == 3 && $includeZ != -1 } { if { $includeX != -1 || $includeY != -1 } { append output [set {CoordinateConcatenator_elementDelim}] [FME_Coordinates getCoord z $i]; } else { append output [FME_Coordinates getCoord z $i]; }; }; if {$i < ($numCoords - 1)} { append output [set {CoordinateConcatenator_coordDelim}] }; }; FME_SetAttribute _coordinates $output; } -FACTORY_DEF {*} TeeFactory FACTORY_NAME { CoordinateConcatenator } INPUT FEATURE_TYPE Sorter_3_SORTED_1_2tOcv2i/uGI= OUTPUT { FEATURE_TYPE CoordinateConcatenator_OUTPUT @Tcl2("CoordinateConcatenator_coord_list @Dimension()") } -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_15a001be_b3c2_49ac_8da7_0746af4684e812_splitDelim [FME_DecodeText {|}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_15a001be_b3c2_49ac_8da7_0746af4684e812_splitDelim]] } { set AttributeSplitter_15a001be_b3c2_49ac_8da7_0746af4684e812_splitWidths [split [regsub -all {s$} {|} {}] s]; proc AttributeSplitter_doSplit {} { global AttributeSplitter_15a001be_b3c2_49ac_8da7_0746af4684e812_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set attrNum 0; set listName [FME_DecodeText {_coords}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_15a001be_b3c2_49ac_8da7_0746af4684e812_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_doSplit {} { global AttributeSplitter_15a001be_b3c2_49ac_8da7_0746af4684e812_splitDelim; set delim [set AttributeSplitter_15a001be_b3c2_49ac_8da7_0746af4684e812_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coordinates}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter INPUT FEATURE_TYPE CoordinateConcatenator_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_OUTPUT @Tcl2(AttributeSplitter_doSplit) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME { ListElementCounter } INPUT FEATURE_TYPE AttributeSplitter_OUTPUT OUTPUT { FEATURE_TYPE ListElementCounter_OUTPUT "_vertex_count" @NumElements("_coords",ENCODED) } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME { GeometryRemover } INPUT FEATURE_TYPE ListElementCounter_OUTPUT OUTPUT { FEATURE_TYPE GeometryRemover_OUTPUT @RemoveGeometry() } -FACTORY_DEF * TeeFactory FACTORY_NAME "GeometryRemover OUTPUT Splitter" INPUT FEATURE_TYPE GeometryRemover_OUTPUT OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT_0_lyMsYNg46jM= OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT_1_OUiOuQAK2cA= -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_indexer {index numElements prefix suffix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; set suffix [FME_DecodeText $suffix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {$suffix != {} } { set newAttr $newAttr$suffix; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_IntTester INPUT FEATURE_TYPE GeometryRemover_OUTPUT_0_lyMsYNg46jM= TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_OUTPUT @Tcl2("ListIndexer_indexer 0 0 {} {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_OUTPUT @Tcl2("ListIndexer_indexer 0 @NumElements(_coords{}) {} {}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_ INPUT FEATURE_TYPE ListIndexer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_2_6e1cfec1_50de_4b82_a06e_5996a87aa88812_splitDelim [FME_DecodeText {}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_2_6e1cfec1_50de_4b82_a06e_5996a87aa88812_splitDelim]] } { set AttributeSplitter_2_6e1cfec1_50de_4b82_a06e_5996a87aa88812_splitWidths [split [regsub -all {s$} {} {}] s]; proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_6e1cfec1_50de_4b82_a06e_5996a87aa88812_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_2_6e1cfec1_50de_4b82_a06e_5996a87aa88812_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_2_doSplit {} { global AttributeSplitter_2_6e1cfec1_50de_4b82_a06e_5996a87aa88812_splitDelim; set delim [set AttributeSplitter_2_6e1cfec1_50de_4b82_a06e_5996a87aa88812_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter_2 INPUT FEATURE_TYPE ListIndexer_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_2_OUTPUT @Tcl2(AttributeSplitter_2_doSplit) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_2_indexer {index numElements prefix suffix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; set suffix [FME_DecodeText $suffix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {$suffix != {} } { set newAttr $newAttr$suffix; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_2_IntTester INPUT FEATURE_TYPE AttributeSplitter_2_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_2_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_2_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_2_OUTPUT @Tcl2("ListIndexer_2_indexer 0 0 {x} {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_2_OUTPUT @Tcl2("ListIndexer_2_indexer 0 @NumElements(_coords_vertex{}) {x} {}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_2_ INPUT FEATURE_TYPE ListIndexer_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_3_indexer {index numElements prefix suffix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; set suffix [FME_DecodeText $suffix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {$suffix != {} } { set newAttr $newAttr$suffix; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_3_IntTester INPUT FEATURE_TYPE ListIndexer_2_OUTPUT TEST "1" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_3_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_3_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "1" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_3_OUTPUT @Tcl2("ListIndexer_3_indexer 1 0 {y} {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_3_OUTPUT @Tcl2("ListIndexer_3_indexer 1 @NumElements(_coords_vertex{}) {y} {}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_3_ INPUT FEATURE_TYPE ListIndexer_3_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_3outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -# Build the List removal function and regular expression if there was any list attributes to be removed. -# If not, then we will not have any extra list removal call to @RemoveAttributes, which speeds the -# normal, non-list removal especially when in Bulk Mode. Note that this computation of the regular expressions is done -# once during mapping file parse time. -INCLUDE [ set listAttributeRemoveRegexps {}; set anyList {no}; foreach attr [split "_coords_vertex"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append listAttributeRemoveRegexps ",^$attr$"; set anyList {yes}; }; if { ${anyList} == {no} } { puts {MACRO AttributeRemover_LIST_FUNC } } else { puts "MACRO AttributeRemover_LIST_FUNC @RemoveAttributes(fme_pcre_match\"$listAttributeRemoveRegexps\")" }; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME { AttributeRemover } INPUT FEATURE_TYPE ListIndexer_3_OUTPUT OUTPUT { FEATURE_TYPE AttributeRemover_OUTPUT @RemoveAttributes(fme_encoded,_coords_vertex0,_coords0,_coordinates) $(AttributeRemover_LIST_FUNC) } -# ------------------------------------------------------------------------- -FACTORY_DEF * VertexCreatorFactory FACTORY_NAME VertexCreator INPUT FEATURE_TYPE AttributeRemover_OUTPUT MODE ADD INDEX "" CONTINUE_ON_ERROR YES XVAL "@EvaluateExpression(FDIV,FLOAT,Valuex_coords_vertex,VertexCreator)" YVAL "@EvaluateExpression(FDIV,FLOAT,Valuey_coords_vertex,VertexCreator)" OUTPUT OUTPUT FEATURE_TYPE VertexCreator_OUTPUT OUTPUT REJECTED FEATURE_TYPE VertexCreator_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME VertexCreator_ INPUT FEATURE_TYPE VertexCreator_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, VertexCreatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME { AttributeCreator } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE VertexCreator_OUTPUT MULTI_FEATURE_MODE { NO } NULL_ATTR_MODE { NO_OP } ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "position_vertex" "SET_TO" "debut" } OUTPUT { OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT } -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeCreator OUTPUT Splitter" INPUT FEATURE_TYPE AttributeCreator_OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT_0_lQ+3mj5tm0E= OUTPUT FEATURE_TYPE AttributeCreator_OUTPUT_1_Et/p63Aqn4M= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "Vertex_debut (Disabled) Nuker" INPUT FEATURE_TYPE AttributeCreator_OUTPUT_1_Et/p63Aqn4M= -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_4_indexer {index numElements prefix suffix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; set suffix [FME_DecodeText $suffix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {$suffix != {} } { set newAttr $newAttr$suffix; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_4_IntTester INPUT FEATURE_TYPE GeometryRemover_OUTPUT_1_OUiOuQAK2cA= TEST "@EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4)" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_4_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_4_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "@EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4)" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_4_OUTPUT @Tcl2("ListIndexer_4_indexer @EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4) 0 {} {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_4_OUTPUT @Tcl2("ListIndexer_4_indexer @EvaluateExpression(FDIV,FLOAT,Value_vertex_count-1,ListIndexer_4) @NumElements(_coords{}) {} {}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_4_ INPUT FEATURE_TYPE ListIndexer_4_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_4outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 set AttributeSplitter_3_c4f60f29_c155_49a1_9ee6_2612e33e337612_splitDelim [FME_DecodeText {}]; if { [regexp {^([1-9][0-9]*s)+$} [set AttributeSplitter_3_c4f60f29_c155_49a1_9ee6_2612e33e337612_splitDelim]] } { set AttributeSplitter_3_c4f60f29_c155_49a1_9ee6_2612e33e337612_splitWidths [split [regsub -all {s$} {} {}] s]; proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_c4f60f29_c155_49a1_9ee6_2612e33e337612_splitWidths; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set attrNum 0; set listName [FME_DecodeText {_coords_vertex}]; set attrPos 0; set keepEmptyParts [string equal {No} {No}]; foreach width [set AttributeSplitter_3_c4f60f29_c155_49a1_9ee6_2612e33e337612_splitWidths] { set endPos [expr $attrPos + $width - 1]; set bit [string range $source $attrPos $endPos]; set part [string trim $bit]; if { $keepEmptyParts || $part != \"\" } { FME_SetAttribute "$listName{$attrNum}" $part; incr attrNum; }; incr attrPos $width; }; }; } else { proc AttributeSplitter_3_doSplit {} { global AttributeSplitter_3_c4f60f29_c155_49a1_9ee6_2612e33e337612_splitDelim; set delim [set AttributeSplitter_3_c4f60f29_c155_49a1_9ee6_2612e33e337612_splitDelim]; set delimLength [string length $delim]; set source [FME_GetAttribute [FME_DecodeText {_coords}]]; set keepEmptyParts [string equal {No} {No}]; set bits {}; set startIndex 0; set nextIndex [string first $delim $source $startIndex]; while {$nextIndex >= 0} { lappend bits [string range $source $startIndex [expr $nextIndex-1]]; set startIndex [expr $nextIndex + $delimLength]; set nextIndex [string first $delim $source $startIndex]; }; lappend bits [string range $source $startIndex end]; set listName [FME_DecodeText {_coords_vertex}]; set attrNum 0; foreach bit $bits { set trimmedPart [string trim $bit]; if { $keepEmptyParts || $trimmedPart != \"\" } { FME_SetAttribute "$listName{$attrNum}" $trimmedPart; incr attrNum; }; } } } -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeSplitter_3 INPUT FEATURE_TYPE ListIndexer_4_OUTPUT OUTPUT FEATURE_TYPE AttributeSplitter_3_OUTPUT @Tcl2(AttributeSplitter_3_doSplit) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_5_indexer {index numElements prefix suffix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; set suffix [FME_DecodeText $suffix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {$suffix != {} } { set newAttr $newAttr$suffix; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_5_IntTester INPUT FEATURE_TYPE AttributeSplitter_3_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_5_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_5_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "0" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_5_OUTPUT @Tcl2("ListIndexer_5_indexer 0 0 {x} {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_5_OUTPUT @Tcl2("ListIndexer_5_indexer 0 @NumElements(_coords_vertex{}) {x} {}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_5_ INPUT FEATURE_TYPE ListIndexer_5_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_5outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -Tcl2 proc ListIndexer_6_indexer {index numElements prefix suffix} { if {$index < 0 } { set index [expr $numElements + $index]; }; regsub \"{}\" {_coords_vertex{}} \"{$index}\" listWithIndex; regsub \"{}\" {_coords_vertex{}} {} listBase; set complexListExp "$listWithIndex\."; set prefixLength [expr [string length $complexListExp]-1]; set prefix [FME_DecodeText $prefix]; set suffix [FME_DecodeText $suffix]; foreach attr [FME_AttributeNames] { set newAttr {}; if {$attr == $listWithIndex} { set newAttr $listBase; } elseif {[string first $complexListExp $attr] == 0} { set newAttr [string replace $attr 0 $prefixLength]; }; if {$newAttr != {}} { if {$prefix != {} } { set newAttr $prefix$newAttr; }; if {$suffix != {} } { set newAttr $newAttr$suffix; }; if {[string first {fme_} $newAttr] != 0} { set first [string first {fme_} $newAttr]; lappend attrsToCopy $newAttr $attr; }; }; }; if {[info exists attrsToCopy] && [llength $attrsToCopy] > 0} { eval FME_Execute CopyAttributes $attrsToCopy; }; } -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_6_IntTester INPUT FEATURE_TYPE ListIndexer_5_OUTPUT TEST "1" TYPE INT ENCODED OUTPUT PASSED FEATURE_TYPE __toOutput__ OUTPUT FAILED FEATURE_TYPE ListIndexer_6_ fme_rejection_code "INVALID_PARAMETER_LIST_INDEX" -FACTORY_DEF * TestFactory FACTORY_NAME ListIndexer_6_ListIndexer INPUT FEATURE_TYPE __toOutput__ TEST "1" >= 0 OUTPUT PASSED FEATURE_TYPE ListIndexer_6_OUTPUT @Tcl2("ListIndexer_6_indexer 1 0 {y} {}") OUTPUT FAILED FEATURE_TYPE ListIndexer_6_OUTPUT @Tcl2("ListIndexer_6_indexer 1 @NumElements(_coords_vertex{}) {y} {}") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME ListIndexer_6_ INPUT FEATURE_TYPE ListIndexer_6_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, ListIndexer_6outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -# Build the List removal function and regular expression if there was any list attributes to be removed. -# If not, then we will not have any extra list removal call to @RemoveAttributes, which speeds the -# normal, non-list removal especially when in Bulk Mode. Note that this computation of the regular expressions is done -# once during mapping file parse time. -INCLUDE [ set listAttributeRemoveRegexps {}; set anyList {no}; foreach attr [split "_coords_vertex _coords"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append listAttributeRemoveRegexps ",^$attr$"; set anyList {yes}; }; if { ${anyList} == {no} } { puts {MACRO AttributeRemover_2_LIST_FUNC } } else { puts "MACRO AttributeRemover_2_LIST_FUNC @RemoveAttributes(fme_pcre_match\"$listAttributeRemoveRegexps\")" }; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME { AttributeRemover_2 } INPUT FEATURE_TYPE ListIndexer_6_OUTPUT OUTPUT { FEATURE_TYPE AttributeRemover_2_OUTPUT @RemoveAttributes(fme_encoded,_coords_vertex0,_coords,_coords0) $(AttributeRemover_2_LIST_FUNC) } -# ------------------------------------------------------------------------- -FACTORY_DEF * VertexCreatorFactory FACTORY_NAME VertexCreator_2 INPUT FEATURE_TYPE AttributeRemover_2_OUTPUT MODE ADD INDEX "" CONTINUE_ON_ERROR YES XVAL "@EvaluateExpression(FDIV,FLOAT,Valuex_coords_vertex,VertexCreator_2)" YVAL "@EvaluateExpression(FDIV,FLOAT,Valuey_coords_vertex,VertexCreator_2)" OUTPUT OUTPUT FEATURE_TYPE VertexCreator_2_OUTPUT OUTPUT REJECTED FEATURE_TYPE VertexCreator_2_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME VertexCreator_2_ INPUT FEATURE_TYPE VertexCreator_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, VertexCreator_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory FACTORY_NAME { AttributeCreator_2 } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE VertexCreator_2_OUTPUT MULTI_FEATURE_MODE { NO } NULL_ATTR_MODE { NO_OP } ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "position_vertex" "SET_TO" "fin" } OUTPUT { OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT } -FACTORY_DEF * TeeFactory FACTORY_NAME "AttributeCreator_2 OUTPUT Splitter" INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_0_j0uI5yR3ojs= OUTPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_1_RySErNGX5NA= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "Vertex_fin (Disabled) Nuker" INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_0_j0uI5yR3ojs= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} DuplicateRemoverFactory FACTORY_NAME { DuplicateFilter } COMMAND_PARM_EVALUATION SINGLE_PASS SUPPORTS_FEATURE_TABLES INPUT FEATURE_TYPE AttributeCreator_OUTPUT_0_lQ+3mj5tm0E= INPUT FEATURE_TYPE AttributeCreator_2_OUTPUT_1_RySErNGX5NA= KEY_ATTRIBUTES { y_coords_vertex x_coords_vertex } INPUT_IS_ORDERED { NO } PRESERVE_FEATURE_ORDER { PER_OUTPUT_PORT } OUTPUT { DUPLICATE FEATURE_TYPE DuplicateFilter_DUPLICATE } OUTPUT { UNIQUE FEATURE_TYPE DuplicateFilter_UNIQUE } -# ------------------------------------------------------------------------- -# Build the List removal function and regular expression if there was any list attributes to be removed. -# If not, then we will not have any extra list removal call to @RemoveAttributes, which speeds the -# normal, non-list removal especially when in Bulk Mode. Note that this computation of the regular expressions is done -# once during mapping file parse time. -INCLUDE [ set listAttributeRemoveRegexps {}; set anyList {no}; foreach attr [split "_coords"] { set attr [FME_DecodeText $attr]; set attr [regsub "{}$" $attr "{}.*"]; set attr [regsub -all "{}" $attr "\\{\[0-9\]+\\}"]; append listAttributeRemoveRegexps ",^$attr$"; set anyList {yes}; }; if { ${anyList} == {no} } { puts {MACRO AttributeRemover_3_LIST_FUNC } } else { puts "MACRO AttributeRemover_3_LIST_FUNC @RemoveAttributes(fme_pcre_match\"$listAttributeRemoveRegexps\")" }; ] -FACTORY_DEF {*} TeeFactory FACTORY_NAME { AttributeRemover_3 } INPUT FEATURE_TYPE DuplicateFilter_UNIQUE OUTPUT { FEATURE_TYPE AttributeRemover_3_OUTPUT @RemoveAttributes(fme_encoded,_coords,path_seq,_vertex_count,_coordinates) $(AttributeRemover_3_LIST_FUNC) } -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "DuplicateFilter_Duplicate (Disabled) Nuker" INPUT FEATURE_TYPE DuplicateFilter_DUPLICATE -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "2_tronçons (Disabled) Nuker" INPUT FEATURE_TYPE Sorter_3_SORTED_2_h/1Aw1J8BQA= -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {IterativeSnipper__Rejected_} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME { IterativeSnipper__Rejected__Prepper } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE IterativeSnipper_ GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_ATTRIBUTE_PREFIX { IterativeSnipper__Rejected_ } RASTER_REDUCTION { NoReduction } POINT_CLOUD_REDUCTION { NO_THINNING } OUTPUT { RESULT FEATURE_TYPE __viewme__ } -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF {*} RecorderFactory FACTORY_NAME { IterativeSnipper__Rejected__Recorder } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE { "$(VISUALIZER_FEATURE_FILE)" } STORE_SCANNED_SCHEMA YES NORMALIZE_LIST_ATTRIBUTES_ON_SCHEMA YES CREATE_SPATIAL_INDEX { "$(VISUALIZER_CREATE_SPATIAL_INDEX)" } INSPECTOR { "$(VISUALIZER_CREATE_SPATIAL_INDEX)" } FSC_SCHEMA { fme_rejection_code,varchar200,secteur_id,int32,vertex,buffer,nom_br,buffer,nom_fr,buffer,objectif_km,int32,km_redadeg,int32 } MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -# Assumption is that the workspace temp dir has been already set and created. See controldefs.cpp - ControlDefs::writeVisualizerTempDir -DEFAULT_MACRO WORKSPACE_TEMP_DIR -INCLUDE [ set safeName "[regsub -all {[^a-zA-Z0-9]} {LineCombiner_Line} _]_[expr round(rand() * 1000000)]_[clock clicks -milliseconds]"; puts "MACRO SAFE_FFS_NAME $safeName"; ] -FACTORY_DEF {*} InspectorFactory FACTORY_NAME { LineCombiner_Line_Prepper } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE Sorter_4_SORTED_2_ymgKSdsXa+o= GROUP_ATTRIBUTE __inspector_feature_type_attr__ GROUP_ATTRIBUTE_PREFIX { LineCombiner_Line } RASTER_REDUCTION { NoReduction } POINT_CLOUD_REDUCTION { NO_THINNING } OUTPUT { RESULT FEATURE_TYPE __viewme__ } -# Now route all the features into the recorder, changing their -# feature type to the transformer name so that they view nicely -DEFAULT_MACRO VISUALIZER_FEATURE_FILE $(WORKSPACE_TEMP_DIR)/$(SAFE_FFS_NAME).ffs -DEFAULT_MACRO VISUALIZER_CREATE_SPATIAL_INDEX NO -# [PR#45549] The Data Inspector will limit the maximum number of features -# it reads on WIN32, so we will correspondingly limit the number of -# features we record here using the MAX_FEATURES_TO_RECORD directive. -FACTORY_DEF {*} RecorderFactory FACTORY_NAME { LineCombiner_Line_Recorder } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE __viewme__ _wb_termination_feature Yes @FeatureType(TERMINATOR_@Value(_wb_termination_xformer)) INPUT FEATURE_TYPE __viewme__ @FeatureType(@Value(__inspector_feature_type_attr__)) @RemoveAttributes(__inspector_feature_type_attr__) FEATURE_FILE { "$(VISUALIZER_FEATURE_FILE)" } STORE_SCANNED_SCHEMA YES NORMALIZE_LIST_ATTRIBUTES_ON_SCHEMA YES CREATE_SPATIAL_INDEX { "$(VISUALIZER_CREATE_SPATIAL_INDEX)" } INSPECTOR { "$(VISUALIZER_CREATE_SPATIAL_INDEX)" } FSC_SCHEMA { secteur_id,int32,vertex,buffer,nom_br,buffer,nom_fr,buffer,objectif_km,int32,km_redadeg,int32 } MODE RECORD STORE_SCANNED_METADATA RECORD_DIRECTLY_TO_DISK YES MAX_FEATURES_TO_RECORD WIN32 2000000 -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME { BulkAttributeRenamer_2 } INPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_1_dRsdNGVAD0c= OUTPUT { FEATURE_TYPE BulkAttributeRenamer_2_OUTPUT @RenameAttributes(PATTERN_REPLACE, ADDPREFIX, , "", "way_", "", "", "-_", "RENAME", "NONFME") } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} OverlayFactory FACTORY_NAME PointOnLineOverlayer INPUT LINE FEATURE_TYPE BulkAttributeRenamer_2_OUTPUT INPUT POINT FEATURE_TYPE AttributeRemover_3_OUTPUT TOLERANCE 1 OVERLAP_COUNT_ATTRIBUTE "_overlaps" DEAGGREGATE_INPUT Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" LIST_NAME "" LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE CANDIDATE_LIST_NAME "" CANDIDATE_LIST_ATTRS_TO_INCLUDE { } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE MODE COMPLETE OVERLAY_TYPE POINT_ON_LINE OUTPUT POINT FEATURE_TYPE PointOnLineOverlayer_POINT OUTPUT ILLEGAL_GEOM FEATURE_TYPE PointOnLineOverlayer_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME PointOnLineOverlayer_ INPUT FEATURE_TYPE PointOnLineOverlayer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, PointOnLineOverlayeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} OverlayFactory FACTORY_NAME PointOnAreaOverlayer INPUT POINT FEATURE_TYPE PointOnLineOverlayer_POINT INPUT POLYGON FEATURE_TYPE BulkAttributeRenamer_OUTPUT OVERLAP_COUNT_ATTRIBUTE "_overlaps" DEAGGREGATE_INPUT Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" LIST_NAME "" LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE CANDIDATE_LIST_NAME "" CANDIDATE_LIST_ATTRS_TO_INCLUDE { } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE MODE COMPLETE OVERLAY_TYPE POINT_ON_AREA POLYS_FIRST "NO" REJECT_INVALID_GEOM YES OUTPUT POINT FEATURE_TYPE PointOnAreaOverlayer_POINT OUTPUT ILLEGAL_GEOM FEATURE_TYPE PointOnAreaOverlayer_ -FACTORY_DEF * TeeFactory FACTORY_NAME "PointOnAreaOverlayer POINT Splitter" INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT OUTPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_0_ZK7VGYHSo24= OUTPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_1_x2WusK23Nmo= -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME PointOnAreaOverlayer_ INPUT FEATURE_TYPE PointOnAreaOverlayer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, PointOnAreaOverlayeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME { CoordinateSystemSetter } INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_0_ZK7VGYHSo24= OUTPUT { FEATURE_TYPE CoordinateSystemSetter_OUTPUT @CoordSys("EPSG:2154") } -# ------------------------------------------------------------------------- -FACTORY_DEF * TestFactory INPUT FEATURE_TYPE CoordinateSystemSetter_OUTPUT TEST "Specify Coordinate" == "All Coordinates" OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_PASSED OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_FAILED -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_PASSED INPUT FEATURE_TYPE CoordinateExtractor_PASSED TEST @Dimension() == 2 OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_OUTPUT @ZValue("") @Coordinate(x,ALL,""{}.x,FLATTEN_AGGREGATE,YES) @Coordinate(y,ALL,""{}.y,FLATTEN_AGGREGATE,NO) @Coordinate(z,ALL,""{}.z,FLATTEN_AGGREGATE,NO) @Dimension(2) OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT @Coordinate(x,ALL,""{}.x,FLATTEN_AGGREGATE,YES) @Coordinate(y,ALL,""{}.y,FLATTEN_AGGREGATE,NO) @Coordinate(z,ALL,""{}.z,FLATTEN_AGGREGATE,NO) -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_FAILED INPUT FEATURE_TYPE CoordinateExtractor_FAILED TEST @Dimension() == 2 OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_FAILED_PASSED OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) -FACTORY_DEF * TestFactory FACTORY_NAME CoordinateExtractor_FAILED_PASSED INPUT FEATURE_TYPE CoordinateExtractor_FAILED_PASSED TEST "" == "" OUTPUT PASSED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) OUTPUT FAILED FEATURE_TYPE CoordinateExtractor_OUTPUT "pk_x" @Coordinate(x,"0",FLATTEN_AGGREGATE,YES) "pk_y" @Coordinate(y,"0",FLATTEN_AGGREGATE,NO) -# ------------------------------------------------------------------------- -Tcl2 proc AttributeRounder_round {places} { set attrs [split {pk_y pk_x} { }]; foreach attr $attrs { set attr [FME_DecodeText $attr]; set original [FME_GetAttribute $attr]; if {$original == {} || [FME_IsAttributeNull $attr]} { FME_LogMessage fme_warn 917357 {AttributeRounder} $attr; continue; }; set comment {"do not attempt rounding if not a number"}; if {[string is double $original] == 0} {continue}; if { [catch { set multiplier [expr pow(10,$places)]; set result [expr "round($original * $multiplier) / $multiplier"]; set comment {"when rounding integers, chop trailing .0 from the value"}; if {$places == 0 || [string is wideinteger $original] == 1} { set result [regsub {[.]0*$} $result {}]; }; };] == 0 } { FME_SetAttribute $attr $result; } else { FME_LogMessage fme_warn 917350 {AttributeRounder} $attr; }; }; } -FACTORY_DEF * TestFactory FACTORY_NAME AttributeRounder INPUT FEATURE_TYPE CoordinateExtractor_OUTPUT TEST "2" TYPE INT ENCODED OUTPUT FAILED FEATURE_TYPE AttributeRounder_ fme_rejection_code "INVALID_PARAMETER_DECIMAL_PLACES" OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_AttributeRounder INPUT FEATURE_TYPE __toOutput__ OUTPUT FEATURE_TYPE AttributeRounder_OUTPUT @Tcl2("AttributeRounder_round 2") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_ INPUT FEATURE_TYPE AttributeRounder_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, AttributeRounderoutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME { AttributeCopier } INPUT FEATURE_TYPE AttributeRounder_OUTPUT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "pk_y" "pk_lat" "COPY" "" } ATTR_ACTION { "pk_x" "pk_long" "COPY" "" } OUTPUT { OUTPUT FEATURE_TYPE AttributeCopier_OUTPUT } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME { AttributeReprojector } INPUT FEATURE_TYPE AttributeCopier_OUTPUT OUTPUT { FEATURE_TYPE AttributeReprojector_OUTPUT @Reproject("EPSG:2154","LL-WGS84","pk_long","pk_lat") } -# ------------------------------------------------------------------------- -Tcl2 proc AttributeRounder_2_round {places} { set attrs [split {longueur} { }]; foreach attr $attrs { set attr [FME_DecodeText $attr]; set original [FME_GetAttribute $attr]; if {$original == {} || [FME_IsAttributeNull $attr]} { FME_LogMessage fme_warn 917357 {AttributeRounder_2} $attr; continue; }; set comment {"do not attempt rounding if not a number"}; if {[string is double $original] == 0} {continue}; if { [catch { set multiplier [expr pow(10,$places)]; set result [expr "round($original * $multiplier) / $multiplier"]; set comment {"when rounding integers, chop trailing .0 from the value"}; if {$places == 0 || [string is wideinteger $original] == 1} { set result [regsub {[.]0*$} $result {}]; }; };] == 0 } { FME_SetAttribute $attr $result; } else { FME_LogMessage fme_warn 917350 {AttributeRounder_2} $attr; }; }; } -FACTORY_DEF * TestFactory FACTORY_NAME AttributeRounder_2 INPUT FEATURE_TYPE AttributeReprojector_OUTPUT TEST "0" TYPE INT ENCODED OUTPUT FAILED FEATURE_TYPE AttributeRounder_2_ fme_rejection_code "INVALID_PARAMETER_DECIMAL_PLACES" OUTPUT PASSED FEATURE_TYPE __toOutput__ -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_2_AttributeRounder INPUT FEATURE_TYPE __toOutput__ OUTPUT FEATURE_TYPE AttributeRounder_2_OUTPUT @Tcl2("AttributeRounder_2_round 0") -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeRounder_2_ INPUT FEATURE_TYPE AttributeRounder_2_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, AttributeRounder_2outputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME { AttributeRenamer } INPUT FEATURE_TYPE AttributeRounder_2_OUTPUT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "municipality_nom" "municipality_name_fr" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "longueur" "length_real" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "km_redadeg" "length_theorical" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "municipality_admincode" "municipality_admincode" "RENAME_SET_DEFAULT" "" } OUTPUT { OUTPUT FEATURE_TYPE AttributeRenamer_OUTPUT } -# ------------------------------------------------------------------------- -FACTORY_DEF {*} SortFactory FACTORY_NAME { Sorter_2 } INPUT FEATURE_TYPE AttributeRenamer_OUTPUT FLUSH_WHEN_GROUPS_CHANGE { No } SORT_BY { secteur_id NUMERIC ASCENDING troncon_id NUMERIC ASCENDING } OUTPUT { SORTED FEATURE_TYPE Sorter_2_SORTED } -# ------------------------------------------------------------------------- -# Create the DomainName that this transformer will use. -# Because @Count itself will evalute the expression to calculate the -# domain, we don't need to do anything in Tcl per feature going by -INCLUDE [ set domainPrefix {}; if { {Local} == {Local} } { set domainPrefix [FME_EncodeText {Counter_}]; }; puts "MACRO Counter_FULL_DOMAIN ${domainPrefix}pk_id"; ] -FACTORY_DEF {*} ExecuteFunctionFactory FACTORY_NAME { Counter_Rejector } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE Sorter_2_SORTED FUNCTION_DEFINITION { @Count(REJECTABLE_WITH_FLAG,fme_encoded,$(Counter_FULL_DOMAIN),"@EvaluateExpression(FDIV,FLOAT,$(START$encode),Counter)") } RESULT_ATTRIBUTE { "pk_id" } FEATURE_TABLE_SHIM_SUPPORT Yes OUTPUT { COMPLETE FEATURE_TYPE Counter_OUTPUT } OUTPUT { REJECTED FEATURE_TYPE Counter_ } -FACTORY_DEF * TeeFactory FACTORY_NAME "Counter OUTPUT Splitter" INPUT FEATURE_TYPE Counter_OUTPUT OUTPUT FEATURE_TYPE Counter_OUTPUT_0_/sTFA1dnbN8= OUTPUT FEATURE_TYPE Counter_OUTPUT_1_bU15iCfwGHA= OUTPUT FEATURE_TYPE Counter_OUTPUT_2_pA+nVUfM3k0= OUTPUT FEATURE_TYPE Counter_OUTPUT_3_WeyqcBK0djk= -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME Counter_ INPUT FEATURE_TYPE Counter_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, CounteroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "pk (Disabled) Nuker" INPUT FEATURE_TYPE Counter_OUTPUT_0_/sTFA1dnbN8= -# ------------------------------------------------------------------------- -FACTORY_DEF {*} ConnectionFactory FACTORY_NAME LineBuilder INPUT FEATURE_TYPE Counter_OUTPUT_2_pA+nVUfM3k0= ACCUM_INPUT_ATTRS One LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE REMOVE_DUPLICATES NO OUTPUT LINE FEATURE_TYPE LineBuilder_LINE OUTPUT BAD_INPUT FEATURE_TYPE LineBuilder_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME LineBuilder_ INPUT FEATURE_TYPE LineBuilder_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, LineBuilderoutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "PointOnAreaOverlayer_Point (Disabled) Nuker" INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT_1_x2WusK23Nmo= -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC Generalizer_2_OUTPUT TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,1,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_secteurs.geojson COORDINATE_SYSTEM EPSG:4326 GEOMETRY ROUTE FME_GENERIC Sorter_3_SORTED_3_XoGbwsXKD4g= TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,2,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_troncons COORDINATE_SYSTEM EPSG:4326 GEOMETRY ROUTE FME_GENERIC Counter_OUTPUT_1_bU15iCfwGHA= TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_auto COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC LineBuilder_LINE TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_sens_verif COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC Sorter_3_SORTED_0_fFLYyOM90A0= TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_troncons COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC Generalizer_OUTPUT TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__phase_3_trace_secteurs COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC Counter_OUTPUT_3_WeyqcBK0djk= TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,3,SupplyAttributesENCODED__wb_out_feat_type__phase_3_pk_auto COORDINATE_SYSTEM EPSG:4326 GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- - -DEFAULT_MACRO FME_LAUNCH_VIEWER_APP NO -FACTORY_DEF * CreationFactory FACTORY_NAME VisualizerProcessor CREATE_AT_END OUTPUT FEATURE_TYPE __NUKEME__ @TCL("if {{$(FME_LAUNCH_VIEWER_APP)} == {YES}} { if [file exists {$(WORKSPACE_TEMP_DIR)}] {set files [glob -nocomplain -directory {$(WORKSPACE_TEMP_DIR)} -tails *.ffs]; if {[llength $files] == 1} { set theFile {$(WORKSPACE_TEMP_DIR)/}; append theFile [lindex $files 0]; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -f FFS \042$theFile\042 & \175; } elseif { [llength $files] == 0 } { catch { file delete -force {$(WORKSPACE_TEMP_DIR)} }; } else { set filesNoExt {}; set lastfile {}; foreach {fileName} [lsort $files] { set fileNoExt [string trimright $fileName {.ffs}]; if [regexp {(.*)_[0-9]*$} $fileNoExt wholething fileNoExtBase] { if { $fileNoExtBase == $lastfile } { continue } }; set lastfile $fileNoExt; lappend filesNoExt $fileNoExt }; eval FME_Execute System \173\042$(FME_HOME_UNIX)/fmedatainspector\042 --visualizer --single-application --delete-on-close --no-source-prompt -d {$(WORKSPACE_TEMP_DIR)} -a ffs -f FFS $filesNoExt & \175; }; }; }; ") -FACTORY_DEF * TeeFactory FACTORY_NAME VisualizerCleaner INPUT FEATURE_TYPE __NUKEME__ -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_trace_troncons postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO troncon_id int2 secteur_id int2 -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_pk_sens_verif postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid 2154 postgis_vacuum_analyze NO postgis_allow_serial_writing NO secteur_id int4 -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_pk_auto postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid 2154 postgis_vacuum_analyze NO postgis_allow_serial_writing NO pk_id text pk_x text pk_y text pk_long text pk_lat text length_real text length_theorical text secteur_id int8 municipality_admincode text municipality_postcode text municipality_name_fr text municipality_name_br text way_osm_id text way_highway text way_type text way_oneway text way_ref text way_name_fr text way_name_br text -# ------------------------------------------------------------------------- -POSTGIS_2_DEF phase_3_trace_secteurs postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO secteur_id int2 nom_fr text nom_br text km_reels numeric(20,10) -# ------------------------------------------------------------------------- -GEOJSON_1_DEF phase_3_trace_secteurs.geojson secteur_id int nom_fr string nom_br string km_reels float -# ------------------------------------------------------------------------- -GEOJSON_2_DEF phase_3_trace_troncons troncon_id int secteur_id int -# ------------------------------------------------------------------------- -GEOJSON_3_DEF phase_3_pk_auto pk_id string pk_x string pk_y string pk_long string pk_lat string length_real string length_theorical string secteur_id int municipality_admincode string municipality_postcode string municipality_name_fr string municipality_name_br string way_osm_id string way_highway string way_type string way_oneway string way_ref string way_name_fr string way_name_br string diff --git a/scripts/traitements_phase_4.sh b/scripts/traitements_phase_4.sh deleted file mode 100755 index 15b46ac..0000000 --- a/scripts/traitements_phase_4.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash - -# ce traitement consiste à exporter les données tracé et PK auto de la phase 4 pour alimenter autant de cartes Umap que de secteurs. -# ces cartes umap servent en phase 5 à modifier le placement des PK -# phase 5 = gestion manuelle des PK - - -set -e -set -u - -PSQL=/usr/bin/psql -DB_HOST=192.168.56.131 -DB_NAME=redadeg -DB_USER=redadeg - - - -#cd /data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/ - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Création des données phase 4" -echo "" -echo " exports geojson par secteurs" -echo "" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_01.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id = 10" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_02.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id = 20" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_03.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id = 30" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_04.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id = 40" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_05.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id = 50" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_06.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id >= 60 and secteur_id < 70" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_07.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id >= 70 and secteur_id < 80" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_08.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id >= 80 and secteur_id < 90" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_09.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id >= 90 and secteur_id < 100" - - -ogr2ogr -f "GeoJSON" data/phase_4_pk_secteur_10.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" phase_4_pk_auto_4326 -where "secteur_id >= 100 and secteur_id < 110" - - -echo " fait" -echo "" - -echo " pousse vers serveur" -echo "" - -rsync -av -z data/phase_4_*.geojson breizhpovh2:/data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/data/ - -echo "" -echo " fait" -echo "" - - -echo "" -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " F I N" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo "" diff --git a/scripts/traitements_phase_5.sh b/scripts/traitements_phase_5.sh deleted file mode 100755 index 3ea654a..0000000 --- a/scripts/traitements_phase_5.sh +++ /dev/null @@ -1,296 +0,0 @@ -#!/bin/bash - -# ce traitement consiste à charger les données des 10 cartes umap -# à les contrôler par rapport aux données de référence -# à les agréger -# puis les exporter pour merour - - -set -e -set -u - -#PSQL=/usr/bin/psql -PSQL=psql -DB_HOST=breizhpolenovo -DB_NAME=redadeg -DB_USER=redadeg -DB_PASS=redadeg - - -#cd /data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/ - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Chargement des données des cartes umap" -echo "" -echo "" - - - # OK ! - #dernierFichierCmd="ls -l1dt phase_5_pk_secteur_"$secteur"_* | head -1" - #eval $dernierFichierCmd - - -# on procède secteur par secteur -# on récupère les données umap et on les charge dans la même couche - -# on commence donc par vider la couche cible -# géré avec l'option -overwrite sur le secteur 1 -> pb : on a des lignes dans la couche de points… -# on commence par vider la table qui contiendra les calculs d'itinéraires - -echo " vidage de la couche de routage" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "TRUNCATE TABLE phase_5_pk_umap_4326 ;" -echo " fait" - -echo "" -echo " import des données umap" -echo "" - -echo " secteur 1" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027042/ > data/phase_5_pk_umap_tmp.geojson -# chargement initial -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 2" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027081/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 3" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027101/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 4" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027104/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 5" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027107/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 6" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027110/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 7" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027114/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 8" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027117/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 9" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027120/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - -echo " secteur 10" -curl -sS http://umap.openstreetmap.fr/fr/datalayer/1027123/ > data/phase_5_pk_umap_tmp.geojson -# on rajoute à la couche -ogr2ogr -f "PostgreSQL" PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ -data/phase_5_pk_umap_tmp.geojson -nln phase_5_pk_umap_4326 -explodecollections -append - - - -# ensuite on supprime les enregistrement aberrants -echo "" -echo " suppression des données nulles" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "DELETE FROM phase_5_pk_umap_4326 WHERE ST_geometrytype(the_geom) <> 'ST_Point' OR secteur_id IS NULL OR pk_id IS NULL ;" -echo " fait" - - -# et on charge la couche en 2154 pour pouvoir travailler -echo "" -echo " chargement de la couche de travail en 2154" -$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME \ --c "TRUNCATE phase_5_pk_umap ; -INSERT INTO phase_5_pk_umap -SELECT pk_id, secteur_id, ST_Transform(the_geom,2154) AS the_geom -FROM phase_5_pk_umap_4326 -ORDER BY pk_id ;" -echo " fait" - - -echo "" -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Contrôle des données par secteur" -echo "" - -# on veut la liste des vrais secteurs : pas des secteurs de gestion -# on instancie donc un tableau - -declare -a secteursArray=() - -secteursArray=(`$PSQL -h $DB_HOST -U $DB_USER $DB_NAME -t -X -A -c \ - "WITH a AS - ( - SELECT substring(secteur_id::text,1, char_length(secteur_id::text)-1)::integer AS secteur_id - FROM phase_5_pk_ref - ) - SELECT DISTINCT(secteur_id) FROM a ORDER BY secteur_id ;"`) - -#echo "secteursArray = " ${secteursArray[@]} - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -echo "" -echo " 1 : nombre de PK par secteur" -echo "" - -for secteur in ${secteursArray[@]} -do - #echo " secteur $secteur" - - # une requête qui compare le nb de PK entre la couche de référence et la couche umap - sect_deb=$secteur"0" # 1 --> 10 - sect_fin=$((secteur+1))0 - #echo "$sect_deb -> $sect_fin" - - $PSQL -X -A -t -h $DB_HOST -U $DB_USER $DB_NAME \ - -c "WITH ref AS ( - SELECT COUNT(pk_id) as ref FROM phase_5_pk_ref - WHERE (secteur_id >= $sect_deb and secteur_id < $sect_fin) - ), - umap AS ( - SELECT COUNT(pk_id) as umap FROM phase_5_pk_umap - WHERE (secteur_id >= $sect_deb and secteur_id < $sect_fin) - ) - SELECT - *, - CASE - WHEN ref.ref < umap.umap THEN 'plus' - WHEN ref.ref > umap.umap THEN 'moins' - WHEN ref.ref = umap.umap THEN 'pareil' - ELSE 'problème' - END AS test - FROM ref, umap" \ - --single-transaction \ - --set AUTOCOMMIT=off \ - --set ON_ERROR_STOP=on \ - --no-align \ - -t \ - --field-separator ' ' \ - --quiet | while read -a Record ; do - - nbPKref=${Record[0]} - nbPKumap=${Record[1]} - test=${Record[2]} - #test='moins' - - # on teste - if [[ $test == "pareil" ]]; - then echo " secteur $secteur ok : $nbPKref PK" - elif [[ $test == "plus" ]]; - then echo " secteur $secteur >>>> problème : " $((nbPKumap - $nbPKref)) " PK en trop" - elif [[ $test == "moins" ]]; - then echo " secteur $secteur >>>> problème : " $((nbPKref - $nbPKumap)) " PK en moins" - fi - - done - - # fin de la boucle -done - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -echo "" -echo "" -echo " 2 : si replacement : test de distance" -echo "" - - -# ici une requête PostGIS sortira les PK qui auront été trop déplacés - -read nb_pk_deplaces <<< $( $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME --no-align -t --quiet -c \ - "SELECT COUNT(*) - FROM phase_5_pk_ref r FULL JOIN phase_5_pk_umap u ON r.pk_id = u.pk_id - WHERE TRUNC(ST_Distance(r.the_geom, u.the_geom)::numeric,2) > 1 ;" -) - -echo " $nb_pk_deplaces PK déplacés manuellement" - - - - -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Application des traitements SQL phase 5" -echo "" - -echo " Recalage des PK sur le filaire OSM" -echo "" - -/Library/FME/2018.1/fme traitements_phase_5_recalage.fmw - -echo " fait" -echo "" - - - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# et on exporte en geojson pour umap et merour - -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Exports" -echo "" - -echo " exports geojson" -echo "" - -# la couche agrégée des PK gérés dans umap -rm data/phase_5_pk_umap.geojson -ogr2ogr -f "GeoJSON" data/phase_5_pk_umap.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" \ --sql "SELECT pk_id, secteur_id, the_geom FROM phase_5_pk_umap_4326 ORDER BY pk_id" - -# la nouvelle couche des PK recalés sur le tracé et avec les infos des voies OSM -rm data/phase_5_pk.geojson -ogr2ogr -f "GeoJSON" data/phase_5_pk.geojson PG:"host=$DB_HOST user=redadeg password=redadeg dbname=redadeg" \ --sql "SELECT * FROM phase_5_pk ORDER BY pk_id" - -echo " fait" -echo "" - -echo " pousse vers serveur" -echo "" - -rsync -av -z data/phase_5_pk_umap.geojson data/phase_5_pk.geojson data/phase_5_pk_hors_tolerance.geojson breizhpovh2:/data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/data/ - -echo "" -echo " fait" -echo "" - - -echo "" -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " F I N" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo "" diff --git a/scripts/traitements_phase_5.sql b/scripts/traitements_phase_5.sql deleted file mode 100644 index 92c048f..0000000 --- a/scripts/traitements_phase_5.sql +++ /dev/null @@ -1,37 +0,0 @@ - - - --- on vide puis on remplit à nouveau la couche finale des PK -TRUNCATE phase_5_pk ; - --- pour le moment avec les données de référence -INSERT INTO phase_5_pk -SELECT - r.pk_id, - ROUND(ST_X(ST_Transform(u.the_geom,2154))::numeric,1) as pk_x, - ROUND(ST_Y(ST_Transform(u.the_geom,2154))::numeric,1) as pk_y, - ST_X(u.the_geom) as pk_long, - ST_Y(u.the_geom) as pk_lat, - NULL as length_real, - r.length_theorical, - r.secteur_id, - r.municipality_admincode, - r.municipality_postcode, - r.municipality_name_fr, - r.municipality_name_br, - r.way_osm_id, - r.way_highway, - r.way_type, - r.way_oneway, - r.way_ref, - r.way_name_fr, - r.way_name_br, - u.the_geom -FROM phase_5_pk_ref r FULL JOIN phase_5_pk_umap u ON r.pk_id = u.pk_id -WHERE u.pk_id IS NOT NULL -ORDER BY r.pk_id ; - - --- on calcule les coordonnées - - diff --git a/scripts/traitements_phase_5_push_trace.sh b/scripts/traitements_phase_5_push_trace.sh deleted file mode 100755 index 329e895..0000000 --- a/scripts/traitements_phase_5_push_trace.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -# ce traitement consiste à exporter le tracé phase 3 qui a été recalculer -# avec un nommage phase 5 -# puis pusk vers le serveur - - -set -e -set -u - -#PSQL=/usr/bin/psql -PSQL=psql -DB_HOST=breizhpolenovo -DB_NAME=redadeg -DB_USER=redadeg -DB_PASS=redadeg - - - -# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -# et on exporte en geojson pour umap et merour - -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Exports" -echo "" - -echo " exports geojson" -echo "" - -rm data/phase_5_trace_secteurs.geojson -ogr2ogr -f "GeoJSON" data/phase_5_trace_secteurs.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ --sql "SELECT * FROM phase_3_trace_secteurs_4326 ORDER BY secteur_id" - -rm data/phase_5_trace_troncons.geojson -ogr2ogr -f "GeoJSON" data/phase_5_trace_troncons.geojson PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ --sql "SELECT * FROM phase_3_trace_troncons_4326 ORDER BY troncon_id" - - -echo " exports GML" -echo "" - -rm data/phase_2_trace_pgr.gml -ogr2ogr -f "GML" data/phase_2_trace_pgr.gml PG:"host=$DB_HOST user=$DB_USER password=$DB_PASS dbname=$DB_NAME" \ --sql "SELECT * FROM phase_2_trace_pgr ORDER BY secteur_id, path_seq" - - - -echo " fait" -echo "" - -echo " pousse vers serveur" -echo "" - -rsync -av -z data/phase_5_trace_secteurs.geojson data/phase_5_trace_troncons.geojson data/phase_2_trace_pgr.gml breizhpovh2:/data/www/vhosts/ar-redadeg_openstreetmap_bzh/htdocs/scripts/data/ - -echo "" -echo " fait" -echo "" - - -echo "" -echo "" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " F I N" -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo "" diff --git a/scripts/traitements_phase_5_recalage.fmw b/scripts/traitements_phase_5_recalage.fmw deleted file mode 100644 index a0745ac..0000000 --- a/scripts/traitements_phase_5_recalage.fmw +++ /dev/null @@ -1,2644 +0,0 @@ -#! -#! redadeg" -# --DestDataset_POSTGIS "breizhpolenovoredadeg" -# --DestDataset_GEOJSON "/Volumes/ker/mael/projets/osm_bzh/github/ar_redadeg/scripts/data/phase_5_pk_hors_tolerance.geojson" -# -#! ATTR_TYPE_ENCODING="SDF" -#! BEGIN_PYTHON="" -#! BEGIN_TCL="" -#! CATEGORY="" -#! DESCRIPTION="" -#! DESTINATION="NONE" -#! DESTINATION_ROUTING_FILE="" -#! DOC_EXTENTS="6908.07 930.072" -#! DOC_TOP_LEFT="220.001 -1680.58" -#! END_PYTHON="" -#! END_TCL="" -#! EXPLICIT_BOOKMARK_ORDER="false" -#! FME_BUILD_NUM="18592" -#! FME_DOCUMENT_GUID="34c754da-3be6-490a-b3fb-d6541e367588" -#! FME_DOCUMENT_PRIORGUID="bb0be305-87fd-43e2-a7ca-72e8e55f5134,2c924a01-976e-496e-bb94-db4c1cfdfc11" -#! FME_GEOMETRY_HANDLING="Enhanced" -#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" -#! FME_REPROJECTION_ENGINE="FME" -#! FME_SERVER_SERVICES="" -#! FME_STROKE_MAX_DEVIATION="0" -#! HISTORY="" -#! IGNORE_READER_FAILURE="No" -#! LAST_SAVE_BUILD="FME(R) 2018.1.2.1 (20190319 - Build 18592 - macosx)" -#! LAST_SAVE_DATE="2020-03-02T23:21:28" -#! LOG_FILE="" -#! LOG_MAX_RECORDED_FEATURES="200" -#! MARKDOWN_DESCRIPTION="" -#! MARKDOWN_USAGE="" -#! MAX_LOG_FEATURES="200" -#! MULTI_WRITER_DATASET_ORDER="BY_ID" -#! PASSWORD="" -#! PYTHON_COMPATIBILITY="27" -#! REDIRECT_TERMINATORS="NONE" -#! SHOW_ANNOTATIONS="true" -#! SHOW_INFO_NODES="true" -#! SOURCE="NONE" -#! SOURCE_ROUTING_FILE="" -#! TERMINATE_REJECTED="YES" -#! TITLE="" -#! USAGE="" -#! USE_MARKDOWN="" -#! VIEW_POSITION="189.002 -99.001" -#! WARN_INVALID_XFORM_PARAM="Yes" -#! WORKSPACE_VERSION="1" -#! ZOOM_SCALE="100" -#! > -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! -#! - -FME_PYTHON_VERSION 27 -GUI IGNORE SourceDataset_POSTGIS_1,POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1,POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1,POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1,POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1,POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1,POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1,POSTGIS_IN_SEARCH_METHOD_POSTGIS_1,POSTGIS_IN_ADVANCED_POSTGIS_1,POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1,POSTGIS_IN_BEGIN_SQL_POSTGIS_1,POSTGIS_IN_END_SQL_POSTGIS_1,POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1,DestDataset_POSTGIS_2,POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2,POSTGIS_OUT_ADVANCED_POSTGIS_2,POSTGIS_OUT_BULK_COPY_POSTGIS_2,POSTGIS_OUT_START_TRANSACTION_POSTGIS_2,POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2,POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2,POSTGIS_OUT_BEGIN_SQL_POSTGIS_2,POSTGIS_OUT_END_SQL_POSTGIS_2,DestDataset_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1,GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1,GEOJSON_OUT_WRITE_BOM_GEOJSON_1,GEOJSON_OUT_STRICT_SPEC_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1,GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1,GEOJSON_OUT_INDENT_SIZE_GEOJSON_1,GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1,GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1,GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1,GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1,GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 -DEFAULT_MACRO SourceDataset_POSTGIS breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO DestDataset_POSTGIS breizhpolenovoredadeg -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS FMT:POSTGIS%FAMILY:PostgreSQL Connection: -DEFAULT_MACRO DestDataset_GEOJSON $(FME_MF_DIR)data/phase_5_pk_hors_tolerance.geojson -GUI FILENAME DestDataset_GEOJSON GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -INCLUDE [ if {{$(SourceDataset_POSTGIS)} == {}} { puts_real {Parameter 'SourceDataset_POSTGIS' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_POSTGIS)} == {}} { puts_real {Parameter 'DestDataset_POSTGIS' must be given a value.}; exit 1; }; ] -INCLUDE [ if {{$(DestDataset_GEOJSON)} == {}} { puts_real {Parameter 'DestDataset_GEOJSON' must be given a value.}; exit 1; }; ] -#! START_HEADER -#! START_WB_HEADER -READER_TYPE MULTI_READER -MULTI_READER_TYPE{0} POSTGIS -MULTI_READER_KEYWORD{0} POSTGIS_1 -MULTI_READER_GEN_DIRECTIVES{0} USE_SEARCH_ENVELOPE,NO,BEGIN_SQL,,END_SQL,,_MERGE_SCHEMAS,YES,SEARCH_ENVELOPE_MINY,0,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,SEARCH_ENVELOPE_MINX,0,READ_TIME_WITH_TIMEZONE,Yes,DISABLE_COLLECTION_SPLITTING,yes,EXPOSE_ATTRS_GROUP,,POSTGIS_EXPOSE_FORMAT_ATTRS,,SCHEMAS_FOR_TABLE_LISTING,public,USE_TRUE_POSTGIS_TYPES,yes,ADVANCED,,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,SEARCH_ENVELOPE_MAXY,0,NAMED_CONNECTION,breizhpolenovoatredadeg,TABLELIST,public.phase_2_trace_pgrpublic.phase_5_pk_umap,FEATURES_PER_FETCH,10000,WHERE_CLAUSE,,SEARCH_ENVELOPE_MAXX,0,CLIP_TO_ENVELOPE,NO,SEARCH_METHOD,MBR_OVERLAPS -WRITER_TYPE MULTI_WRITER -MULTI_WRITER_DATASET_ORDER BY_ID -MULTI_WRITER_FIRST_WRITER_ID 0 -MULTI_WRITER_TYPE{0} POSTGIS -MULTI_WRITER_KEYWORD{0} POSTGIS_2 -MULTI_WRITER_TYPE{1} GEOJSON -MULTI_WRITER_KEYWORD{1} GEOJSON_1 -#! END_WB_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_1" -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -# The dataset this mapping file was generated from was: -#! END_SOURCE_HEADER -#! START_WB_HEADER -DEFAULT_MACRO SourceDataset -INCLUDE [ if {{$(SourceDataset)} != ""} { \ - puts {DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset)} \ - } ] -#! END_WB_HEADER -#! START_SOURCE_HEADER POSTGIS POSTGIS_1 -DEFAULT_MACRO SourceDataset_POSTGIS_1 $(SourceDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED SourceDataset_POSTGIS_1 FMT:POSTGIS Connection: -DEFAULT_MACRO POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1 Yes -POSTGIS_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(POSTGIS_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1 Yes -POSTGIS_1_READ_TIME_WITH_TIMEZONE "$(POSTGIS_IN_READ_TIME_WITH_TIMEZONE_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1 yes -POSTGIS_1_DISABLE_COLLECTION_SPLITTING "$(POSTGIS_IN_DISABLE_COLLECTION_SPLITTING_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1 yes -POSTGIS_1_USE_TRUE_POSTGIS_TYPES "$(POSTGIS_IN_USE_TRUE_POSTGIS_TYPES_POSTGIS_1)" -DEFAULT_MACRO POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_CONNECTION_GROUP_POSTGIS_1 POSTGIS_IN_NAMED_CONNECTION%POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Database Connection -DEFAULT_MACRO POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_FME_GROUP_NAMED1_POSTGIS_1 POSTGIS_IN_TABLELIST%POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 Constraints -DEFAULT_MACRO POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 -POSTGIS_1_WHERE_CLAUSE "$(POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_WHERE_CLAUSE_POSTGIS_1 MODE,WHERE;FORMAT,POSTGIS WHERE Clause: -DEFAULT_MACRO POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1 -POSTGIS_1_EXPOSE_ATTRS_GROUP "$(POSTGIS_IN_EXPOSE_ATTRS_GROUP_POSTGIS_1)" -# Include this file in source setting section to add native search envelope processing -# Zero as a default means we don't do any search -- this makes workbench happier -DEFAULT_MACRO POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_USE_SEARCH_ENVELOPE "$(POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1)" -GUI ACTIVEDISCLOSUREGROUP POSTGIS_IN_USE_SEARCH_ENVELOPE_POSTGIS_1 POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1%POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1%POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_POSTGIS_1%POSTGIS_IN_SEARCH_METHOD_FILTER%POSTGIS_IN_SEARCH_ORDER%POSTGIS_IN_SEARCH_FEATURE%POSTGIS_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINX_POSTGIS_1 Minimum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MINY_POSTGIS_1 Minimum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXX_POSTGIS_1 Maximum X: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 ,0 -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 0 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1)" -GUI OPTIONAL FLOAT POSTGIS_IN_SEARCH_ENVELOPE_MAXY_POSTGIS_1 Maximum Y: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 , -DEFAULT_MACRO POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 -POSTGIS_1_SEARCH_ENVELOPE "$(POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1)" -GUI OPTIONAL COORDSYS POSTGIS_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_POSTGIS_1 Search Envelope Coordinate System: -# =========================================================================== -GUI LOOKUP POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 ,NO -DEFAULT_MACRO POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 NO -POSTGIS_1_CLIP_TO_ENVELOPE "$(POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1)" -GUI OPTIONAL CHECKBOX POSTGIS_IN_CLIP_TO_ENVELOPE_POSTGIS_1 YES%NO Clip to Search Envelope -DEFAULT_MACRO POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBR_OVERLAPS -POSTGIS_1_SEARCH_METHOD "$(POSTGIS_IN_SEARCH_METHOD_POSTGIS_1)" -GUI LOOKUP_CHOICE POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 MBROverlaps,MBR_OVERLAPS%Contains,CONTAINS%Disjoint,DISJOINT%Equals,EQUALS%Intersects,INTERSECTS%Overlaps,OVERLAPS%Touches,TOUCHES%Within,WITHIN Search Method: -GUI LOOKUP POSTGIS_IN_SEARCH_METHOD_POSTGIS_1 ,MBR_OVERLAPS -DEFAULT_MACRO POSTGIS_IN_ADVANCED_POSTGIS_1 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_IN_ADVANCED_POSTGIS_1 POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1%POSTGIS_IN_BEGIN_SQL_POSTGIS_1%POSTGIS_IN_END_SQL_POSTGIS_1 Advanced -DEFAULT_MACRO POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 10000 -POSTGIS_1_FEATURES_PER_FETCH "$(POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1)" -GUI FLOAT POSTGIS_IN_FEATURES_PER_FETCH_POSTGIS_1 Number Of Records To Fetch At A Time -DEFAULT_MACRO POSTGIS_IN_BEGIN_SQL_POSTGIS_1 -POSTGIS_1_BEGIN_SQL "$(POSTGIS_IN_BEGIN_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_BEGIN_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Read -DEFAULT_MACRO POSTGIS_IN_END_SQL_POSTGIS_1 -POSTGIS_1_END_SQL "$(POSTGIS_IN_END_SQL_POSTGIS_1)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_IN_END_SQL_POSTGIS_1 MODE,SQL;FORMAT,POSTGIS SQL To Run After Read -# ============================================================================ -DEFAULT_MACRO POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1 DEFLINE_ATTRS -POSTGIS_1_ATTRIBUTE_READING "$(POSTGIS_IN_ATTRIBUTE_READING_POSTGIS_1)" -# ============================================================================ -POSTGIS_1_GENERATE_FME_BUILD_NUM 18592 -DEFAULT_MACRO POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 public -GUI OPTIONAL TEXT POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1 Schemas for Table Listing: -POSTGIS_1_SCHEMAS_FOR_TABLE_LISTING $(POSTGIS_IN_SCHEMAS_FOR_TABLE_LISTING_POSTGIS_1) -POSTGIS_1_DATASET "$(SourceDataset_POSTGIS_1)" -#! END_SOURCE_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "POSTGIS_2" -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER POSTGIS POSTGIS_2 -DEFAULT_MACRO DestDataset_POSTGIS_2 $(DestDataset_POSTGIS) -GUI NAMED_DB_CONNECTION_ENCODED DestDataset_POSTGIS_2 FMT:POSTGIS Connection: -POSTGIS_2_PLUGIN_MAX_CHANNELS 1 -DEFAULT_MACRO POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2 Yes -POSTGIS_2_STRICT_TEMPORAL_TYPE_HANDLING "$(POSTGIS_OUT_STRICT_TEMPORAL_TYPE_HANDLING_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_FME_CONNECTION_GROUP_POSTGIS_2 POSTGIS_OUT_NAMED_CONNECTION Database Connection -# ============================================================================ -# Write geometry (planar) or geography (geodetic) column -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2 geometry -POSTGIS_2_SPATIAL_COLUMN_TYPE "$(POSTGIS_OUT_SPATIAL_COLUMN_TYPE_POSTGIS_2)" -# ============================================================================ -# Default spatial column name -DEFAULT_MACRO POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2 the_geom -POSTGIS_2_SPATIAL_COLUMN_NAME "$(POSTGIS_OUT_SPATIAL_COLUMN_NAME_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2 yes -POSTGIS_2_GENERIC_GEOMETRY "$(POSTGIS_OUT_GENERIC_GEOMETRY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2 FEATURE_TYPE -POSTGIS_2_COORDINATE_SYSTEM_GRANULARITY "$(POSTGIS_OUT_COORDINATE_SYSTEM_GRANULARITY_POSTGIS_2)" -DEFAULT_MACRO POSTGIS_OUT_ADVANCED_POSTGIS_2 -GUI OPTIONAL DISCLOSUREGROUP POSTGIS_OUT_ADVANCED_POSTGIS_2 POSTGIS_OUT_BULK_COPY_POSTGIS_2%POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2%POSTGIS_OUT_START_TRANSACTION_POSTGIS_2%POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2%POSTGIS_OUT_BEGIN_SQL_POSTGIS_2%POSTGIS_OUT_END_SQL_POSTGIS_2 Advanced -DEFAULT_MACRO POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES -POSTGIS_2_BULK_COPY "$(POSTGIS_OUT_BULK_COPY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_BULK_COPY_POSTGIS_2 YES%NO Bulk Insert -DEFAULT_MACRO POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 0 -POSTGIS_2_START_TRANSACTION "$(POSTGIS_OUT_START_TRANSACTION_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_START_TRANSACTION_POSTGIS_2 Starting Feature: -DEFAULT_MACRO POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 1000 -POSTGIS_2_TRANSACTION_INTERVAL "$(POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2)" -GUI TEXT POSTGIS_OUT_TRANSACTION_INTERVAL_POSTGIS_2 Features Per Transaction -DEFAULT_MACRO POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 NO -POSTGIS_2_INSERT_TEXT_GEOMETRY "$(POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2)" -GUI CHOICE POSTGIS_OUT_INSERT_TEXT_GEOMETRY_POSTGIS_2 YES%NO Insert WKT -DEFAULT_MACRO POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 -POSTGIS_2_BEGIN_SQL "$(POSTGIS_OUT_BEGIN_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_BEGIN_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run Before Write -DEFAULT_MACRO POSTGIS_OUT_END_SQL_POSTGIS_2 -POSTGIS_2_END_SQL "$(POSTGIS_OUT_END_SQL_POSTGIS_2)" -GUI OPTIONAL TEXT_EDIT_SQL_CFG POSTGIS_OUT_END_SQL_POSTGIS_2 MODE,SQL;FORMAT,POSTGIS SQL To Run After Write -# ============================================================================ -POSTGIS_2_GENERATE_FME_BUILD_NUM 18592 -POSTGIS_2_DATASET "$(DestDataset_POSTGIS_2)" -#! END_DEST_HEADER -#! START_WB_HEADER -MACRO WB_KEYWORD "GEOJSON_1" -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_1 -#! END_DEST_HEADER -#! START_WB_HEADER -DEFAULT_MACRO DestDataset -INCLUDE [ if {"$(DestDataset)" != ""} { \ - puts {DEFAULT_MACRO DestDataset_GEOJSON_1 $(DestDataset)} \ - } ] -#! END_WB_HEADER -#! START_DEST_HEADER GEOJSON GEOJSON_1 -DEFAULT_MACRO DestDataset_GEOJSON_1 $(DestDataset_GEOJSON) -GUI FILENAME DestDataset_GEOJSON_1 GeoJSON_Files(*.json)|*.json|All_Files|* Destination GeoJSON File: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED1_GEOJSON_1 GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1%GEOJSON_OUT_WRITE_BOM_GEOJSON_1%GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Writer Parameters -DEFAULT_MACRO GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1 UTF-8 -GEOJSON_1_WRITER_CHARSET "$(GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITER_CHARSET_GEOJSON_1 UTF-8,UTF-8%UTF-16,UTF-16%UTF-16BE,UTF-16BE%UTF-16LE,UTF-16LE%UTF-32,UTF-32%UTF-32BE,UTF-32BE%UTF-32LE,UTF-32LE Output Character Set: -DEFAULT_MACRO GEOJSON_OUT_WRITE_BOM_GEOJSON_1 No -GEOJSON_1_WRITE_BOM "$(GEOJSON_OUT_WRITE_BOM_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WRITE_BOM_GEOJSON_1 Yes,Yes%No,No Byte Order Marker: -DEFAULT_MACRO GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Yes -GEOJSON_1_STRICT_SPEC "$(GEOJSON_OUT_STRICT_SPEC_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_STRICT_SPEC_GEOJSON_1 Yes,Yes%No,No Fully Conform to the GeoJSON Grammar: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED2_GEOJSON_1 GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1%GEOJSON_OUT_INDENT_SIZE_GEOJSON_1%GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 Formatting Parameters -DEFAULT_MACRO GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1 YES -GEOJSON_1_PRETTY_PRINT "$(GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1)" -GUI ACTIVECHOICE_LOOKUP GEOJSON_OUT_PRETTY_PRINT_GEOJSON_1 PrettyPrint,YES%Linear,NO,GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 Formatting Type: -DEFAULT_MACRO GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 0 -GEOJSON_1_INDENT_SIZE "$(GEOJSON_OUT_INDENT_SIZE_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_INDENT_SIZE_GEOJSON_1 Tabs,0%1space,1%2spaces,2%3spaces,3%4spaces,4%5spaces,5%6spaces,6%7spaces,7%8spaces,8 Indent Size: -DEFAULT_MACRO GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 10 -GEOJSON_1_MAX_COORDINATE_PRECISION "$(GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1)" -GUI RANGE_SLIDER GEOJSON_OUT_MAX_COORDINATE_PRECISION_GEOJSON_1 1%15%0%ON Coordinate Precision (Maximum Number of Fractional Digits): -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED3_GEOJSON_1 GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1%GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Geometry -DEFAULT_MACRO GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1 Yes -GEOJSON_1_COUNTER_CLOCKWISE_AREAS "$(GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_COUNTER_CLOCKWISE_AREAS_GEOJSON_1 Yes,Yes%No,No Convert Areas to Counterclockwise: -DEFAULT_MACRO GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Yes -GEOJSON_1_WGS84_REPROJECTION "$(GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1)" -GUI LOOKUP_CHOICE GEOJSON_OUT_WGS84_REPROJECTION_GEOJSON_1 Yes,Yes%No,No Reproject to WGS84: -DEFAULT_MACRO GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1 -GUI OPTIONAL DISCLOSUREGROUP GEOJSON_OUT_FME_GROUP_NAMED4_GEOJSON_1 GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 JSONP -DEFAULT_MACRO GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 -GEOJSON_1_JSONP_FUNC_NAME "$(GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1)" -GUI OPTIONAL TEXT GEOJSON_OUT_JSONP_FUNC_NAME_GEOJSON_1 JSONP Function Name: -# ============================================================================ -# Opt in for destination dataset type vs format type validation -DEFAULT_MACRO GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_1 Yes -GEOJSON_1_DESTINATION_DATASETTYPE_VALIDATION "$(GEOJSON_OUT_DESTINATION_DATASETTYPE_VALIDATION_GEOJSON_1)" -# ============================================================================ -GEOJSON_1_GENERATE_FME_BUILD_NUM 18592 -GEOJSON_1_DATASET "$(DestDataset_GEOJSON_1)" -#! END_DEST_HEADER -#! START_WB_HEADER -#! END_WB_HEADER -#! END_HEADER - -LOG_FILENAME "$(FME_MF_DIR)traitements_phase_5_recalage.log" -LOG_APPEND NO -LOG_FILTER_MASK -1 -LOG_MAX_FEATURES 200 -LOG_MAX_RECORDED_FEATURES 200 -FME_REPROJECTION_ENGINE FME -FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto -FME_GEOMETRY_HANDLING Enhanced -FME_STROKE_MAX_DEVIATION 0 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_1 POSTGIS_1 -DEFAULT_MACRO DATASET_KEYWORD_POSTGIS_2 POSTGIS_2 -DEFAULT_MACRO DATASET_KEYWORD_GEOJSON_1 GEOJSON_1 -# ------------------------------------------------------------------------- - -POSTGIS_1_READER_META_ATTRIBUTES fme_feature_type - -# ------------------------------------------------------------------------- - -POSTGIS_1_COORDINATE_SYSTEM EPSG:2154 -POSTGIS_2_COORDINATE_SYSTEM EPSG:2154 -GEOJSON_1_COORDINATE_SYSTEM EPSG:4326 -MULTI_READER_CONTINUE_ON_READER_FAILURE No - -# ------------------------------------------------------------------------- - -MACRO WORKSPACE_NAME traitements_phase_5_recalage -MACRO FME_VIEWER_APP fmedatainspector -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS MULTI_READER_KEYWORD $(DATASET_KEYWORD_POSTGIS_1) INPUT FEATURE_TYPE * ROUTE POSTGIS POSTGIS_1::public.phase_5_pk_umap multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.phase_5_pk_umap ALIAS_GEOMETRY ROUTE POSTGIS POSTGIS_1::public.osm_municipalities multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.osm_municipalities ALIAS_GEOMETRY ROUTE POSTGIS POSTGIS_1::public.phase_2_trace_pgr multi_reader_keyword,$(DATASET_KEYWORD_POSTGIS_1) TO FME_GENERIC ::public.phase_2_trace_pgr ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_5_pk EXACT public.phase_5_pk -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_5_pk_umap EXACT public.phase_5_pk_umap DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,pk_id,int4PrimaryKey,secteur_id,int4 -POSTGIS_1_MERGE_DEF POSTGIS_1::public.osm_municipalities EXACT public.osm_municipalities DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,id,serialPrimaryKey,osm_id,int8,type,text,admin_level,text,name,text,name_fr,text,name_br,text,source_name_br,text,admincode,textBTree,postcode,text,wikidata,text,surf_ha,numeric1000500,x,numeric1000500,y,numeric1000500 -POSTGIS_1_MERGE_DEF POSTGIS_1::public.phase_2_trace_pgr EXACT public.phase_2_trace_pgr DEFLINE postgis_sql_where_clause,,postgis_sql_statement,,secteur_id,int4,path_seq,int8,node,int8,cost,float8,agg_cost,float8,osm_id,int8,highway,text,type,text,oneway,text,ref,text,name_fr,text,name_br,text -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_2_trace_pgr (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.phase_2_trace_pgr OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_0_lZ0XqLzCYmQ= OUTPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_1_dRsdNGVAD0c= -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_5_pk_umap (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.phase_5_pk_umap OUTPUT FEATURE_TYPE public.phase_5_pk_umap_POSTGIS_1 -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_5_pk (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.phase_5_pk -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "public.osm_municipalities (POSTGIS_1) Splitter" INPUT FEATURE_TYPE public.osm_municipalities OUTPUT FEATURE_TYPE public.osm_municipalities_POSTGIS_1 -DEFAULT_MACRO WB_CURRENT_CONTEXT -# ------------------------------------------------------------------------- -FACTORY_DEF {*} TeeFactory FACTORY_NAME BulkAttributeRenamer INPUT FEATURE_TYPE public.osm_municipalities_POSTGIS_1 OUTPUT { FEATURE_TYPE BulkAttributeRenamer_OUTPUT @RenameAttributes(PATTERN_REPLACE, ADDPREFIX, , "", "municipality_", "", "", "-_", "RENAME", "NONFME") } -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "public.phase_2_trace_pgr (Disabled) Nuker" INPUT FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_1_dRsdNGVAD0c= -# ------------------------------------------------------------------------- -DEFAULT_MACRO INPUT_BASE_LINES -FACTORY_DEF {*} ProximityFactory FACTORY_NAME NeighborFinder INPUT BASE FEATURE_TYPE public.phase_5_pk_umap_POSTGIS_1 INPUT CANDIDATE FEATURE_TYPE public.phase_2_trace_pgr_POSTGIS_1_0_lZ0XqLzCYmQ= REQUIRE_BASE YES K_NEAREST "1" "25" INSERT_VERTEX_ON_BASE No TAKE_MEASURES_FROM_CANDIDATE Yes COMPUTE_MEASURES_MODE CONTINUOUS REJECT_NULL Yes CANDIDATE_FEATURES_FIRST No LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE DISTANCE_ATTR _distance TREAT_POLYGON_AS LINE NEVER_OVERWRITE_MERGED_ATTRS Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" REJECT_INVALID_GEOM YES OUTPUT MATCHED FEATURE_TYPE NeighborFinder_MATCHED @RenameAttributes(_angle,angle,_candidate_angle,candidate_angle,_candidate_label_angle,candidate_label_angle,_closest_candidate_x,closest_candidate_x,_closest_candidate_y,closest_candidate_y,_closest_base_x,closest_base_x,_closest_base_y,closest_base_y) OUTPUT UNMATCHED_BASE FEATURE_TYPE NeighborFinder_UNMATCHED_BASE OUTPUT REJECTED FEATURE_TYPE NeighborFinder_ -FACTORY_DEF * TeeFactory FACTORY_NAME "NeighborFinder UNMATCHED_BASE Splitter" INPUT FEATURE_TYPE NeighborFinder_UNMATCHED_BASE OUTPUT FEATURE_TYPE NeighborFinder_UNMATCHED_BASE_0_lu6YO1/sU0g= OUTPUT FEATURE_TYPE NeighborFinder_UNMATCHED_BASE_1_GVG+zhhseb0= OUTPUT FEATURE_TYPE NeighborFinder_UNMATCHED_BASE_2_A52xLGCshsc= -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME NeighborFinder_ INPUT FEATURE_TYPE NeighborFinder_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, NeighborFinderoutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "pk_hors_tolerance (Disabled) Nuker" INPUT FEATURE_TYPE NeighborFinder_UNMATCHED_BASE_1_GVG+zhhseb0= -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME GeometryRemover INPUT FEATURE_TYPE NeighborFinder_MATCHED OUTPUT FEATURE_TYPE GeometryRemover_OUTPUT @RemoveGeometry() -# ------------------------------------------------------------------------- -FACTORY_DEF * VertexCreatorFactory FACTORY_NAME VertexCreator INPUT FEATURE_TYPE GeometryRemover_OUTPUT MODE ADD INDEX "" CONTINUE_ON_ERROR YES XVAL "@EvaluateExpression(FDIV,FLOAT,Value_closest_candidate_x,VertexCreator)" YVAL "@EvaluateExpression(FDIV,FLOAT,Value_closest_candidate_y,VertexCreator)" OUTPUT OUTPUT FEATURE_TYPE VertexCreator_OUTPUT OUTPUT REJECTED FEATURE_TYPE VertexCreator_ -FACTORY_DEF * TeeFactory FACTORY_NAME "VertexCreator OUTPUT Splitter" INPUT FEATURE_TYPE VertexCreator_OUTPUT OUTPUT FEATURE_TYPE VertexCreator_OUTPUT_0_VZl5RCcnBag= OUTPUT FEATURE_TYPE VertexCreator_OUTPUT_1_R3TkNMG3XYI= -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME VertexCreator_ INPUT FEATURE_TYPE VertexCreator_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, VertexCreatoroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} OverlayFactory FACTORY_NAME PointOnAreaOverlayer INPUT POINT FEATURE_TYPE VertexCreator_OUTPUT_1_R3TkNMG3XYI= INPUT POINT FEATURE_TYPE NeighborFinder_UNMATCHED_BASE_2_A52xLGCshsc= INPUT POLYGON FEATURE_TYPE BulkAttributeRenamer_OUTPUT OVERLAP_COUNT_ATTRIBUTE "_overlaps" DEAGGREGATE_INPUT Yes MERGE_ATTRS "YES" ATTR_ACCUM_MODE "HANDLE_CONFLICT" ATTR_CONFLICT_RES "ORIGINAL_IF_CONFLICT" INCOMING_PREFIX "" LIST_NAME "" LIST_ATTRS_TO_INCLUDE { } LIST_ATTRS_TO_INCLUDE_MODE CANDIDATE_LIST_NAME "" CANDIDATE_LIST_ATTRS_TO_INCLUDE { } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE MODE COMPLETE OVERLAY_TYPE POINT_ON_AREA POLYS_FIRST "NO" REJECT_INVALID_GEOM YES OUTPUT POINT FEATURE_TYPE PointOnAreaOverlayer_POINT OUTPUT ILLEGAL_GEOM FEATURE_TYPE PointOnAreaOverlayer_ -DEFAULT_MACRO _WB_BYPASS_TERMINATION No -FACTORY_DEF * TeeFactory FACTORY_NAME PointOnAreaOverlayer_ INPUT FEATURE_TYPE PointOnAreaOverlayer_ OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, PointOnAreaOverlayeroutputaRejectedfeature.TocontinuetranslationwhenfeaturesarerejectedchangeWorkspaceParametersTranslationRejectedFeatureHandlingtoContinueTranslation) -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeRenamer INPUT FEATURE_TYPE PointOnAreaOverlayer_POINT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "osm_id" "way_osm_id" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "highway" "way_highway" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "type" "way_type" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "oneway" "way_oneway" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "ref" "way_ref" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "name_fr" "way_name_fr" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "name_br" "way_name_br" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "_closest_candidate_x" "pk_x" "RENAME_SET_DEFAULT" "" } ATTR_ACTION { "_closest_candidate_y" "pk_y" "RENAME_SET_DEFAULT" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeRenamer_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeCopier INPUT FEATURE_TYPE AttributeRenamer_OUTPUT ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "pk_x" "pk_long" "COPY" "" } ATTR_ACTION { "pk_y" "pk_lat" "COPY" "" } OUTPUT OUTPUT FEATURE_TYPE AttributeCopier_OUTPUT -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME AttributeReprojector INPUT FEATURE_TYPE AttributeCopier_OUTPUT OUTPUT FEATURE_TYPE AttributeReprojector_OUTPUT @Reproject("EPSG:2154","EPSG:4326","pk_long","pk_lat") -# ------------------------------------------------------------------------- -FACTORY_DEF * SortFactory FACTORY_NAME Sorter INPUT FEATURE_TYPE AttributeReprojector_OUTPUT SORT_BY pk_id NUMERIC ASCENDING OUTPUT SORTED FEATURE_TYPE Sorter_SORTED -# ------------------------------------------------------------------------- -FACTORY_DEF * TeeFactory FACTORY_NAME "pk_recale (Disabled) Nuker" INPUT FEATURE_TYPE VertexCreator_OUTPUT_0_VZl5RCcnBag= -# ------------------------------------------------------------------------- - -FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC Sorter_SORTED TO POSTGIS __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,SupplyAttributesENCODED__wb_out_feat_type__public.phase_5_pk COORDINATE_SYSTEM EPSG:2154 GEOMETRY ROUTE FME_GENERIC NeighborFinder_UNMATCHED_BASE_0_lu6YO1/sU0g= TO GEOJSON __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,1,SupplyAttributesENCODED__wb_out_feat_type__public.phase_5_pk_umap COORDINATE_SYSTEM EPSG:4326 GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") -# ------------------------------------------------------------------------- - -FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ - -# ------------------------------------------------------------------------- -POSTGIS_2_DEF public.phase_5_pk postgis_type postgis_geometry postgis_mode "" postgis_sql_key_columns "" postgis_drop_table "" postgis_truncate_table "" fme_feature_operation INSERT fme_table_handling TRUNCATE_EXISTING postgis_create_with_oids NO postgis_create_gist_index YES postgis_spatial_column_type geometry postgis_spatial_column the_geom postgis_srid "" postgis_vacuum_analyze NO postgis_allow_serial_writing NO pk_id int4,PrimaryKey pk_x numeric(8,1) pk_y numeric(8,1) pk_long numeric(10,8) pk_lat numeric(10,8) length_real numeric(6,2) length_theorical int4 secteur_id int4 municipality_admincode text municipality_postcode text municipality_name_fr text municipality_name_br text way_osm_id int8 way_highway text way_type text way_oneway text way_ref text way_name_fr text way_name_br text -# ------------------------------------------------------------------------- -GEOJSON_1_DEF public.phase_5_pk_umap pk_id int secteur_id int diff --git a/scripts/update_all.sh b/scripts/update_all.sh deleted file mode 100755 index 1aa32d3..0000000 --- a/scripts/update_all.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - - -set -e -set -u - - - -./traitements_phase_1.sh - - -./create_osm_roads.sh -# import du tracé phase 1 dans la base OSM -# extraction du réseau de voies à proximité -# chargement de la couche osm_roads dans la base redadeg - - -./create_osm_roads_pgr.sh -# à utiliser si on veut complètement recréer un graphe routier à neuf - - -./update_osm_roads_pgr.sh -# maj des couches de routage - - -psql -h localhost -U redadeg -d redadeg < patch_osm_roads_pgr.sql ; -# patch du filaire de voies - - -./traitements_phase_2.sh - - diff --git a/scripts/update_osm_roads_pgr.sh b/scripts/update_osm_roads_pgr.sh deleted file mode 100755 index a2a331d..0000000 --- a/scripts/update_osm_roads_pgr.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -set -e -set -u - -# argument 1 = millesime redadeg -millesime=$1 - -PSQL=/usr/bin/psql -DB_HOST=localhost -DB_NAME=redadeg_$millesime -DB_USER=redadeg -DB_PASSWD=redadeg - - -echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" -echo " Mise à jour des couches de routage" -echo "" -echo " prend 15-20 min" -echo "" - -# la couche osm_roads vient d'être mise à jour ou recrée - -# on efface la topologie existante -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT DropTopology('osm_roads_topo') ;" - -# création d'un schéma qui va accueillir le réseau topologique de la couche osm_roads -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT topology.CreateTopology('osm_roads_topo', 2154);" - -# ajout d'un nouvel attribut sur la table osm_roads -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT topology.AddTopoGeometryColumn('osm_roads_topo', 'public', 'osm_roads', 'topo_geom', 'LINESTRING');" - - -# on a besoin du layer_id -# au cas où ça change : on le récupère par requête -PGPASSWORD=$DB_PASSWD $PSQL -X -h $DB_HOST -U $DB_USER -d $DB_NAME \ - -c "SELECT layer_id FROM topology.layer WHERE table_name = 'osm_roads' ;" \ - --single-transaction \ - --set AUTOCOMMIT=off \ - --set ON_ERROR_STOP=on \ - --no-align \ - -t \ - --field-separator ' ' \ - --quiet | while read -a Record ; do - - layer_id=${Record[0]} - - echo "" - echo "layer_id de osm_roads = $layer_id" - echo "" - -done - -# sauf que je n'arrive pas à sortir cette valeur du subshell créé par la boucle do /!\ -# donc je remet ici à la main. A corriger… TODO -layer_id=1 - - -# on calcule le graphe topologique en remplissant le nouvel attribut géométrique -# le 1er chiffre est l'identifiant du layer dans la table topology.layer -# le 2e chiffre est la tolérance en mètres -echo ">> calcul du graphe topologique" -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME -c "UPDATE osm_roads SET topo_geom = topology.toTopoGeom(the_geom, 'osm_roads_topo', $layer_id, 0.00001);" -echo "" -echo "fait" -echo "" - -echo ">> maj de la couche osm_roads_pgr qui sert au routage depuis la topologie" -PGPASSWORD=$DB_PASSWD $PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME < update_osm_roads_pgr.sql - -#echo ">> patch de la couche osm_roads_pgr pour les cas particuliers" -#$PSQL -h $DB_HOST -U $DB_USER -d $DB_NAME < patch_osm_roads_pgr.sql - -echo "/!\ patcher le filaire de voie si nécessaire" - -echo "" -echo "fini" -echo "" - - diff --git a/scripts/update_osm_roads_pgr.sql b/scripts/update_osm_roads_pgr.sql deleted file mode 100755 index 800213b..0000000 --- a/scripts/update_osm_roads_pgr.sql +++ /dev/null @@ -1,62 +0,0 @@ -/* -========================================================================== - - phase 2 : Mise à jour des couches de routage - -========================================================================== -*/ - --- /!\ --- cela suppose que la couche osm_roads est à jour !! --- or cette couche est calculée à partir d'une BD osm cf la documentation - - --- maj de la couche support des calculs d'itinéraire --- 30 s --- on commence par vider les couches existantes -TRUNCATE TABLE osm_roads_pgr ; -DROP TABLE IF EXISTS osm_roads_pgr_noded ; -DROP TABLE IF EXISTS osm_roads_pgr_vertices_pgr ; - - --- reset de la sequence -ALTER SEQUENCE public.osm_roads_pgr_noded_id_seq RESTART WITH 1 ; - --- on remplit la couche de lignes -INSERT INTO osm_roads_pgr -( SELECT - row_number() over() as id, - o.osm_id, - o.highway, - o.type, - o.oneway, - o.ref, - o.name_fr, - o.name_br, - NULL as source, - NULL as target, - NULL as cost, - NULL as reverse_cost, - e.geom as the_geom -FROM osm_roads_topo.edge e, - osm_roads_topo.relation rel, - osm_roads o -WHERE e.edge_id = rel.element_id - AND rel.topogeo_id = (o.topo_geom).id -); - --- calcul des 2 attributs de coût (= longueur) -UPDATE osm_roads_pgr SET cost = st_length(the_geom), reverse_cost = st_length(the_geom); - - --- calcul du graphe routier par pgRouting --- cela va remplir les tables osm_roads_pgr_noded et osm_roads_pgr_vertices_pgr --- 30 s -SELECT pgr_createTopology('osm_roads_pgr', 0.001); - --- vérification -SELECT pgr_analyzegraph('osm_roads_pgr', 0.001); -SELECT pgr_nodeNetwork('osm_roads_pgr', 0.001); - - -