Skip to main content
Question

gentrans error with generated command line


I am trying to transform a the KML within a KMZ file to MapInfo format using gentrans. The following works in the CMD:

"C:\\Program Files\\MapInfo\\Professional\\UT\\fme.exe" GENTRANS OGCKML "D:\\Workplace\\Projects\\Acciona\\MI_read_KMZ\\testing\\UT\\PARQUE1.kmz" MAPINFO "D:\\Workplace\\Projects\\Acciona\\MI_read_KMZ\\testing\\UT\\tab"

 

I have used FME GENTRANS GUI GENERATE_CMDLINE to generate a command line. If I run the result on the command line with: fme.exe gentrans <generated commandline> it fails.

The command line I use is the following:

"C:\\Program Files\\MapInfo\\Professional\\UT\\fme.exe" GENTRANS OGCKML "D:\\Workplace\\Projects\\Acciona\\MI_read_KMZ\\testing\\UT\\PARQUE1.kmz" "RUNTIME_MACROS,\\"KML21_LOG_VERBOSE,No,KML21_RASTER_READ_MODE,GroundOverlay,KML21_SCAN_SCHEMA,Yes,KML21_FAIL_ON_NETWORK_ERROR,No,KML21_DELETE_DOWNLOADED_FILES,Yes,KML21_TRAVERSE_NETWORKLINKS,All,KML21_MOVE_TO_KML_WORLD_COORDSYS,Yes,KML21_APPLY_MODEL_TRANSFORMS,No,KML21_MAX_NETWORKLINK_TRAVERSAL_DEPTH,5,KML21_DATASET_ENCODING,,EXPOSE_ATTRS_GROUP,FME_DISCLOSURE_OPEN,OGCKML_EXPOSE_FORMAT_ATTRS,\\""kml_id,kml_buffer kml_lookat_latitude,kml_real64 kml_lookat_longitude,kml_real64\\"",USE_SEARCH_ENVELOPE,NO,SEARCH_ENVELOPE_MINX,0,SEARCH_ENVELOPE_MINY,0,SEARCH_ENVELOPE_MAXX,0,SEARCH_ENVELOPE_MAXY,0,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,CLIP_TO_ENVELOPE,NO,NETWORK_AUTHENTICATION,,_MERGE_SCHEMAS,YES\\",META_MACROS,\\"SourceKML21_LOG_VERBOSE,No,SourceKML21_RASTER_READ_MODE,GroundOverlay,SourceKML21_SCAN_SCHEMA,Yes,SourceKML21_FAIL_ON_NETWORK_ERROR,No,SourceKML21_DELETE_DOWNLOADED_FILES,Yes,SourceKML21_TRAVERSE_NETWORKLINKS,All,SourceKML21_MOVE_TO_KML_WORLD_COORDSYS,Yes,SourceKML21_APPLY_MODEL_TRANSFORMS,No,SourceKML21_MAX_NETWORKLINK_TRAVERSAL_DEPTH,5,SourceKML21_DATASET_ENCODING,,SourceEXPOSE_ATTRS_GROUP,FME_DISCLOSURE_OPEN,SourceOGCKML_EXPOSE_FORMAT_ATTRS,\\""kml_id,kml_buffer kml_lookat_latitude,kml_real64 kml_lookat_longitude,kml_real64\\"",SourceUSE_SEARCH_ENVELOPE,NO,SourceSEARCH_ENVELOPE_MINX,0,SourceSEARCH_ENVELOPE_MINY,0,SourceSEARCH_ENVELOPE_MAXX,0,SourceSEARCH_ENVELOPE_MAXY,0,SourceSEARCH_ENVELOPE_COORDINATE_SYSTEM,,SourceCLIP_TO_ENVELOPE,NO,SourceNETWORK_AUTHENTICATION,\\",METAFILE,OGCKML,COORDSYS,,IDLIST," MAPINFO "D:\\Workplace\\Projects\\Acciona\\MI_read_KMZ\\testing\\UT\\tab" "RUNTIME_MACROS,\\"VERSION,900,WRITE_REGION_CENTROIDS,no,TWO_POINT_LINE_AS_POLYLINE,no,STROKE_ARCS,no,MAP_LARGEINT_TO_DECIMAL,yes,_USE_SOURCE_BOUNDING_BOX,no,PLUGIN_MAX_CHANNELS,100,COORDSYS_STATEMENT,,MIF_MINX,,MIF_MINY,,MIF_MAXX,,MIF_MAXY,,DESTINATION_DATASETTYPE_VALIDATION,Yes,COORDINATE_SYSTEM_GRANULARITY,FEATURE_TYPE\\",META_MACROS,\\"DestVERSION,900,DestWRITE_REGION_CENTROIDS,no,DestTWO_POINT_LINE_AS_POLYLINE,no,DestSTROKE_ARCS,no,DestMAP_LARGEINT_TO_DECIMAL,yes,Dest_USE_SOURCE_BOUNDING_BOX,no,DestPLUGIN_MAX_CHANNELS,100,DestCOORDSYS_STATEMENT,,DestMIF_MINX,,DestMIF_MINY,,DestMIF_MAXX,,DestMIF_MAXY,,DestDESTINATION_DATASETTYPE_VALIDATION,Yes,DestCOORDINATE_SYSTEM_GRANULARITY,FEATURE_TYPE\\",METAFILE,MAPINFO,COORDSYS,"

 

daveatsafe
Safer
Forum|alt.badge.img+19

Hi @michielz​,

Thank you for alerting us to this problem. I have escalated this issue to a Support Case, and will follow up through Support.


Very good, Support has answered and solved the error. The problem is that, using FME GENTRANS GUI GENERATE_CMDLINE and marking specific attributes from the KML file (OGCKML_EXPOSE_FORMAT_ATTRS), there is an error in generating the escape characters and the quotes. \\"" instead of \\"\\" in the list of attributes to get from the KML file. A simple replace of "" with "\\" in the generated command solves the problem.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings