Using transformers to modify data.
Recently active
When trying to call an API using HTTPCaller (POST) "upload from file" option, FME fails with error code 500.However using exactly the same piece of JSON structure as "specify upload body", then the HTTPCaller works fine.So how is it possible, to change the upload body for each time I read a new JSON record from the file.Any ideas to make this work, one way or another, are very welcome.
Hello!I am currently running a shortestpathfinder to calculate fastest routes along a road network. I am having difficulty creating a from-to line that does not have overlapping points. Currently the LineBuilder has great overlap generating a not very well optimised route through shortestpathfinder. This is similar to the Travelling Salesman, if the salesman were to visit every point on the network.Any idea on how to better generate the from-to line to have less duplication? The image shows the messy LineBuilder.
This should be a dead easy translation, but unfortunately I use FME only one or two times a year, and I’ve been too lazy to take enough time to read the documentation and become more proficient.I have several hundred AutoCAD drawing files that I need to extract data from three feature types:linework on layer R-UTIL-CATV-LINESblocks on layer S-UTIL-CATV-SYM: all I want are the insertion points and the block name at each insertion pointblocks on layer S-UTIL-ELEC-SYM: again, just insertion points and the block nameThe target writer type is Esri shapefile. I can get the geometry of the lines and the block insertion points, but I cannot get the block name no matter what permutations of translation parameter that I try. I have looked through the forum postings, but apparently this is one of those FME 001 translation types that is supposed to be self-evident. I will accept the fact that I’m a lazy ignoramus, but I would really appreciate a solution for getting those block names. Here is a li
I created with sql creator a dataset then i write the data in two sqlite or postgres table. Same data and data type. If i compare the both, the first set id detected as deleted and the other is detected as added.
I have a layer with several polylines that represents a hiking trail in southern Sweden. I need to segment this trail into equal lengths in one direction along the line, either starting from the north or the south. At one point the trail splits in two and one feature ends in the middle of another, otherwise all features are joined on the start and ending vertices of each other. The sum of lengths of the lines is 85 266.31 m.The layer uses projected geographic coordinate system: SWEREF TM 13 30, which I believe is LatLong @david_rI am trying to use the IterativeSnipper to cut the trail into 4000 m segments. First I tried to aggregate the polylines, since I want the lines to go in one direction, or to have one starting and one ending point. The translation failed because of invalid geometry that time. And I couldn't get the LineCombiner to work either @egomm.And when I use only the IterativeSnipper with the below parameters, I get a result of 27 polylines with most of the features (1
I have been developing an FME workflow in version 2017 and have since upgraded it to run in version 2018 but am noticing a vastly slower processing speed when running the DatabaseJoiner transformer in the 2018 version. I can literally count each feature as it gets joined. This used to happen in 5 seconds at the slowest in the 2017 version and in fact I can run the DatabaseJoiner in a workflow identical(data and workflow) to the slow 2018 version and it will run super fast. This may be indicative of a bug in this transformer. Can someone help me find out if this is the case? I used to be able to run this workflow in less than 3 hours but in the 2018 version it takes over 9 hours to finish processing.
How to speed up Clip 6 000 000 triangles against 20 areas. Have tried Clipper, Spatialrelator, spatialfilter. With no luck for speeding.Using Postgres is an option, but would prefer a lightning-fast solution that only includes FME without a DB-backend :)
Hello all,I am a newbie to FME and have failed at the first hurdle to convert an .XML file to .csv format.I really want this converted but do not have the time to learn how to use FME (wonderful, though it is) to complete the task.Would anyone like to do this as a simple challenge to their skills? The file is of no commercial value but it is about 115MB in size. I would simply like it converted to an .xlsx or .csv file with a flat structure.(I would use somethimg like www.wetransfer.com to send it to you).Any takers?Thanks one and all !!
I am pushing data that I have cast as a double number to the JSONTemplater - it goes in as 0.09 once it comes out it gets longer becoming: "prod_index" : 0.09000000000000001This seems like a floating point rounding number issue. Can anyone suggest a way around this.Many Thanks,Oliver
Hi together,I'm trying to create a transformer that processes point cloud data from a LAS file. To do so, I'm modifying the CenterOfMassCalculator_Python example.How can I access the point cloud data? The feature.hasGeometry() attribute is true, but feature.getGeometry() returns None. Code:def input(self, feature): self.logger.logMessageString("--- input() ---") self.logger.logMessageString(" Feature type (fme): " + feature self.logger.logMessageString(" hasGeometry (fme): " + str(feature.hasGeometry()), fmeobjects.FME_INFORM) if feature.getGeometry() is None: self.logger.logMessageString(" Geometry is none")Output:--- input() --- Feature type (fme): LAS hasGeometry (fme): True Geometry is none
Hello,I have inserted an Excel spreadsheet in SQL Server with total rows = 6.357. I want to update the existing table with an updated version of the same spreadsheet (i.e. 2 row values have changed; else remains the same). My workflow is:Readers: (I) new excel spreadsheet and (ii) connection to the existing table in db. I then use the UpdateDetector transformer and the output is: Unchanged: 6.356 and Inserted: 1 and Deleted: 1.This one is the one I modified in excel, so it is the right one. My modification however, was to add a prefix in two of the column values of one row.Thus, I would expect to find the change in the UPDATE. Could you please enlighten me why this happens?What I wish to achieve is, update the db with all the changes of the spreadsheet in any time. Do you think it is feasible, without having to specify a column value on the where clause?I want to automate the process of updating the db based on an updated spreadsheet using FME Server. This means, I do not want to be th
I'm getting the error when reading from GDB 9.3 with FME 2008. Any ideas how to fix this?
Hello,I would like to add elevation values on arc without changing its structure.Before, I have this arcAnd after I would like the arc to have this where the highlighted values should be the elevation valuesSO far my idea to do that is to usearc =feature.getGeometry() feat.setStartPoint(fmeobjects.FMEPoint(feat.getStartPoint().getXYZ()[0], feat.getStartPoint().getXYZ()[1], elevation_start)) feat.EndStartPoint(fmeobjects.FMEPoint(feat.getEndtPoint().getXYZ()[0], feat.getEndPoint().getXYZ()[1], elevation_end])) but it is not working.Any hints?
I have a citygml file and it contains 2 coordinate reference systems. One of them is 2 dimensional and the other is 1 dimensional for height. I want to remove the coordinate reference system just used for the height. Currently I can only remove coordinate systems for both using coordinate system remover.
In incomming data to AttributeFilter has the table about 80 cells, after filtering has table only about 50 cells. What happend that 30 cells dissapear?
Hello,I have been trying to determine why the Geocoder transformer (using OpenStreetMap source) keeps stalling after ~500 features have been processed. Does anyone know if there is a limit that can be processed?Thanks
Hello Everyone, I am looking to convert 2D Lines to 3D Features. I am not looking though to add Height value, what I want to do is take a line and based on an attribute value (diameter: 250mm for example) create a 3D cylindrical version of it. Then I will add elevation values using the 3D Forcer, that I am aware of. I have taken a look at 3D Forcer/Interpolator, SurfaceDraper, etc. but I do not believe they do the trick. Could you please point me to a direction? Thank you for your time. Kind regards, George Floros
I am creating some anonymized data for testing purposes and need to create a fake Land Registry Title Number (found in the UK). These are references such as CU556644 or LAN33445. I can generate the random numbers for it but I need to generate random letters in either combination of 2 or 3 letters or both. Has anyone come across a way of doing this?Thanks
Greetings for the day, I am new with the coding world. I am using Python and IfcOpenShell to work on IFC files. I want to use a command ifc.open but it is not working. I am using Python 2.7. Please help me with this issue. Thank you
Hi, I'm trying to read in a CSV file that has no header information. Additionally the data is spread around several columns rather than in a single line. Looks like the first row is junk.The second is the site name.The third is the site number.Fourth is pressure informationFifth is the date and start time of the data6 onwards is the dataHow do I first create a schema that FME uses before it tries to open the file? I attach a file as an example.Thank you.
Hello,I have multiple segments line for which I would like to add a measure on the starting/ending of each segment. In other words, I would like to create a "fake" LRS where the measure will be computed from some attributes of the feature.I thinking of using python with this logic def addMeasure(feature coord = feature.getAllCoordinates() n=len(coord) mfr=feature.getAttribute('MEASURE_TO') mto=feature.getAttribute('MEASURE_FROM') if mfr!=None and str(mfr)!='': setMeasure(coord[0], mfr) setMeasure(coord[n-1], mfr feature.addCoordinates(coord)where setMeasure should be a python version of the measureSetter Transformer.How should I proceed?
Hi all I am using FME to convert a ESRI File GDB containing building polygons to AutoCAD DWG. Really simple styling and the resulting file looks fine except for one thing - when opening the DWG it opens at THE SAME location as the template file. The template file is overidding the new data. This is not great if I have data in say Manchester and the template file is in London. This is a process I need to batch repeat for multiple locations are the UK - but the resulting DWG will always startup in the London location despite there being no data there. I have not had this problem before with a similar task. (1) Is there a format setting I can utilise to tell the DWG to zoom to data extent on startup? (2) The only styling information I am taking from the Template file is "Visual style - Realistic with no isolines" (creating 3D Polygons) is it possible to set this in FME without the need for a template file. This is a really simple issue that I can't seem to fix and
Something I encountered recently: When I send multiple features into a FeatureReader, I only get one SchemaFeature. I expected one SchemaFeature per initiator feature.As I needed a SchemaFeature per Initiator, I merged them using a FeatureMerger after the FeatureReader. But I keep wondering if this is how it is supposed to work?Thanks!
When the FeatureReader outputs a SchemaFeature, the attribute handling differs from Features. For example, I use the Prefix Initiatior option a lot, but it does not work for SchemaFeatures.Is this how it should work? Thanks.
Hello,How can I replace a line with its corresponding points with a python caller?I tried the following code but it is not working.import fmeimport fmeobjectsclass pointCreate(object): def __init__(self): pass def input(self,feature): if feature.hasGeometry(): coord = feature.getAllCoordinates() cpt = len(coord) #coordSys = feature.getCoordSys() for cpt in range(0,len(coord)): feature.setAttribute('X_e', coord[cpt][0]) feature.setAttribute('Y_e', coord[cpt][1]) feature.setGeometry(fmeobjects.FMEPoint([float(coord[cpt][0]), float(coord[cpt][1])])) #feature.setCoordSys(coordSys) self.pyoutput(feature) def close(self): pass Any ideas,Thanks