Using transformers to modify data.
Recently active
Hi folks,This seems like a fairly simple operation, but for the life of me I can't seem to figure it out. All I need to do is move an existing excel file from one folder to a subfolder. (A subsequent workbench will run, regenerating a new excel spreadsheet in the original location.)I've read a few of the other answers, but none seem to have what I'm looking for. A few of them mention a 'Move' parameter in the filecopy transformer, but the only writer parameters available to me are 'Overwrite existing file' with options being 'yes' or 'no'. (Upon further investigation, the 'Move' parameter only becomes available as an option when file type 'FileCopy' is selected. If i select MS Excel as the filetype, then the 'Move' option is no longer available. Any ideas?
Hi there, I am trying to calculate the four date fields related to the start and end of the current and previous regulatory year based on the current date. The regulatory year starts from 1st of April and ends on 31 March of next year. So in this way current regulatory year starts from 1st April 2019 and ends on 31 March 2020. Here is my logic :Current_regulatory_year_start: @DateTimeFormat(@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P9M),%Y%m)01,%Y%m%d)Current_regulatory_year_end: @DateTimeFormat(@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),P2M),%Y%m)31,%Y%m%d)Previous-regulatory_year_start: @DateTimeFormat(@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P21M),%Y%m)01,%Y%m%d)Previous_regulatory_year_end: @DateTimeFormat(@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P10M),%Y%m)31,%Y%m%d) However, it does not produce the desired result. Current_reulatory_year_end and previous_regulatory_year_end produce null value, whereas the other two do not produce the right date. Could you please guid
I am working on a workspace that receives a list of previously unknown attributes and their values. They come as a list of attributes: '_list{}.Property' and '_list{}.Value'. These sets need to become GeometryTraits on an FMENull geometry. Usually I would use a GeometryPropertySetter to create those traits, but since it is unknown upfront how many features these lists contain, I want to use a PythonCaller to loop through the list and set the traits. I seem neither to be able to create an FMENull feature, nor to set it's geometry name or traits. Can anyone help me with a working code snippit?
I have two data sets, one is a point with XYZ and RPY values. The other is a polygonal sphere. I want to rotate the sphere around the point's values with the 3D Rotator, but the workspace keeps throwing the following error: ERROR |3DRotator: Unable to convert @Affine parameter B value `' to a floating point value. What is the cause of this? The data itself is as far as I can see correct, and when I use a point instead of the polygon sphere, I get no error.
Hi all, I have a question. Is it possible to have more than one schema location(*.xsd) in "XMLValidator"? Does XMLValidator supports multi schema location paths? Best regards, Mani
i want to ask about my issue: in my map,i have many lines and many blocks and i want to say ,if the line has red colour touched the block so any line get out of this block will take deifferent colour and get new idFirst ,what i understood i have to use lineonAreaOverlayer transformer to find which line intersected with blocksbut how can i put a condition if any red line that include base id touched the block so any lines get out of this block will get different colours and each line will have new Id Thanks
I have old workspace and received the following Python error message after upgraded to FME 2019.2 and didn't install any Python 2.x. Any suggestion for getting around the issue ? Thanks.Python Exception <NameError>: name 'unicode' is not definedTraceback (most recent call last): File "<string>", line 26, in inputNameError: name 'unicode' is not definedError encountered while calling method `input'DateTimeCalculator_2_PythonCaller (PythonFactory): PythonFactory failed to process featureA fatal error has occurred. Check the logfile above for details
Good morning,I am trying to extend lines till they intersect. I have a gap between three lines (see attached picture). I would like to extend each line using each lines same trajectory until they all intersect. Is there a way to do this programmatically? Instead of specifying a certain distance to extend the lines. So I want to find the next point along the line on the same trajectory. I have tried using the distance formula, but I get the shortest distance to each point, but that gives me a triangle instead of T intersection.Any guidance would be greatly appreciated! Thanks!David
I need the following:Every line has to have two numbers, the rest will be the same. Is there a simple way to do this?With kind regards Remco
Hi all, I have something weird going on in my StringReplacer.E.g. a simple string goes in. StringReplacer settings: RegEx captures whole string in capture group 1, then as a replacement I use capture group 1, followed by the string "finished" In the output the string "finished" is somehow duplicated. Magic / bug / am I doing something wrong? Cheers, Ed
i have data like belowi need output like belowNote: calculate percentage in percentage field with comparing name and name ID fields.
Hello all, I want to generate a vector point from the origin point of a raster.My raster is an ecw (version 2) format.I can expose the coordinate values of the origin point by using RasterPropertyExtractorBut, I fail to create the vector point with VertexCreator. I assume this is because the raster still exists and I cannot add a vector point to a raster feature. If I could replace the raster with the vector point, this would work for me.
I have a workspace that creates an ESRIJSON file of features. The problem is I have 90 to upload but any more than 2 features causes a http 414 uri too long return from the destination server with a POST request. Any ideas on how to send 1 feature at a time? I tried WorkspaceRunner which processes one at a time but I need to write the json file from the incoming feature each time and I can't figure that out as yet.
How can i convert date from dd.mm.yy to yyyy (4 digit only ) in column in excel as example 01.02.2000 to 2000 only Thanks
i want to show filter on the header of column and change size of line and do the words inside cell in the center and each celll has size 50 .i mean rrange the cell and show fiolter that exactly what i needif it is not possible to apply filter in the output ,at least my input excel has filter on header ,i want to keep the filter as input i mean do no action on it .thanks
Hi there I am trying to write a Python script which should change the value of an attribue based on the occurence of different substrings int the attribute. This is what i managed to create so far:import fmeimport fmeobjectsclass FeatureProcessor(object): def __init__(self): self.featureList = [] def input(self,feature): self.featureList.append(feature) def close(self): substring1 = 'blabla' for feature in self.featureList: if feature.getAttribute('TestAttribute') == substring1: feature.setAttribute('TestAttribute', 'value1') else: feature.setAttribute('TestAttribute', 'value2') self.pyoutput(feature) This script can be executed but isn't doing the job right. Whith this script de Attribute value has to be exatly the same like (==) "string1".I tried to do it like this, but the script isnt working: def close(self): substring1 = 'blabla1' for fea
I have a line that I've chopped up and intersected with perpendicular lines to be labeled with odd and even numbers on either side.I used the counter transformer to label the perpendicular lines, but I encounter a looping sequence numbering that doesn't quite work for what I intend. See the image below. What I would like is to have the sequencing start at the label 45 and 46 and end at the current endpoint. Any suggestions will be appreciated.Please see my workspace below.@takashi@sander@lizsanderson@david_r
With the help of a number of posts on the forums, I've taken a large dataset and been able to evaluate the total time, within a range of days, pool cars have been used. What I'm now struggling with is to calculate the hours used as a percentage of a "working day"eg;Car One used for 04:20:00 hours, what percentage use is this against a working day of 07:00:00? Do I need to calculate this out in seconds and convert back or is there another way? Thank you.
Situation: Raster (georef. Tifs) that either have no NoData value assigned or a NoData value outside the spectrum (for example, the value 256 for 8-bit). When transforming these grids from one coordinate system to another, white wedges appear on the edge. How can these NoData values be found in the implementation with FME transformers and how can these transformation wedges be eliminated? The position of the NoData values is unknown.
Hi there, I have a python script that I want to run on FME2019 desktop. I tried to google it but unfortunately, couldn't able to hold any link that explains how to run Python script. Could anyone point me to the relatively easy to follow the link that explains how to run Python script?
Right now I am using a python runner transformer to run the arcpy dice function but was wondering if there is an easier way to limit the number of vertices?
I want to find a way to pull out the first 13 characters in each list element until the list ends (identified by ItemsInList attribute). I currently have this:@Left(@Value(_list_UAIDs{@Value(ItemsInList)}),13)However this only returns the last entry. I want it to return every instance within the list.I wasn't sure if it was that simple of if I could create a looper to resolve this?
i used linecombiner transformer but it is able only to connect two lines but i have sometiems 3 or 5 lines are connected so which transformer should i use .Thanks
Hello,I have a 3D surface (mesh) and I am looking to extract point coordinates on a 5 X 5 Grid of this mesh.A conceptual workflow in my mind would be:Create a 5X5 Grid based on the bounding box of the surface (?)Extract the coordinates of the points that are on the surface using a spatial filterThis is not much to start, but any suggestions would be welcome. Thank you, George
Hi there, I am trying to use Python code (which is written externally) in FME by using Python Caller. The purpose of the python program is to create two new attributes after performing manipulation on existing attributes. For this purpose, I create a data frame in the ___init__ of the Python caller, then I use the input function to capture the data that come from different blocks of FME transformation and then do the data manipulation in the close function of Python caller. Now the problem is that this structure slows down the program. I suspect it because of the way I capture the data in the data frame. I have two questions:1) am I following the right approach to populate the data frame? Is there any better way (quicker) of the populating data frame?2) Could you please also comment on my general structure of the Python code in Python caller i.e. defining data frame in __init__ function, populating data frame in input function, and final calculation is done in close function? RegardsYa