Skip to main content
Hello,

 

 

We have created a custom transformer that performs a pair association to base input points, within a distance tolerance specified in a published parameter.

 

It's not too complex - makes use of attribute exposer, reprojectors, concatenators and neighbour (pair) finders. 

 

The output pair names are published parameters that are the datatype of the base points, concatenated with "1" and "2".

 

eg

 

OBS_CODE1

 

OBS_CODE2

 

When we run the workspace, as it processes the base features it seems to want to convert one of the string values into a float/integer.

 

The value it is trying to convert (CONTENTID) is Data Type 'char'. There is no need to convert the value because they are all alphanumeric values. I have a feeling that the problem lies in the concatenating of the CONTENTID to create the output pair names, but I'm not sure.

 

 

Any ideas why it is attempting this unnecesssary conversion? 

 

This workspace is processing ~50 000 features and the logger throws up multiple error messages for each feature:

 

 

2013-03-15 09:40:19|1995.5|  0.0|STATS |DataAssociationPair_4_NeighborPairFinder_2_FirstProx(ProximityFactory): Output Summary: 52717 matched feature(s), 16385 unmatched base feature(s) 2013-03-15 09:40:19|1995.5|  0.0|INFORM|Processing base feature(s)... 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into an integer (.\\stfutil.cpp:816) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into a float (.\\stfutil.cpp:405) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into an integer (.\\stfutil.cpp:816) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into a float (.\\stfutil.cpp:405) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into an integer (.\\stfutil.cpp:816) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into a float (.\\stfutil.cpp:405) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into an integer (.\\stfutil.cpp:816) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into a float (.\\stfutil.cpp:405) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into an integer (.\\stfutil.cpp:816) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into a float (.\\stfutil.cpp:405) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into an integer (.\\stfutil.cpp:816) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into a float (.\\stfutil.cpp:405) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into an integer (.\\stfutil.cpp:816) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into a float (.\\stfutil.cpp:405) 2013-03-15 09:40:19|1995.5|  0.0|ERROR |BADNEWS: String value `KMCO' contains invalid characters and could not be converted into an integer (.\\stfutil.cpp:816)

 

 

Thanks for any suggestions.

 

Hi,

 

 

it's difficult to be specific when we don't know the details of your workspace, but it might be that you're referencing an attribute in a way that makes FME want to treat it like an integer. A typical example would be to try and perform a mathematical operation on your attribute, using an ExpressionEvaluator.

 

 

You could consider inserting an AttributeClassifier to check if the attribute is an integer and perhaps set a suitable default value if that is not the case. That way you should be able to prevent filling your log with these messages.

 

 

Hope this helps.

 

 

David
Hi,

 

 

I second David's approach to classify the attribute, next to that I would fan out the attribute in question, based on the attribute value and direct it to a visualizer, to find out if all the values are nubmers.

 

 

Also the StringFormatter can be worth a try, but if you have invalid values it will also return an error (which can help debugging e.i non numeric values).

 

Itay

Hi

 

You don't say, but how do you know there is a problem?

 

 

The BADNEWS (debugging) logging is something I wouldn't turn on unless I already knew there was a problem and I wanted more info on what that problem was.

 

 

If BADNEWS is the only indication of an issue then I would not be overly concerned. It often logs messages that FME is catching and interpreting for its own use. In this case FME could just be trying to identify what is a valid field type for the attribute based on trying different conversions.

 

 

Hope this is of use (albeit a little late)

 

 

Regards

 

 

Mark
Hi, 

 

 

I don't have debuging logging turned on. I should clarify: these BADNEWS messages are not being written to the log, they are just showing up in the log window while the workspace is running.

 

I know that having the log window open during running workspace can add a measurable amount of time to the process. I was just trying to figure out if the workspace would run any quicker if I could disable these warnings, or prefereably, find the source of them and see if I could eliminate them.

 

Sounds like it may not be an actual problem however.

 

 

Thanks for the suggestions.

 

Paul

Reply