Using transformers to modify data.
Recently active
Hello group! I've been trying to replace a string with StringReplacer, if the text line contains certain text. So basically it's a classic ifthen conditional in regex, though I'm new to conditional tests in regex.My text string is:#1=IFCCARTESIANPOINT((1,1));If the text string contains IFCCARTESIANPOINT then search for ));.I tried syntax (?(A)X), If A then X, thus my regex:(?(IFCCARTESIANPOINT)[)][)];) but it doesn't work at all.I'd very much appreciate help :)
I have two GeoTIFF rasters. A & B.Each Raster has a different amount of rows and columns. Geographically they are of the same location.Both Rasters are in the same projection.What I want to do is grab the cell values of Raster A and add to them the value that is at the same geo location in raster B.I had hoped RasterExpressionEvaluator or RasterCellValueCalculator would help but seeing the Rasters have different row and column counts it errors.Any advice would be great, thanks :)
I've gotten the basic fmear samples to work, and I've had good luck building an fmear output from 2d ArcGIS features from a file geodatabase.Now I've got a kml export from PLS-CADD that a colleague gave me. It's already 3d, and I'm not sure how to go about preparing it for export to FMEAR. If I drag it into ArcGIS Pro, it definitely renders in 3d. Anyone got any tips?My colleague also output the data as xml but I don't have an xsd so I can't make much sense of it.
Just for information sharing and if anyone has any ideas to improve, the following shutdown python script creates a password protected zip file that works with the FME Server download service.This use s 7za.exe located in the Resource Data area. import subprocessimport osDirectoryToZip = r'$(FME_SERVER_DEST_DIR)'outzipfilename = (os.path.splitext(r'$(FME_SERVER_DEST_DIR)')[0])+'_z.zip'ZipPass = str(FME_MacroValues['ZipPass'])subprocess.call([r"$(FME_SHAREDRESOURCE_DATA)/7za.exe",'a', outzipfilename, DirectoryToZip ,'-mx9','-p'+ZipPass], stdin=None, stdout=None, stderr=None, shell=False)os.remove(DirectoryToZip)os.rename(outzipfilename, DirectoryToZip)
I am pretty new with FME and I love it.There is so many testers and transformers that I am a bit lost sometimes.Anybody has an idea how to clip a raster 100 meters outside the boundaries of a polygon ?Thank you :)Mathieu.
Hi FMErs,I have a 3D point dataset containing many other numeric attributes.The dataset has been successfully written out to 3D point shape file with a feature writer.In parallel with the shape feature writer, attempted to write out and test FME AR.Both the shape file and fmear file appear in the inspection window OK, and are created and appear on the local disk.When using the FME AR app on iOS, the app connects to the fmear file, but nothing appears in the viewing window. To test the iOS, app, and the datasource, I used the example file and workspace, which correctly renders a surface and overlain image in FME AR app OK. So question is, do the 3D points need some sort of default appearance / styling in order to render in the app? What if the points have no appearance set ? What is the default - White or transparent maybe?Or is there some other requirement in order to render 3D points in the app correctly?Ideally, for an impressive visualisation, maybe to extrude the points by a numer
I need to change the order in which features are sent out of an AttributeFilter, because they eventually get set to SQLExecutors which will fail if not processed in the right order (due to database constraints). I have seen questions & answers regarding the port order of custom transformers, but is there a way to control the order in which the features will leave an AttributeFilter? The image shows the situation - the features seem to come out of the InterFeatureLink port first, but they actually have to wait until the features from the RoundPipe port have exited and been executed on the database.
Hi Everyone, I having some issues using a GeoJSON file in a spatial filter or clipper. When I inspect the layer, as well as the other layer I'm comparing it to, they clearly overlap and I have made sure that the coordinate systems are set correctly. Is there a reason why GeoJSON would not work for these spatial transformers? I have used the transformers before multiple times but have never worked with the GeoJSON format. I have attached a file which includes a simple workspace showing the issue as well as the 2 source file (which have been made as anonymous as possible). There are 2 files included:Area 1: A shape file which was created from an Esri GeodatabaseArea 2: A Shape file created from a GeoJSON file (the original file can be shared if necessary) I would really appreciate any help with this.Thanks in advance!
Hi guys, I have an integer attribute containing all node_ids. I need to split those ids apart. The number of integers for all ids is similar (e.g. 7 integers). I came to this attribute by extracting the ids of the child nodes from a json file. I used this expresion (json["data"][*]["id"]), I used the * here because I have so many ids and I need them all. The result is one attribute with all node ids without any seperation between them (which i could have used to split them). So, the result e.g. is as following (72523657255486725577872521357256895). I know that I can use the attribute splitter to seperate them as the following picture but I need to be able to split them using some kind of expersion which split each 7 integers at once because I might have handreds of ids and it is not practical to keep counting them and then use 7s equivalent to their number. Therefore, my question is: Is there a way to add a comma or semicolon between the node ids when I extract them
I currently have JSON objects that are returning in FME very well. During the migration there are approx. 1,500 updates that need to be ran changing coded values to a description for storage in a data warehouse. This can be accomplished running an update that is prepopulated then passed to the "Update" port on the updater.replace(xs:string($x(fme:get-attribute("FIELD_NAME"))),xs:string(fme:get-attribute("code")),fme:get-attribute("name"))The issue is running 1,500 updates on 2,000 records takes 12+ minutes. The question is, is there a way to get the JSON Updater to updated multiple replacements at the same time. I have attempted to use the JSON Node updates and get errors.Attached is a simplified version where I am attempting to change json["features"]["attributes"]/ASSETGROUP from 1,2,3,4 to One, Two, Three, Four where there is a match. Thanks in advanced!!
I'm trying to count the vertices on line segments. The data is a .GDB and has complex line segments that contain fillets and arcs. The VertexCounter is calculating an incorrect number of vertices for line segments that contain arcs. Is there a work-around for these more complex line segments?
I just ran a workspace in Workbench 2019 to analyse software concurrent usage data. Basically the dataset contains a feature for each instance a user fires up a piece of software and includes a start and end time. The dataset only covers 4 or so weeks and has 55,466 features...not huge by any means.To solve this problem I plotted points for each start time and lines by using the end time as the 2nd coordinate (y=0, X1=Start, X2=End). Essentially this produces a Gantt chart with all lines and points on the X axis. Then I use the PointOnLineOverlayer to find how many lines lie under each start point, which gives the number of users at each point in time. Sorting for that count then gives the maximum concurrent usage.The problem however is that this transformer splits each line by the point above it FIRST, before it processes the points output. So I ended up with 31,829,560 new line features that I really don't need! As a consequence, it took 5 hours & 14 minutes to run the worksp
I want to read a file from trimble connect. Let me know how to call trimble connect path in reader
I' am reading a csv file and all attributes have the type char. If i connect an inspector it automatically converts some values to date-time. Can i disable that? I want to see the original, not converted data,
Hello FME community, please forgive me if this is a trivial question. I am quite a beginner with FME.I have a line shapefile containing streets. Each street presented with more than one line (Lines Group) and each lines group belong to the same KEY and NAME as shown in figure one.The problem is that, for each street I need to keep the line near to center (center of group) and remove other lines as shown in figure two. My initial idea was to create a Bounding Box for each lines group (each street) then creates a Center Point for each Bounding Box. Later on to match each group lines with their center point, and then remove the duplicates with keeping the line near to center.I am stuck on exactly how I would remove the duplicate with keeping the line near to center? And how I match each group lines with their center point?For creation of Bounding Box I used (Aggregator Transformer - Group By: key and name >> BoundingBoxReplacer – 2D Oriented) .For creation of Center Point I used
I have a geotiff (sentinel-1 SAR) that i can view correctly in ArcGIS. It shows in ArcGIS properties as being GCS_WGS_1984. If I read it in FME and write to another tiff it is also fine. But within FME it seems to lose the geographic contect and switches to Coordinate system: unknown and in the inspector displays as if the pixel values are geographic coordinates. This means that I cannot perform any geographic operations on it (I plan to use rasterextentcoecer and mapnik). Is this an issue with my reader, or can I reintroduce the location? The tiff has no world file so I dont actually understand where the georeferencing is stored - but arcgis can read it.
I have multiple spreadsheets that are emailed to a specific address and stored to a file folder. All of these sheets will contain slightly different headers, however, every spreadsheet will at least have a common identification attribute.Is there a way I can build a workbench to read through all of these excel files to search and extract this ID number from all excel files? Thanks in advance for your suggestions!
I am working on a project were I'm dividing a list of addresses into 18 zones. It is very similar to the Garbage zones exercise in the FME Basic course and I have used part of that work space to create the work space I'm using for this project.Its point data to polygon data, but the issues is at the end of my work space, the final result has a ton of large gaps between the polygons, and I'm not sure how to fix that.Is there a way to snap the edges of the polygons to another data set of lines, like a road layer? I should specify I have tried to use the AreaGapAndOverlapCleaner, as well as the combination used in the FME Basic Training of AreaOnAreaOverlayer to PointOnAreaOverlayer to ListHistogramer to Dissolver. It may be that the AreaGapAndOverlapCleaner does not have the correct parameters set, and that is why its not working
I'm working with two sets of data with nearly identical, but not quite matching, IDs. Ideally I'd like to join together rows where:|requester_id - supplier_id| < 0.1Is there any way within FME to accomplish this? Only way I can think of is to do a cartesian join and filter the results, but for this data the cartesian join would result in billions of rows and I'd like to avoid that.
I have sqlcreator which has simplest ever query which selects all fields from a geodatabase table. The SQLCreator does give out the result in an inspector but at the same time throws the following errors.What am I doing wrong here?FME Desktop: 2018.0.1.1
Dear FMExperts,I am using the AreaGapAndOverlapCleaner transformer to find geometric issues within a polygon dataset. I can output a list of all the features affected, but what I would really like to achieve is to produce a list of each instance where a geometric error has been discovered, what the issue is, plus the coordinates for the location.So something like this for each found error:FEATURE_IDISSUEXY123Gap123654244440124Gap123887249486124Overlap6454772757154 TIA,R
Hi, very new to FME so I'm sure there's probably a very easy fix for this but I can't seem to find one anywhere. I have an XML file I'm trying to read, and one of the attributes has a one-to-many relationship with the parent feature. When reading in the XML, the data for this attribute will be read in when only one instance of the attribute occurs. Where multiple instance of the attribute occurs, the field is missing. Example below: The attribute <Activity> is read successfully for instances like this in the XML file:<FacilityReport><NationalID>Example1</NationalID><Activity><RankingNumeric>1</RankingNumeric><ActivityCode>5.(b)</ActivityCode></Activity></FacilityReport> But <Activity> will be missing for instances like this:<FacilityReport><NationalID>Example2</NationalID><Activity><RankingNumeric>1</RankingNumeric><ActivityCode>5.(b)</ActivityCode><
Hi all, I used views in SQL Server Spatial as source dataset/format in FME. Inside the views I created geometry column. Now, I need to make Stored Procedure instead of view. My question is: What are differences by using SQLCreator as "Reader" instead of real Reader? What about performance and so on? Is there some better solution or?
Hello,This question is primarily caused by this being my first python class implementation in FME. The basic question is? How do I output a new set of features while not outputting the original ones? Details below:I am reading in a set of features to a python caller -class-appending them to a dictionary which in turn is converted to a pandas dataframe for analysis on the set of dataIssue: I have been having trouble outputting the new data in the way I want to:What I wanted to do was "drop" the original input fme features and create a new set of features with the new values based on the dataframe. I wanted to do this as I thought it would be quicker than matching the new values to the original input featureThe issue is shown in the last loop of the code where newFeature = fmeobjects.FMEFeature() is used to create a new feature and assign attribute values, but in the end I am calling self.pyoutput(newFeature) which I believe is referring to the object created from the input featuresHow c
I am going to make CAD into 3D models ,and I encountered some problems in this process.The original data file geojson (pre-transformed DWG into geojson file), fmw has been uploaded, and the WALL layer is taken as an example.The original data screenshots are as follows:Problems encountered:1. For the first attempt, the “Build Internal Edges (Advanced)” parameter in AreaBuilder is set to Yes, and “Snapping Type: Vertex Snapping && Snapping Tolerance: 0.01e” is set. Although all the Features are not lost, there are still some features ,which was no build, and some area with duplicate edges !Why is the "Build Internal Edges (Advanced)" parameter set, but it does not work? Why some area with duplicate edges ? 2. For the second attempt, use GeometryCoercer/TopologyBuilder to convert all the areas into lines, then overlap all the lines, then build the areas with AreaBuilder. The results show that some features in the OutputPort of AreaBuilder are missing, as shown in the