Using transformers to modify data.
Recently active
Hello all, I am trying to use a Workspace Python Startup Script and I get the message from the subject line.I am using FME 2017.1 on MacOS. I changed the Python Compatibility to: Python 3.5+ and I also changed the Translation setting Preferences to "Python Preferred Interpreter: FME Python 3.5+".I am not sure if I need to tweak something in the workspace or it has to do with something it cannot find on my Mac. Can anyone please advise on how to fix this little mishap? I appreciate the help!
Hi, my python code below does not work in python 3, I receive a " Unicode-objects must be encoded before hashing" error message. Any tips? import sys, getopt, hashlib, osfrom hashlib import sha1import hmacimport base64import timeimport requestsimport subprocessimport jsonimport fmeimport fmeobjectsimport datetime def calculate_signature(feature): # get input values from feature attributes api_key = FME_MacroValues['API'] host = feature.getAttribute('host') method = feature.getAttribute('method') shared_secret = FME_MacroValues['SharedSecret'] timestamp = feature.getAttribute('timestamp') #timestamp = datetime.datetime.utcnow() url = feature.getAttribute('url') # set access_key #access_key = FME_MacroValues['AccessKey'] access_key = 'A0F66A0E-0CC9-7ABE-24CC-F8807E2829AB' # copied code from calcualte_signature sig_block = "{}\\r\\n{}\\r\\n{}\\r\\n{}\\r\\n{}\\r\\n{}\\
A workspace has an aggregator that is aggregating features using multiple group by attributes. One of the group by attributes is ordered, but the others are not. Any suggestions on how this could be processed so that the ordered feature could be considered, rather than the aggregator holding on to everything?
Hi All,I have a total number of n (points) spatially divided over a given area. I want to group them into x clusters using y members per cluster. This has to be as spatially optimal as possible.So I would like set the following parameters in the transformer:- The number of clusters- The size of the clusters or the min. and max. size of clusterAnyone got any ideas? I already tried working with the cluster modeller, K-means & RClusterCalculatowith no success. Thanks in advance!
HiI am trying to convert attribute values from PascalCase or camelCase to underscore_separated in FME 2018.1. I've tried StringReplacer in "Replace Regular Expression" mode. Text To Replace is [A-Z] and Replacement Text is _\\1. It is matching the text to replace correctly but rather than substituting the capture group it is replacing with literally _\\1 so schoolCode becomes school_\\1ode instead of school_Code.I've also tried to use @ReplaceRegEx(@Value(name),[A-Z],_\\1 ) on an attributecreator with exactly the same result.Everything I can find (including StringReplacer help) suggests that \\1 is the way to do what I want, but I just can't get it to work!Any help would be really appreciated.ThanksTom
My FMETEMP folder keeps growing. I can free up about 1GB by using the purge temporary files feature. However, my entire temp folder is nearly 54GB. Is it safe to manually delete these files? I was thinking they are supposed to go away when I restart the machine, but they seem to stick around.
Hello, I am looking for a transformer that is much like the "merge" function in ArcGIS. I need to be able to merge two polygons that do NOT touch into one feature. It is possible to do this manually in ArcGIS, is there a way to do this in FME? I cannot add area to either of the features in order to do this sort of merge (ie: bridge them together with a small polygon), since area is a sensitive attribute for this feature class. Dissolver did not work! I could only get it to merge polygons that physically touch. Thanks!
I have been given the following python code but get errors every time i try to run it, anyone know what is wrong...import fmeobjects def FeatureProcessor(feature): to_concatenate = ("buildingNumber", "throughfare", "dependantthroughfare") # Modify as needed join_string = "," # Modify as needed result = join_string.join([feature.getAttribute(attr) \\ for attr in to_concatenate if feature.getAttribute(attr)]) feature.setAttribute("CONCATENATED", result)
I get the following message which I do not understand.fme_expression_warnings{0}.message (string): Failed to evaluate expression '@DateTimeCreate(2018,11,5,6,9,14,0)'. Result is set to nullI tried filling the values as string values and converted to @int() and get the same result. Also tried with -0 as the last value.
Hi,I am needing help determining the best way to dissolve all polygons which are ENTIRELY WITHIN another polygon but which also MAY TOUCH THE OUTER BOUNDARY. However, I do not want all of the intersections, just ones entirely within. I am working with one file which seems to be an issue for SpatialFilter as the Candidates and the Filters are the same.I cannot have donuts or multi-part objects. Some dissolving of inner features is acceptable but the idea is to dissolve as many polygons into larger one as possible without creating donuts or multi-parts.Here is a sample of what I am working with: Here is what I hope to achieve (or something similar to reduce the number of polygons already within):The main thing is to help keep it clean while simplifying the geometry.
Hello Everyone, So I am working on some IFCs and this is my workflow: -I am extracting the "Body" geometry of IFCs-I am using the Deaggregator (Flatten 1 level)-I am using the GeometryCoercer to convert to composite surface. So, the input in the Coercer can be show in figure named "Original". The output of the Coercer can be found in figure named "Coerced". It duplicates specific parts and I have noticed that these parts are CSGSolids, while the parts that are properly coerced are BRepSolids. Any ideas on how to tackle this? The reason I am converting to composite surfaces is to convert to CityGML. Thank you for your time. Kind regards, George Floros
I've read about the encryption of FME files (see this topic).I would like to know if it's possible to encrypt FME files (especially *.fmw) with a password from the fme command-line. I tried to run:fme PROTECT ./in_clear.fmw ./out_encrypted.fmwbut i didn't find any password parameter and no prompt either. Use case: batch fmw encryption of a set of workspaces after development work and to deploy.
HelloI am fairly new to using FME.I do however use multiple FME workbenches.I generally access them via Windows Explorer.I'd like to see display page in FME that shows all of my workbenches as shortcuts where I can run each separate workbench from. Effectively click on the the shortcut button and run the workbench.Cheers TravisD
Hello,I have an Excel file that consists of 171 columns. I would like to keep the unique values for every single column.I tried the DuplicateFilter but it returns me the unique values of only the 1st column. This means I would have to repeat the process for 171 times. Do you reckon that Python is a one-way road? I would appreciate your thoughts on this.Thank you for your time.Kind regards,George
Hii want to reproject a DWG with dimensions and write to a new DWG. (RealDWG) I use the CsmapReprojector and the Data Inspector Shows that all coordinates are reprojected, but in the DWG the dimensions remain at the old coordinates. Polygon is projected and written to the new coordinates, as it should be.Does anybody know why? Did i forgot any Option on writing?Template is attached.Workspace is FME 2017.1 but 2018 produces the same result.Thanks
Hi All,Hopefully an easy one. Using the leaflet map option from the HTML report generator. Is there a simple way to position the maps centrally instead of width 100%? Thanks
Hello, I send 2 shapes each containing a fully populated field for each record in an AreaOnAreaOverlayer. I get a shape with the table below.Each of these 2 fields comes from one of the 2 shapes. I do not understand why not all records are filled in for each of the 2 fields ? Thank you
I have depth zones where there are some square-ish polygons that once where covered by depth labels. These labels are no longer used and the square areas have become an eyesore. They are not terribly important so I would like to remove them all together. Please note that there are other areas and donut holes that should not be touched. My question is twofold:* How do I mark only the square-ish areas? (for later deletion)* How do I mark only the square-ish donut holes? (to be closed with donutbuider)
I tried to provide 2 phone numbers separated by a comma but it looks like it just removes the comma resulting in 1 long numeric string - which fails. Also tried with the full +1... in front with comma and space and same thing. It parses out all non-numeric characters/spaces. Is it possible to adapt the transformer to allow CSV?
Hello, i'm new in FME. I don't know how to transform .rvz BIM data into 3d-tiles cesium.js format. I use FME-revit plugin to convert the .rvt to .rvz. Next, I add a reader in FME to read the converted .rvz data(IFC). Then i add a transformer(writer) to write the data into CESIUM3DTILES format. But the translation failed.
Hi, I am trying to get the footprint of multiple rasters that are stored in the same directory.I am using a Directory and File Path names to read the directory and the RasterExtentsCoercer transformer to generate a shapefile with all of them.But only works when the reader is a single raster.Any idea? Thank you
hi, i read some question from other user. But i don´t read what i need.from to xml i create vertex and i don´t know what i do to create the raster. i use "imageRasterizer" but i have a error and no create it. is the log file.
I am trying to use the SQLExecuter to identify records from an archived ArcSDE database where the ID does not exist in another table by utilizing the _matched_records output. My SQL Statement is this:Select SCRD_ID from gis.STREET_CENTERLINE where SCRD_ID = '@Value(SCRD_ID)'I know that SCRD_ID: 3745 does not exist in the STREET_CENTERLINE table, but because this data is archived it is coming back with a _matched_record count of 2 instead of 0Does anyone know how to only read/query the CURRENT data from the ArcSDE database?
Hi everyone,Here a newbie queston. I want to duplicate a shapefile 18 times (instead of manually duplicating the shapefile) and then attach information from 18 tables to those shapefiles based on the key value: NamePark. I tried the Cloner, however then instead I got a shapefile with so many features, so I was wondering what to do insteadSo basically I have two questions:1) Is there a transformer available to copy/duplicate a shapefile X times2) How can I join the tables to the shapefiles based on a key value. I looked at featurmerger, but I cant find the key values. I have attached an image of my current workflow
I am using FME Workbench 2018.1.0.1 in Windows 10. I am inputting a kmz file. The only parameter I am reading from it is PLACEMARK because I see no reason to read the others. I need to copy format attributes kml_name and kml_description to NAME and CAPACITY, respectively. I don't see in the AttributeCopier transformer where I can do this. Its Import Wizard does not seem to be made to do this