Solved

Updating Multipoint Feature on ArcGIS Online

  • 14 December 2022
  • 5 replies
  • 33 views

Hello! 

FME Novice here, running Workbench 2021.1.3.1

I'm trying to update a multipoint feature class in AGOL using FME, but am receiving the following error: 

<class 'fmeobjects.FMEPoint'> cannot be converted to esriGeometryMultipoint

I tried using Aggregator to ensure the points are multipoint but receive this error when I try this method: 

 0.0|ERROR |<class 'fmeobjects.FMEAggregate'> cannot be converted to esriGeometryMultipoint
 0.0|ERROR |ARCGISONLINEFEATURES writer: A fatal error has occurred. Check the logfile above for details

 

Can FME handle multipoint  updates for ArcGIS Online? It has no problem with polylines, so I was hopeful on multipoints. 

Any advice is welcome and appreciated. Thank you in advance! 

 

icon

Best answer by cait.boyer 9 February 2023, 21:55

View original

5 replies

Userlevel 3
Badge +26

I don't have a direct answer, but this has been brought up previously with no solution posted...Error writing multipoint to ArcGIS Online (safe.com). I'm curious about the MultipleGeometrySetter. Could you give that a try instead of the Aggregator?

 

For what it's worth, I setup a test multipoint feature on AGOL. I was able to read in that feature, update an attribute, and then write the updates back using the ArcGISOnline writer. What is the source of your data? Is it AGOL to AGOL?

I don't have a direct answer, but this has been brought up previously with no solution posted...Error writing multipoint to ArcGIS Online (safe.com). I'm curious about the MultipleGeometrySetter. Could you give that a try instead of the Aggregator?

 

For what it's worth, I setup a test multipoint feature on AGOL. I was able to read in that feature, update an attribute, and then write the updates back using the ArcGISOnline writer. What is the source of your data? Is it AGOL to AGOL?

Good morning and thank you for your reply! :) 

 

I tried the MultipleGeometrySetter tool-- passing the "rejected" records (I'm assuming these are the "single point" features within the feature class) results in this error:  

<class 'fmeobjects.FMEPoint'> cannot be converted to esriGeometryMultipoint

While passing the results from the "Aggregate" part of the tool results in this error: 

<class 'fmeobjects.FMEAggregate'> cannot be converted to esriGeometryMultipoint

I've tried writing from my workbench that is making a transformation of a few point classes from an SDE, and I've also tried writing that transformed dataset to the SDE and then using that to write to AGOL, both with no luck. 

 

I'm going to try writing to a local file GDB first-- will update shortly.

Good morning and thank you for your reply! :) 

 

I tried the MultipleGeometrySetter tool-- passing the "rejected" records (I'm assuming these are the "single point" features within the feature class) results in this error:  

<class 'fmeobjects.FMEPoint'> cannot be converted to esriGeometryMultipoint

While passing the results from the "Aggregate" part of the tool results in this error: 

<class 'fmeobjects.FMEAggregate'> cannot be converted to esriGeometryMultipoint

I've tried writing from my workbench that is making a transformation of a few point classes from an SDE, and I've also tried writing that transformed dataset to the SDE and then using that to write to AGOL, both with no luck. 

 

I'm going to try writing to a local file GDB first-- will update shortly.

No luck. Writing to a File GDB as a multipoint feature and then trying to write that feature to AGOL results in this error: 

<class 'fmeobjects.FMEPoint'> cannot be converted to esriGeometryMultipoint

I'm stumped!

Badge +6

What parameters are you using in the aggregator? What group by value? Do all the features going into the aggregator have the same geometry type?

I contacted Safe Support about this issue and feel it is my duty to put the solution here, should any future people find this post. Here is my answer from support:

 

The first error you saw, referencing FMEPoint, suggests that your source data contains some single point features which cannot be written as multipoint. The Esri ArcGIS Online Feature Service writerdoes not support multiple geometries (or a mix of geometries in one feature layer), so would throw that error if there are features other than multipoint in the source data. This writer does, however, support multipoint geometry. 

I think the first step here would be to check on the source data's geometry types, and see if there are any unexpected geometry types therein. I would suggest an AttributeExposer first, perhaps after your reader feature type, to expose the fme_geometry and fme_type attributes of the source data.

Then you could set-up a Tester where you split up your features by geometry. Multipoint geometries have an fme_geometry value of "fme_aggregate" and an fme_type value of "fme_point". If you set-up your Tester to pass features which meet both of those conditions, you should see your multipoint features exiting the "Passed" port, and all other geometry types exiting the "Failed" port. This will let you know whether you have mixed geometry in your source data.

From there, it would be a check on what type of geometry is coming out of the Tester's failed port, and adjusting that geometry such that it is built into multipoint features assuming all failed features are point features. The writer does not like FMEAggregate features, but there is a way to set-up the Aggregator such that it produces multipoint features from single point inputs. I'll explain that process once we confirm that your source data does indeed have single point features. 

You could also give the GeometryFilter a try, though I do not believe this transformer will differentiate between single point and multipoint geometries. I think, in FME 2021, the GeometryFilter still lumped all point-like geometries together. In FME 2022, you can set the GeometryFilter up to detect a much wider variety of geometry types, including multipoints on their own.

(I ran her test and found that my features were a mix of multipoint and points... Replied and received the following back:)

 

How to convert single points into multipoints

First, you'll need to connect the failed port of your Tester to the input port of a Counter transformer. The Counter's sole purpose is to count your features, starting from zero. But the nice thing is it creates an attribute, called _count, to hold each feature's count number, similar to a unique identifier (I use the Counter all the time to create a unique ID field for features). So feature 1 will be assigned a count value of 0, feature 2 a count value of 1, and so on. The default settings for the Counter are ok here.

Now, connect an Aggregator transformer to the output port of the Counter. Here's the key bit. In the Aggregator's parameters, enable Group Processing, and choose to Group By the _count field created by the Counter. Make sure that, under the General section, the Mode is set to Geometry - Assemble One Level. All other Aggregator defaults are fine. Essentially, you're telling FME that each point is a group, which by definition makes it a multipoint feature. This is how we kinda trick FME into turning single points into multipoints.

Finally, run to the Aggregator, and have a look at the output. Make sure you have your 7,359 features coming out. If you only have one feature output, go back into the Aggregator's parameters and make sure you enabled Group Processing and set it to Group By the _count field.

Viewing the Aggregator results in Visual Preview, with the Feature Information window on, will show that the features exiting the Aggregator are now of geometry type IFMEMultipoint. I've circled the new geometry in red in the overview screenshot.

The final step would be to connect the "Passed" output of your Tester and the output of the Aggregator to your Esri ArcGIS Online Feature Service writer and test it out, bringing all of your source features back together.  Overview_with_Aggregator_ResultsAggregatorParameters

 

A truly incredible support experience, fixed my problem right up. Thanks, Natalie!

Reply