Using transformers to modify data.
Recently active
hello,Is there a way of extracting data(maybe from loG) about start and end of workspace execution, as long as errors (if there are any?), in order to insert them in a table? thx,Nicu
I am working on a script that uses the OpenIfcShell library to create IFC files as a workaround for the IFCWriter's gap in functionality. So far so good: I can create the basics of an IFC file using one feature. Now the challenge is to scale up with a dataset that has many features and feature types. Here is the code I have so far:import fmeimport fmeobjectsimport uuidimport timeimport calendarimport tempfileimport ifcopenshell class FeatureProcessor(object): def __init__(self): pass def input(self, feature): # Create FME Log File object name called logger logger = fmeobjects.FMELogFile() # Call logMessageString method to add custom text and set WARN severity level logger.logMessageString("Testing the mud",1) ifc = ifcopenshell.file(schema='IFC4') O = ifc.create_entity('IfcCartesianPoint', (0., 0., 0.)) X = ifc.create_entity('IfcDirection', (1., 0., 0.)) Y = ifc.create_entity('If
In my case, I have JSON object that contains table and it values in array. I am trying to extract each table object from JSON and insert it features(columns) array values into postgresql table based on table name. The json structure will change every time and it is dynamic. Input:{ { "table": "Table1", "key": "2343", "features": [ { "status": "Finished", "id": "1234", "kind": "Unknown", "project_name": "XXXXXX" } ] } { "table": "Table2", "key": "2667190", "features": [ { "column1": "test", "column2": "A", "status": "Unknown", } ] },} Expected output:
My database is >13.000 points from 6 different vessels. I need to create lines for each day, for each vessel. The lines have to be created in chronological order. I'm trying to group the dates after sorting, for then build the line using both datetime and vessel name parameters. I have converted date time format (ex 20210415165357, which is YYYYMMDDHHMMmm) to 2021-04-15 (YYYY-MM-DD). Any ideas how to solve this?
Hi All, I'm try to find the best way to analyse the begin and end of line and check if this line is connected in the both vertices ( begin and end ). As you can see in image bellow, the line number 3 is connected in the begin and end of the line.And the others line are not.A DGN file is attached. Thanks in Advance,Danilo
Hi, I have a problem extracting data from my text file.The file looks like this:******************************************#Textlimiter=;#Decimalsign=.#ProvadmColumn1, Column2...ColumnX;"Value1";"Value2"...""ValueX";"Value3";""Value4"..."ValueY";#ProvdatColumnA, ColumnB...ColumnZ;"ValueXX","ValueYY"..."Value11";"ValueQQ","ValueRR"..."Value22";#End******************************The ProvAdm-section can contain one or more rowsThe ProvDat section can also conrtain one or more rows I want to read ProvAdm section into one table (SQL Server) and ProvDat into one table (SQL Server) but I dont reaaly understand how to find out where ProvAdm section ends (how many rows should be read) or where ProvData starts (where should I start reading) An additional dimension to the problem is that I need to read multiple files at one go... Perhaps my explanation is not complete b
Hi !I'm having a problem while writing into a template file, see image of log error. In fact, out of about 20 translations, there is one with this problem arising while writing data. Can someone tell me if it's a bug with FME or about my parameters ? I doubt the problem with my parameters, because very often it works well while wring the Excel file.Please help ! Thank you.
I am trying to extract text from a data catalog website to use for metadata updating. I think I have all the pieces to get a line of text with the correct CSS selector. The problem is that the HTTPCaller doesn't even seem to register anything after the <header> tag so I can't extract anything in the main body. My output always comes out null.Here are a few screenshots of trying to just extract the title of the dataset page:The _response_body returned from the HTTPCaller doesn't even have the main <body> section.Is there any way to force the HTTPCaller to recognize anything past the header tag or is this a security feature of the government website? Thank you for your help!
The error occurs once in a while in a Workspace that is reading a PostGIS/PostgreSQL 12.9 database and writing a GEODATABASE_FILE using 64-bit ArcObjects from underlying an ArcGIS Desktop 10.8 installation. The error is triggered in a DatabaseJoiner, when attributes are joined in from a PostgreSQL table and written to the File Geodatabase simultaneously. The error happens once in a while (every second run or so), but it does strangely not occur on a PC with 64-bit ArcObjects from underlying an ArcGIS Desktop 10.4 installation or in any other variants of the workspace writing to other formats. The error occurs both on Desktop and Server. FME version is 2020.2.3. The error message does not say anything about the GEODATABASE_FILE writer, only the PostGIS reader, but the writer is obviously a part of the problem. If I disable the writer, nothing happens. If I bypass the DatabaseJoiner nothing happens. The message POSTGIS reader: stk::ex::bad_expected_access is discussed elsewhere on this f
I have been trying to clip/snip a set of multipart linear features with measures based on from and to measure attributes. I've tried running the linear features through the Snipper transformer but all that seems to do is deaggregate the lines. Is there a way that I can replicate this functionality in FME?
I have a process that reads a dataset from Smallworld to a point feature class in an esri file geodatabase. I works fine in 2019. In 2021 it now fails because apparently there are a few fme_aggregates in this dataset. How can I get these features to write again? GeometryCoercer and DeAggregator aren't working. I need this to work in 2021 but can't figure out how
I have one line command. This command works manually in cmd command windows. When I try with fme systemcaller it does not work. What could be the problem? Fme version 2021.1.1.0 build 21619example:xcopy "@Value(png_source)" "@Value(png_dest)*"xcopy "C:\\gml\\F-12696263-A.png" "C:\\gml\\gml\\F-23-A.png*"
@Takashi Iijima I need to separate text values for 'Texas_WellsTexas_WellsTOOOBIN_BOUNDTOOOBIN_TXTexas_Wells' as Texas_Wells Texas_Wells TOOOBIN_BOUND TOOOBIN_TX Texas_Wellscan you please help in building text to replace query?
Hi All,Helped by info in this forum I constructed a loop in the JSONTemplater, to loop through a list and make a json array based on info if a certain condition is true. This works, I use a $i to reference to the index in the list. In a different counter $c I would like to keep up with how many values are entered i the array and use this value in the array as wel, but I can't get the $c counter to count up.This is what I have so far:[{let $top5s := fme:get-list-attribute("_prio{}.top5")let $themas := fme:get-list-attribute("_prio{}.thema")let $deelthemas := fme:get-list-attribute("_prio{}.deelthema")let $c := 0for $top5 at $i in $top5swhere xs:string($top5s[$i]) eq "Ja"let $c := $c + 1return {"titels": "Projectambitie " || $c ||": " || $deelthemas[$i] , "teksten": "Op basis van de locatie vraagt " || $deelthemas[$i] || " aandacht in je project." }}]It works, only $c stays at value 1...Anyone got any tips, I probably am overlooking something Regards,Steven
Hi, I have 2 layers with points features in shp. I want to create a tool that finds the nearest point from another layer of points only if the layer as the matching attributes and then snap to the nearest point, regardless of the distance, only the one that is closer to it and has the matching attributes. Example: 2 points with a oak attribute as sort. Thanks ahead! Isabelle
I was wondering, if there is a difference, how the two things work?I create Lists in a Spatialrelator, and I need to sum over some of their values. As I have a lot of data, I want to remove the lists after summation, and i think feature.removeAttribute('_relationship{}') does the trick. However if I add an AttributeRemover afterwards, under Lists it shows me the _relationship{} List, so it wasn't removed by feature.removeAttribute() ?
Hi. I write data to an excel file using an excel template. I also make use of a Python script to upload the newly created excel file to SmartSheet making use of the API. The program runs perfectly from FME Workbench, but when I run it on FME Server, I get the following error message in the log: "Python Exception <FileNotFoundError>: [Errno 2] No such file or directory:" I have similar files running and working on FME server, but they do not make use of a template file. The error message pertains to the path of the template file, which is in the same directory where the dataset is written to.
hi,I have the following json time series and would like to convert it to a table structure.so per time and value an own row with all station information.Unfortunately I can't find a corresponding example in the FME help. [ { "ts_id": "19690010", "station_name": "Badinghagen W", "station_latitude": "51.084693593981505", "station_longitude": "7.650786142144193", "parametertype_name": "Niederschlagshöhe (N)", "ts_name": "Tag.Summe", "ts_unitname": "Millimeter", "ts_unitsymbol": "mm", "station_no": "13100039", "station_id": "12918", "rows": "4", "columns": "Timestamp,Value", "data": [ [ "2022-03-18", 0.03 ], [ "2022-03-19", 0.00 ], [ "2022-03-20", 0.00 ], [ "2022-03-21", 0.00 ] ] }]
I'm new to FME. I have an attribute that contains an alphanumeric code. I need to use this code to look up a name in an Excel sheet. I'd like create a new attribute with this name. I think that DatabaseJoiner may be the correct transformer but I haven't been able to get it to work. If possible, if the looked-up name equals "No Data" I'd like to get the name from a different column. Thanks.
I have a spatial filter that isn't giving me the correct result. I am trying to determine if a feature falls within a polygon. If it does it should pass. If it doesn't it should fail. I know the feature is within the polygon and therefore should be 'passing' but instead it keeps failing. I'm assuming I have something set incorrectly. These are my parameters: Filter type: Multiple FiltersPass Criteria: Pass against one filterSupport Mode: Support aggregatesSpatial Predicates to test: Contains candidate, touches candidate, intersects candidateUse bounding box: noCurve boundary rule: Default rule Merge attributes is selectedAccumulation mode: Merge FilterConflict resolution: Use candidate Preserves Feature Order: Per output port
Hello, I am looking for a solution for extracting appearance from geometry to get raster's and then adding georeference to it. Full problem:I have geometries that are divided into multiple files that have ortho photo appearance on them, I want to get all the appearances and combine them into one raster. Then Ill read another geometry and append the raster to that one using geometry coordinates.But when I use the AppearanceExtractor no georeference is added so I cant combine them into one or append them to the new geometry. Input geometry Any help would be appreciated, thanks.
PROBLEM 1 if in column TYP the value is PL than do nothing (keep the cell G1, H1, I1 empty) ******************************************** PROBLEM 2 if in column TYP the value is PEthan calculate value in "x1 in (m)" check condition "F is W" or "F is E" or F is S" here the condition is "F is W" so fill in default value from "Y in (m)" to "y1 in (mm)" and from "Z in (m)" to "z1 in (m)" FORMULA to calculate/obtain value in "x1 in (m)" i.e. 1960.85 from the DIM in (mm) always select the first value before "x" for i.e. 600 and convert it from millimeter (mm) into meter (m) i.e. 600/1000 = 0.6 now add the result i.e. "X in (m)" + "0.6" ******************************************** PROBLEM 3 if in column TYP the value is HOthan calculate value in "y1 in (m)" check condition "F is W" or "F is E" or F is S" here the condition is "F
I currently have 2 datasets - one is a set of records with a date attribute. The other is a schedule dataset with 2 attributes indicating the start and finish dates. I am trying to identify how I can query whether a record in dataset one is within the range of the start and end dates of dataset two, and then subsequently count the number of times each record appears in the range of dates The end result ideally is something similar to the statistics calculator where I would see each record with an extra attribute with a numerical value indicative of how many times that date has occurred in the range of the schedule dataset.
I would like to be notified if there is any wrong attribute value in a non-spatial table which is read from SQL database by comparing with an spatial attribute table. In other way, I want to detect change if the attribute of a particular entry/row is different from each other. I have intentionally changed attribute values for two entries so that these two are picked. Both tables have few common fields but the schemas of the tables are not same. I have tried with changeDetector, Matcher and DuplicateFilter but not getting the actual outcome. Any help will be very appreciated. In the attached image, 1 is the non-spatial table and 2 is the spatial attribute table. I have used attribute manager so that the attribute names in interest in both tables are same.
In your experience, would splitting the feature flow and directing it into multiple, simultaneous SurfaceDraper transformers significantly decrease the processing time for a workspace, all else being equal? Let me explain what I am dealing with and why I ask ...I have 730K points (center points of square grid cells) and 2.1K triangular 3D polygons, overlapping with each other in both 2D and 3D. For each point, I must identify the triangles it intersects (in 2D) and identify the triangle that is lowest at that point's location, extracting the triangle's z-value as an attribute. For that, I use a SurfaceDraper -- see the screenshot above. Points and triangles go through a PointOnAreaOverlayer with output of both points and areas, and those two flows are directed through ListExploders to end up with two matched sets of equal size as input to a single SurfaceDraper transformer. Functionally, the workspace works fine, but the processing time is massive. The SurfaceDraper appea