Using transformers to modify data.
Recently active
I am trying to pass custom Python Interpreter and Python Home to a batch script. The batch script then triggers a FME workbench script. Here’s the commands I am using in the batch script: set NEW_TIME=%TIME: =0%set LOG_DATE=%DATE:~4,2%_%DATE:~7,2%_%DATE:~10,4%_%NEW_TIME:~0,2%_%NEW_TIME:~3,2%SET path=<path to log directory>SET filename=%path%batch_log%LOG_DATE%.txtecho ************* Started FME Update ********** > %filename%echo.>> %filename%echo.>> %filename%echo Time Stamp: %DATE% %TIME% >> %filename%:: activating clone python env which contains all the dependencies for the PythonCaller referenced in the Workbench scriptcall "C:\Program Files\ArcGIS\Pro\bin\Python\Scripts\activate.bat" arcgispro-py3-clone >> %filename%:: Use custom Python set to true"C:\Program Files\FME\fme.exe" APPLY_SETTINGS SYSTEM "Python/Use Custom Python" true >> %filename%:: Use custom Python Interpreter. Directory: "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro
Hi all, I have a layer with multiple polygons sharing a specific attribute (Area_ID), and they are spread with no geometry among them. Multipart polygons sharing same attribute value.Then, I would like to know the way to identify the area that could be filled considering the vertex points that can make up a border.Area between multipart polygons that need to be filled.Finally, the need is to merge all of the multipart polygons into one, without moving those multipart from the coordinates they are now, just filling the space between the polygons with the same attribute in common.Any thouhts? Thanks a lot!
I would like to create an Excel list from our GetCapabilities document, where all our wms services are listed.Some of our services are grouped together and I don't want to list these group layers, just the lowest level of layers.The list should include name, title, abstract and metadata link (xlink:href).I have searched the community for examples, and although there are many questions about XML, I have not been able to apply these solutions to my problem and thus create a list.I probably have to use the XQueryExtractor to find the desired layer elements, but I am not able to insert the XQuery expression (Layer[child::CRS]).URL: https://map.geo.sz.ch/mapserv_proxy?SERVICE=WMS&REQUEST=GetCapabilities&lang=deAny help will be appreciated!Thanks in advanceVera
Hi,we connected from FME Desktop 2022.2.5 successfully to a Azure Synapse SQL Pool using the "Microsoft Azure SQL Database (JDBC)" connection. I can use the Reader without any problems and query data from the tables. However I need to use SQLExecutor Transformer as the queries need to be dynamically created. But this gives me the following error:com.microsoft.sqlserver.jdbc.SQLServerException: '@@TRANCOUNT' is not supported.Seems like the SQLExecutor performs additional statements in the background which are not supported by Synapse. Are there any workarounds to avoid this issue or to force SQLExecutor not to use additional statements?Thx for your help!
Cache problem?At writing a dbf-file happens errror "DBASE writer: 'unknown' is not recognized as a valid encoding name". FME(R) 2023.2.0.0 (20231201 - Build 23764 - WIN64) Error happens since today Feature Caching set off Result files: .cpg, .dbf, ‘.dbt’ Each process creates 51 files of altogether 283 --> maybe a caching problem? Same error happens also with DBASE writer -> character encoding 'utf-8'Reader file:xlsx-file (MS Office 2016)Writer dBase (DBF) with character encoding Latin-1 Western European (iso8859-1)Parameter tab --> Name-table "JPB_NR" (format: number(3,0) all together 283 lines of dataDBASE writer:Writing files using character encoding 'iso-8859-1' OS Locale Encoding : windows-1252 Process Encoding : UTF-8Test files are in attachments.Can anybody help?Regards,Steffen P.
I have created a geojson file from nine features drawn from a postgis database. I have tried all the examples from the community pages with no success. Can anybody point me in the right direction?
Need to filter out the large list of Attribute values(Around random 10000 values) to be processed. Currently it is tedious using 'AttributeFilter' transformer as it needs all 10000 output ports to be connected to next transformer for further processing.There should be other transformers for sure which I don't remember any. Please help.-Thanks
Hi everyone,I need to convert multiple 3D .dwg files to feature class gdb. that can be readable and presentable in ArcGIS Pro, or Enterprise.The manual process in ArcGIS pro include these 3 steps Step 1. Bring in MultiPatch feature to ArcProStep 2. Select the original MultiPatch feature class and export data to geodatabaseStep 3. Use the new exported data feature class and input it into the colour model builderbut it is time consuming and I am receiving 25 file each day.Do you know which transformers can be used?here are a few important notes:the color for the component in GIS must be same as original dwg file The workspace need to be dynamic, which means every day the files need to be read from online datasets, from different locations. (I think I need to start with “Creator” ) The files are 3D in dwg and I need to have them 3D as well the dwg files are in NAD 1983 CSRS MTM 10 and before publishing to enterprise or pro it need to be converted to WGS 1984 Web Mercator (auxiliary spher
@ReplaceRegularExpression(@Value(DETAILS),<.+?>,,caseSensitive=FALSE), @ReplaceString(@Value(DETAILS),&qout;,",caseSensitive=TRUE) The first expression replaces any text in details attribute that is bracketed with <> to be deleted.the second expression replaces any instance where &qout; appears with “.These work fine as separate transformations, however when trying to lump them into a single statement in attribute manager’s text editor the transform fails.I’ve tried comma separating, spacing, and barring the functions, but have had no luck. Any suggestions on how to get this to run? Thanks!
Hi. I run the workspace runner with the file path in user parameter. If there is a space (“ “) in the path, the parameter is loaded in a weird way: --DestDataset_ACAD {${=I:<backslash>Data<backslash>CAH<backslash>GAK<backslash>Data<backslash>GAK<backslash>FME-WorkSpace<backslash>09-Export<space>ZML<solidus>_final…But it works fine if I run original workspace. Is there some bug with Workspace runner?
Hello,I am using the String Concatenator to join two fields and separate them with a comma.However some fields are blank so I end up with some records that contain a comma only and others that contain a comma and then the value of one of the fields.My current setup looks like belowgenerally works well, except for some results like theseIs it possible to modify existing Transformer or is a different one more suitable?My only other thought is to perform some sort of trim on an other transformer after this one to remove first character?Thank you
I have a dozen files in a folder. I was able to use the Path Names Reader to write the File Name, Upload Date, Upload Time, and File Size to the CSV Writer. Does anyone know how, or if it is even possible, to get the name of the user who copied/uploaded a file into a folder? I see in the Pathname Reader the path_ownername attribute, but all this has in it is the value “Administrators”, no user name.
I have a workspace that writes to a simple Excel sheet. The sheet has 3 columns: Report Name, Upload Date, and Upload Time.In Excel you can set a Filter for each column allowing a user to filter the data in that column. In Excel, I added a Filter to each column, but when I write to the sheet in FME Form, the Filters disappear. Is there a way to “keep” or “add” a Filter to each column in the sheet by tweaking a Writer parameter or is there another Transformer I need to add before the Writer? The screen capture below shows what I would like the sheet to look like:
I have a list of lab test results and only want to include the rows that match a list of analytes. I am trying to use the IN operator in the tester transformer.I have followed the advice from this post:Help with syntax when using Tester transformer | Community (safe.com)This is what I have:Sheet1 contains the test results, text_line_data contains the list of analytes as one feature. I have merged them to get this: The “text_line_data” column looks like this: My tester transformer is set up as below: However, all rows fail the test. What am I doing wrong?
Hi All, I have a table with a 'route_ID' and a measure value (like a event table). On the other hand I have a polyline feature classe. The attribute 'Name' correspond to route_ID from the table. The measure values are points on the lines. Now the measure values changed by a predetermined value (e.g. the point was 10 m and now the point is 10.5m). My Problem, the Polyline feature class is not defined as route form a linear referencing system. And so the table and the Polylines have no relations. I don't no where (which coordinate) my old and new points are. Can I build a route feature class with FME? The Basisc should be my polyline Feature Class. I would have assumed a route feature class, how can I creat points (with coordinates) form the table? Thanks for your help. Debby
I have a workbench build in version 2022 using active choice to enable and disable parameters based on other parameter values. This option stopped working in the new 2023 version.Does anyone know if the active choice is discontinued?Thanks
Clustering Points With K-Means in FMEThis article has been generated using FME 2017.1For a project to assess the quality of suppliers, five suppliers were approached to perform comparisons on aerial imagery. They were asked to select areas from aerial photographs where potentially dangerous situations might arise as a result of human activity. After the first delivery of reports from the suppliers within a test area, one of the obstacles for the project appeared to be the identification of clusters of reports. A cluster of such reports represent an area where a potentially dangerous situation has come about. A criterion for selecting the best supplier to detect the situations from the imagery, could be as follows: the best supplier is the one that “touches” the maximum number of clusters with the reports generated, with as few notifications as possible. Because FME played an important role in this project, but no transformer seemed available within FME, a study was made to implement a
Hi, I have a gdb with pleanty feature classes with unique schema and I use SchemaScanner and Dynamic gdb to save the layers. Feature layers saved in the gdb have correct schema but the order of the columns is wrong, it looks like the new feature layers have the columns ordered alfabeticaly
I am having issues with glacial speeds of using a delete from statement within a SQLExecutor pointed to Oracle Database. The SQL query is something like:DELETE FROM ABCWHERE ID = @value(id)AND TO_CHAR(DATETIME,’YYYYMMDDHH24’) > @value(timefrom)AND TO_CHAR(DATETIME,’YYYYMMDDHH24’) <= @value(timeto) (note: The query above is paraphrased and might contain syntax-errors, I have checked and confirmed the syntax in the actual version) The Oracle Table contains about 40 million rows, so I expect this to take some time (1-5 minutes per query) but not the >30 minutes for the first query (at which point I gave up, I have not confirmed if the query will ever finish) Currently I am using a workaround of Loading the primary keys of all features that fit the selection criteria and using a writer to DELETE all corresponding records, but this seems unnecessarily inefficient and wasteful. I can imagine that the error is caused by Oracle not returning a ‘succeeded’ or ‘finished’ message, causi
I have XML file with features I'm trying to read.. that works. Next step is to create a polygon for each feature, I have a string with points that make the polygon. String looks like this: 173363.252 587903.412 173363.369 587902.665 173362.055 587900.798 173363.867 587888.745 173364.007 587887.815 173371.744 587888.843 173368.618 587904.7 173363.252 587903.412 That's a list of x and y coordinates, now I can't figure out a idea to make polygons from it. Any ideas? Do I have to seperate them, create lines and make a polygon from it? Any help is appreciated.
I would like to convert a json file to csv using a csv writer from a json fragmenter. How do I convert it? The json file is an output that is generated using API tokens. When I run the FME workbench, the translation log is successful. But when I try to inspect the data, I get the below error message. Please look into it and do the needful. An error has occurred. Check the logfile above for detailsCSV reader: Failed to open file 'C:\\PSDCitywide_towns\\Lake simcoe\\LakeSimcoe_Trial_17J2024\\@Value(Assets).csv' for reading. Please ensure that the file exists and you have sufficient privileges to read itCSV reader: Failed to open file 'C:\\PSDCitywide_towns\\Lake simcoe\\LakeSimcoe_Trial_17J2024\\@Value(Assets).csv' for reading. Please ensure that the file exists and you have sufficient privileges to read itAn error has occurred. Check the logfile above for detailsFailed to specify the feature index as constraints on the readerAn error has occurred. Check the logfile abov
Hey guys, I have a fairly large dataset of lines and points. The points need to receive the Z coordinate from the nearest index on the line. Using the CoordinateExtractor followed by a ListExploder isn't an option because that would be too heavy for my workspace. Isn't it possible to use the CoordinateExtractor in a way that in the setting 'Specify coordinate' you only extract the index that is nearest to a point feature? Is there a different way to go about this?
I have an FME session set up, from shapefile to shapefile with a renamer. My number fields go in as "Long". They are set to come out as "Long". When I pull the output into ArcGIS, the format is "Double" What am I doing wrong?
Hello,I encountered an issue while using the RasterObjectDetectorSamplePreparer to prepare samples for the RasterObjectDetectorModelTrainer. My goal is to detect certain objects based on a digital orthophoto image. I created an annotation.txt file using OpenCV and provided the relative paths to the negative samples directory and the annotation file as inputs to the Sample Preparer transformer. However, when running my workspace, I received the following translation log message:Translation FAILED.The translation was terminated due to the following feature:RasterObjectDetectorSamplePreparer_<Rejected> (TeeFactory): RasterObjectDetectorSamplePreparer_<Rejected>: Termination Message: 'RasterObjectDetectorSamplePreparer output a <Rejected> feature. To continue translation when features are rejected, change 'Workspace Parameters' > Translation > 'Rejected Feature Handling' to 'Continue Translation''The feature on tag `PYOUTPUT' fail
(This is a spin of question from https://community.safe.com/s/feed/0D5OO000004YH4O0AW, but I thought it made sense to rephrase the question) I am trying to run a shell script from SystemCaller but for some weird reason I can not make it work. My command line is: cd "/Volumes/disc1/test_systemcaller/" && my_script.sh 25 5The numbers at the end are parameters for the script. The error I get from the log file is:sh: my_script.sh: command not foundThe file 'my_script.sh' is placed in the actual folder, so should be found.If I test the file path by asking it to do something simple, eg mkdir, it will happily do so in the right place.If I run the command from Terminal it works fine. I made a second script in the folder with a mkdir just for testing. While it works fine in Terminal, FME claims to know nothing about it. Since system caller cant find the script file, even though it is in the folder, I guess that something might be wrong with my syntax? I'm on a Mac if that matters.