Using transformers to modify data.
Recently active
I have a Geopackage with lots of tables and would like to speed things up by only reading the needed tables for later processing. The 'Where' field only applies to table content, I want to filter on table names. I would like to use a wildcard to import layers containing a certain string. ExampleIn a dataset all hydrographic layers might contain the string 'hydro'I would like to use sql to only import these layers by using something similar to 'LIKE %hydro%' edited by including an example Edit 2: I realise I made a huge, and embarrassing, typo. The file I am working with is a geopackage, not a gml... *facepalm*
Dear, I have a workspace that reads a in a postgis database with an SQLExecutor. It all runs smooth. However I want to make my workspace generic, so that it can use other input data from different databases/schemas in the future. That is why I put everything to read in user parameters. That being said I encountered the following problem. My workspace runs fine with the original data. However when I change the name of the schema of my input data, and I change it in the SQL executor accordingly, I get the following error: 'Error executing SQL command ('select version(), postgis_version()'): 'ERROR: function postgis_version() does not exist' When I try to read in the schema with the changed name with a PostgreSQL reader, it works just fine. However this is not desired, since my data contains geometry. Does somebody has any clue what can be the cause for this? Attached you can find the logfile and some screenshots. I tried running it both on the 2021 version of FME d
I am using NeighborFinder to find adjacent horizontal (or vertical) lines. I create a list and the transformer automatically supplies the angle value for each item. I want to remove any list item which does not have an angle value of 90 or 270.The ListElementFilter has been very helpful, but it seems to only filter one value at a time. I also tried AttributeManager to conditionally change the list{}_angle value to 90 when it finds 270, but no luck there.Would this be a Python situation?Any help is appreciated.
I like to use the PDF2TextReader_custom transformer to convert pdf files to text files in FME 2022. I downloaded the pdftotext application(v. 4.04) from XpdfReader and followed the installation instructions. Trying to run the transformer it gives the error 'Error opening pdf file'. Using the command-line executor of windows I'm able to convert the pdf to text(including a xpdfrc-configuration file in the same directory as the pdftotext-file, as advised by XpdfReader). My question, what can be wrong when I use the FME-transformer?
I have some data that I have run through the statistics transformer in the format shown below i.e. ID, Year, Count I want to create a chart but need to include the years that have a zero value in a five year period i.e. 2015 to 2019. How do I manipulate the data to add in the missing years with a zero value? Any assistance would be greatly appreciated.
I am trying to merge two TIF files using the RasterMosaicker, but for some reason all it writes is the first file, not the merged files. Can't figure out what I'm doing wrong. I have not uploaded the TIF files because they are 380MB each, but anyone wanting to test it can access them at https://drive.google.com/drive/folders/1T_lRY4zRAJDSOYRAaqic4bHLwoe4VGfT?usp=sharing.
I want to take the results of a SQL expression (SQL Executor) that returns a format like:POLYGON((2861292.56247401 15394288.32744411,2861296.63792518 15394295.48523819,2861287.86169601 15394300.48260353,2861283.78591676 15394293.32480944,2861292.56247401 15394288.32744411))and generate an fme polygon object without first writing the geometry json to a file. I have looked at FeatureReader and ESRI JSON reader. Looks like the variable passed is expected to be a file. The issue I have is the new ArcSDE Geodb reader reads Esri Annotation geometry as a point. The annotation geometry type is stored as polygon. I need to get the polygon like I had before with the Esri Legacy Reader.
is there a way to replicate sde. default database and store it in the folder? also for recurring backups or replication of the database would not be overwritten and saved into a different folder with a different name. Please let me know if I can accomplish this in FME. Thank you,Sarah
Hi,I'm looking to see if I can retrieve all tables with the same prefix and then save the table content with a dynamic writer in shape format. For this I start with a SQLCreator with the query:select TABLE_NAME GV_TABLEfrom colswhere TABLE_NAME like 'AB$_%' escape '$'and TABLE_NAME in( select object_name from user_objects where object_type = 'TABLE') The result is then picked up in a SQLExecutor:select *from @Value(GV_TABLE) Attributes to Expose is left empty in the SQLExecuter. The result of the SQLExecuter looks like empty records but if you look with Visual Preview the attributes per table are present. With a dynamic writer I try to write to a shape file per table. The writer does not write anything. So is it possible to make the attributes visible after the SQLexecuter? Attributeexposer does not have a *.* wildcard.
I am trying to read this wms-service/url using the featurereader (espg 3857): https://geoservices.knmi.nl/adaguc-server?DATASET=RADAR&SERVICE=WMS&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=RAD_NL25_PCP_CM&WIDTH=1131&HEIGHT=489&CRS=EPSG%3A3857&BBOX=-199509.20245398767,6500000,1419509.2024539877,7200000&STYLES=radar%2Fnearest&FORMAT=image/png&TRANSPARENT=TRUE&&time=2022-01-05T14%3A40%3A00Z Somehow this gives me the wrong return, what's more: If I change the date/time the result stays the same, which should not happen Using the exact same url in the httpcaller and saving it as a .png gives me the proper result (but i dont want to be saving files). Any clue what i might be doing wrong?
Hi, Is it possible to supress certain warnings in the translation log?For example, when i use a Oracle spatial reader with 2 or more geometry columns I use the parameter "Spatial Column : GEOMETRY1". In the translation log I get: Column `GEOMETRY1' of table `A_TEST' has been chosen to hold the geometry. I would like to remove such warnings in from the log.
I am using the http-caller to upload attachments to a arcgis portal via the addAttachment in the Rest API. It works fine to upload but the image does not behave in the same way as when I make the post with postman. The attachment link in the portal downloads the image instead of showing it in the browser. This is not the case with Postman. Any help appreciated
Hey, I am trying to modify https://community.safe.com/s/article/data-distribution-fme-server-app the data distribution demo script. I am attempting to download 5 different shape files (points, polygons and lines) all with varying attributes. I have the script working and downloading with the exception of the attributes specific to each feature class. Every attribute is blown away. If I change the user attributes to automatic for the output feature class it sort of works except its merging all the attributes together and showing them in every feature class. Ideally I just want to download the 5 shapes and retain their unique attributes. Seems I can either output the shapes with no attributes or output the shapes with attributes from other feature classes merged into it. Right now im running them through their own clipper into a copy paste of the feature output which would mean doing that for every single layer i want to download. Just want to make sure theres no better way of doing this
Hello, Is there a way to automatically detect datatime fields from a reader reading many tables (at least 2k) and convert them to a different format?
Since our migration from FME Desktop+Server 2020 to the following versions, it is not possible to guarantee the order of execution for our readers. With the first reader and its transformer I want to download three zips. With the second reader I read those zips, extract them and export them to a database. With FME 2020 this worked fine. With FME 2021 and 2022 it seems that the reader order in the navigator pane is not recognized. Any idea? Thanks in advance!
The usage notes in ProjectWiseWSGConnector states:The FeatureReader can access ProjectWise directly (without using the ProjectWiseWSGConnector), however, a local copy of the dataset will not be created. But how is this done? Thanks in advance.
I have an OS mastermap GML data file. I have multiple <osgb:changeHistory> tags for one particular featureID. Which is as below: <osgb:changeHistory><osgb:changeDate>1998-07-03</osgb:changeDate><osgb:reasonForChange>Modified</osgb:reasonForChange></osgb:changeHistory><osgb:changeHistory><osgb:changeDate>1998-07-03</osgb:changeDate><osgb:reasonForChange>Reclassified</osgb:reasonForChange></osgb:changeHistory><osgb:changeHistory><osgb:changeDate>2002-08-12</osgb:changeDate><osgb:reasonForChange>Attributes</osgb:reasonForChange></osgb:changeHistory><osgb:changeHistory><osgb:changeDate>2003-10-14</osgb:changeDate><osgb:reasonForChange>Position</osgb:reasonForChange></osgb:changeHistory> I am trying to read all <osgb:changeHistory> nodes and write them in PostGIS database as below (I did it with GDAL):Here, I want to count the number of
Hi,This isn't so much a question as pointing out a minor issue.The WorkspaceRunner transformer (FME 2022.1.2) doesn't allow the user to select an attribute value for the value of a parameter in the workspace to be called if that parameter is in a group:
From original source data, I already have created four corner points (in red) with correct XYZ values. I just need to connect these points and create polygons at vertical plane which will vertically intersect existing gray polygon at XY plane. Any suggestion ? Thanks.
could you please take a look at this question, if you have any idea how to solve it we are taking a picture every 5 m, we found some duplicated area taken more than once how could we keep all coverage without the duplicate point, the sample data show only a few features we are running this on millions of features thanks https://community.safe.com/s/feed/0D54Q00009ltB8eSAE
Hey - I'm using a python caller to execute this script (shortened version of original script): --------------------------------------------------------------------------------------------------------- import fmeimport fmeobjectsclass FeatureProcessor(object): def __init__(self): self.Types = [] self.features = [] def input(self, feature): if feature.getAttribute('_is_ftr_type'): self.Types.append(feature.getAttribute('Feature_Type')) else: self.features.append(feature) def close(self): # Create and output a Schema Feature schema = fmeobjects.FMEFeature() schema.setAttribute('fme_schema_handling', 'schema_only') # indicates it's a schema feature schema.setAttribute('fme_feature_type_name', 'MySchema') # schema definition name schema.setAttribute('fme_geometry{0}', 'fme_area') # geometry type definition schema.setAttribute('attribute{0}.name', '
I have 3 counters in my workspace. And I want them to produce a single count. The documentation says : "When multiple Counters have the same name and Count Scope is Global, they produce a single count." In my workspace the Scope of the Counter is set to Global but, I cannot figure it out how to write the same name for the three counters! When trying to write the same name for the counter transformers, FME (2021.1) automatically changes the names to Counter_2, Counter_3, Counter_X .... so I'm not getting a unique count for my workspace, what I have is three different counts starting from 0. This is a basic question, Is the name of the transformer what I have to change to get a unique count? I'm sure I'm missing something and maybe someone can help me with this. Thanks!
Hi there,I have a database containing a BUILDING table which is related to a BUILDING_FUNCTION table.A building can have 0-n functions associated to it (i.e. Schools, Public buildings, etc).But it's more complicated than that. The functions are timely (Origin, Intermediary, Present)And there are three levels of details in the functions (I-basic, II-medium, III-detail) Here is an example simplied dataset for only one building, number 14...I need to denormalize this table to get only one entry per building.Here is the desired result. Note that in INTERMEDIARY functions, there are two functions listed. This is due to the fact that the a building can have more than one set of functions for each timely period. In the example above, where the TIME attribute has "2 Intermediary", you have two sets of basic-medium-detail FUNCTION_LEVEL. I'm joining an excel spreadsheet as sample data.Thanks a ton in advance for your help ! PS. This is somewhat related to my previous post but
Hello everyone, I have a question with regard to preserving the pattern style of hatches in DWG files. I have a simple DWG file with two lines (blue), one text (yellow), a dimension (magenta), and a polygon (blue) which is filled with a hatch (cyan): If I now simply read the DWG file with a REALDWG reader and do nothing but write it again with the REALDWG writer, the hatching pattern looks very different in the result - which is basically because the lines of the hatching pattern are much closer together than they were in the original DWG file:More details below. Does anyone know how I need to parameterize reader and/or writer such that the pattern style of the hatch is preserved 1:1? In the REALDWG reader, I already linked the read-in DWG file as a "Template File". This helped to preserve the styling of the dimension but unfortunately not with regard to the pattern style of the hatch. Here some more details:Regarding the parameterization of the REALDWG reader, I only unch