diff --git a/scripts/create_tables.sql b/scripts/create_tables.sql index 9c001b2..f719b57 100644 --- a/scripts/create_tables.sql +++ b/scripts/create_tables.sql @@ -199,7 +199,7 @@ CREATE VIEW phase_2_pk_secteur_4326 AS ALTER TABLE phase_2_pk_secteur_4326 OWNER to redadeg; --- les polygones des communes +-- les polygones des communes source OSM France DROP TABLE IF EXISTS osm_communes CASCADE ; CREATE TABLE osm_communes ( @@ -217,18 +217,35 @@ CREATE INDEX osm_communes_geom_idx ON osm_communes USING gist(the_geom); ALTER TABLE osm_communes OWNER to redadeg; -/* -INSERT INTO osm_communes - SELECT - gid, - insee, - nom, - wikipedia, - surf_ha, - ST_Transform(ST_SetSRID(geom,4326),2154) AS the_geom - FROM osm_communes_4326 - ORDER BY insee ASC ; -*/ +-- 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 diff --git a/scripts/load_osm_municipalities.fmw b/scripts/load_osm_municipalities.fmw new file mode 100644 index 0000000..bf49774 --- /dev/null +++ b/scripts/load_osm_municipalities.fmw @@ -0,0 +1,2310 @@ +#! +#! 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)