Using transformers to modify data.
Recently active
Hi all, I have a situation where I want to dissolve adjacent tile polygons based on a count value. For the example below I would expect the total sum to be no more than 100. Less is fine. The less polygons I end up with the better, but optimization (doing several passes) to figure out the best possible result is not that important. It's sufficient to start from one corner and simply add until all polygons have been dissolved. Also there could be a situation where the polygon has a larger count (110 for example) than expected. In such a case it would be left single - as it is.So any ideas on the simplest approach in doing this? I expect some kind of loop function in needed. Not very familiar yet with those...Thanks for any advice!Attached is an example shape file to play with...
Hi all.I'm tasked with updating a table that contains 10+ geometry fields. I'm opening it as a non-geometric table, extracting one (of two) geometries, and reprojecting this to a variable projection, based on other field data and/or coordinate values.This all works well, but when I try to update the targeted geometry field in the database table, all hell breaks loose in FME.I've tried to use the formats "Microsoft SQL Server Binary", "OGC Well Known Binary", and even "OGC Well Known Text".I usually get an error message about mixing image and geometry field types, but now it just times out all the update commands.I've tried using a writer with "update", and the DatabaseUpdater, but both errs, so I've ended up with a SqlExecutor (with an UPDATE command), which unfortunately times out.What is the proper way to accomplish this task ?
Hi.When reading multiple geometries from a single table, they're joined together in a single aggregate geometry collection.The individual geometries can be extracted by using a Deaggregator, with each separate geometry having its original field name as its "name". Writing multiple geometries back to the table requires the geometries to be aggregated, and a MultipleGeometrySetter set to Yes.If updating such multiple geometries, I assume that FME extracts each geometry from the aggregate, and updates the (geometry) field values designated by the individual "geometry name" as field name ?So, if I have a table with 3 geometry fields (A, B, and C), and want to use geometry A to update field C with a new geometry, should I create an aggregate with all 3 (original A and B + new C), or can I just include the new C value in the aggregate when updating ?Cheers.
Hi,I just added an end-sql statement to some workspaces, each with a comment on the preceding line. The comment is a T-SQL line comment on a separate line, i.e. with prepended "--" (two dashes).This fails, as it seems FME gobbles up the first dash before execution, rendering the complete statement invalid.If this WAD og a bug ?Is it possible to add comments as "/* ... */" instead, or would "--- ..." (i.e. 3+ dashes) work ? It also doesn't look like line-feeds in the statement are respected, so maybe line comments are a complete no-go ?CheersLars
Hi FME wizards, I am trying to do a datum transformation on multiple files in a nested folder structure and save the outputs using an identical name and folder structure, but in a new directory location. I've created a replica of the folder structure using DOS commands and trying to replace the existing root folder with a new one. I'm reading the source files in from a CSV, then creating a new 'outpath' attribute in AttributeManager using the StringReplacer to replace the source root level directory, e.g. the part in bold C:\\Project\\CurrentDatum\\Model\\file.ext with C:\\Project\\NewDatum\\Model\\file.ext. The source and destination directory are Published User Parameters and I use the following in the text editor: @ReplaceString(@Value(_dirpath),$(Source_dir),$(Destination_dir)). When I view this as a new attribute, the directory appears correct. I've used similar logic in Python and it works great but not sure how to link it to my outputs in FME. This is my cur
I am trying to do what is described in the question with a dynamic Geojson writer set as shown in "screenshot_1,jpg". However I get an error (screenshot_2.jpg).
The XML Templater fails when I give a conditional value in the root template. XMLTemplater_3: Invalid Test Expression: TEST<at>Value<openparen>template_root<closeparen>=1 I have attached a simple workspace, any ideas why the conditional check fails?Thanks
Hi all, I have an XMLUpdater setup in my workspace, but it's painfully slow. I'm trying to update XML documents with 10k+ updates in some cases, but it will hang and take forever to complete. On average it's applying approximately 1 "Update" feature per second, meaning 10k "Update" features is taking close to 4 hours (with caching on but it's also slow without cache). The XML has around 200k lines (10 MB file) so that's not helping. I have tried obvious steps such as removing unnecessary attributes and the geometry from the update feature, sorting the order first, and limiting the numbers of calculations/swaps that the XMLUpdater performs, but it still seems slower than it should be... I'm applying a "Replace contents" update type, with XML path of the format "//Element1[@name=fme:get-attribute("_att1")]/Element2/@_att2". The only way I can get a performance improvement is to fragment the XML, extract the attrib
I have a workspace with an FBX input (file attached) which is essentially a cylinder with oval ends with a few transformations which then writes to GeoJSON. It has a CoordinateSystemSetter transformation applied set to EPSG:6677.When viewing the GeoJSON ouput via Cesium we noticed the cylinder is just slightly out from where it should display.We believe this is due to the origin point not being the center of the cylinder.I have applied the following to try and correct the issue which does look closer:Added a CenterPointExtractor transformer (_inside_[x or y])Added a BoundsExtractor transformerAdded a Affiner transformer which uses results from the above two transformers to attempt to center the point of origin (only interested in the x and y axis). The Affiner is set to:1 0 -(@Value(_xmax) - @Value(_inside_x))/20 1 (@Value(_ymax) - @Value(_inside_y))/2 Any thoughts on the above if I am doing it correctly and how the origin point works for FBX files in FME i.e. does it come from the FBX
I am trying to get the KMZ file from the Website and download it to my pc. When I tried to get the file from pc and run the featured reader, I got only two features. and this when i nnot add on its
I've tried about every combination of Source coordinates I can but nothing is coming out right. If I leave it blank FME just copies the coordinates from the source and doesn't actually reproject anything. Do I need a custom coordinate system for the source?
I'm trying to migrate some python into FME that involves DataFrames as the end result. Rather than trying to manually handle converting the DataFrame to attributes, I thought I could convert the dataframe to a csv in python memory first, output it as a file on the feature, and then use a CSV reader in the workspace to parse the file. I ran into issues with getting the csv out to an attribute, so if anyone knows of a way to do this I'd appreciate it. Below is a simplified version of my code (it involves Esri's ArcGIS API for Python), and then I'm using io.StringIO to handle the csv in memory, but I've never used that function before. When I run the workspace with this as a Python Creator, i get the error: Python Exception <TypeError>: Could not convert attribute value to a supported attribute type.Traceback (most recent call last): File "<string>", line 33, in input import fmeimport fmeobjects import csvimport io from arcgis.gis import GISimport pandas as pdgis = GIS('htt
Hello Community,I'm working on a project and i need to transform Data from Sqlite (Infraworks) to CityGML so i can then use it for a 3D GIS application.i'm open to all ideas on how i could achieve it or any information related to subject.Thanks,
I have read polygon features from esri file geodatabase. And then writing them to smallworld. The following errors are observed in translation log and the workbench session is terminated with a failure message. Smallworld Translator Error: The hole is not within a sw:pseudo_areaSmallworld Translator Error: Primitive sw:sector_rope:[1-1].sector failed status 1376267(0,21,11) Too many intersections Is there any way to identify these records before we pass on to writer? Or is there any setting we can choose or process so that FME will skip these kind of features and write log. Kindly help. ThanksSiva Bulusu
I want to convert DGN and extract certain features from the DGN file and then after doing operations on the extracted content of DGN I w again want to visualize. It would be great if anyone can help me with this.
I'm reading an Excel file using the Excel Reader. The reader works well for all fields except one. It consistently marks all the values in a particular numerical column 'Number of meters' (column G of each sheet) as missing. The file is open data but a copy has been attached for convenience: https://www.gov.uk/government/statistics/lower-and-middle-super-output-areas-gas-consumption
Hi!I have a lot of pictures and I would like to extract the date of creation.But when I use the Reader it's too long.So I tried with PathReader, but if I do that, the properties of the pictures are not avalables.Does someone knows how to do that?Thanks !!!
Hi, I have a row based information like Price Sold2022 InStockRow 1 252 Yes NoRow 2 59 No Yes I saw example on how to color individual cell, but there cells where named A B C etc so I didnt really understand, my feature attributes are Sold2022 etc and will be written to an excel and I want for example the Yes = Green cellNo = Red cellPrice over 100 = Red I was thinking creating temporary attribute like p_price to mark the color, also I could conditional format in excel for Yes or No but if I want to color above or below price 100 then I would loose the value in the cell. Also saw example of cell.format() or similar to add to the writer. Just need more guidance because I really don't understand how you set the cell you want colored in the ExcelStyler. should cell = attribute?
Hello everybody,please, Im trying to automate creation of JSON and I need to get exported JSONs only with attributes, which are exposed and have values (not null etc.). Please, does anybody know how to solve this problem via JSON Templater?Thank You so much!Lubo
In recent version of FME, it is possible to define a tolerance value when using transformers such as LineOnLineOverlayer. We are having an old FME server (2016) and I would like to know how can I proceed to define a tolerance value when overlaying two lines datasets in FME 2016? @Takashi Iijima @Mark Stoakes @jdh and others
My attempt to export to PDF seemed fairly impossible, so I changed my approach to export to MS Word instead. I've made some progress; I've managed to create a single table that has all records from all of the worksheets - I need to be able to split the data out by these grids (i.e. separate sheets/tables for each grid). I also need these sheets to be in landscape rather than portrait orientation. However, I'm a bit stuck and I'd appreciate any advice that can be offered on how to achieve the result I desire! Thanks!
I have a 2 XLSX files. I delete some records on 1 file to be identical between the 2 XSLX . But when i apply a change detector, FME seem to considerate the line that i have delete. Can you help me.
Hi folks, I was wondering, is there a way to intentionally write to FME's temp location? I want to create a workbench that's portable and needs to write a lot of scratch data using a few workbench-runners (deleted at the end of the process). Is it possible to intentionally write to it? There doesn't seem to be anything on http://fmepedia.safe.com/articles/FAQ/FME-TEMP-environment-variable . I've done some testing: - %FME_TEMP% as the destination just means FME creates a directory called that. - <FMEDrive> in various guises just results in a workbench crash. - Not specifying a directory means that FME writes the file to wherever the workbench is saved. Only if it's an unsaved (new) workbench will this be the fme_temp directory itself. Thoughts? Is this even possible? I'd prefer not to have to hard-code somewhere, or even bother with a user parameter. Cheers, Jonathan
In the MapnikRasterizer settings, in the Raster Properties section, it is necessary to specify the number of columns and rows of the output raster. When I enter this information manually, there is no problem. When I want these parameters to be filled in dynamically, i.e. using the number of columns and rows of the input raster (using a RasterPropertyExtractor beforehand to access the attributes), I get this error message:"MapnikRasterizer_2 (MapnikFactory): No values were specified for either NUM_ROWS and NUM_COLUMNS, or SPACING. One or the other must be specifiedMapnikRasterizer_2 (MapnikFactory): A fatal error has occurred. Check the logfile above for detailsAttributeManager_OUTPUT_-1_84_Player (RecorderFactory): A fatal error has occurred. Check the logfile above for detailsA fatal error has occurred. Check the logfile above for details". The number of columns and rows in the input raster are 32 bit unsigned integer. When I converted it to 64 bit integer via the Attribute