Select to view content in your preferred language

Writing features to a feature class by a batch process

1692
12
Jump to solution
10-22-2024 02:53 PM
TyroneLigon1
Regular Contributor

I apologize in advance that I can't post any of our code. We have an add-in that manages the display of a couple of WMS services. A feature of the add-in is the ability to export the displayed points to a feature class. We accomplish this by running a WFS request; it returns a GeoJSON list of features, which we then write to a new feature class.

The issue is that the user might have tens of thousands of points on the map, and in some cases over 100,000 features. The add-in iterates through this list and adds the features to the feature class one at a time. In the test I ran, it took almost 3 minutes to write about 14,000 features. We were wondering if there's a batch write method somewhere in the SDK, or maybe we incorporate a Python script to do the feature writing.

0 Kudos
12 Replies
Aashis
by Esri Contributor
Esri Contributor

@TyroneLigon1 , The Insert Cursor API should be used for your level of bulk insertion; it is designed to insert faster rows in the Pro SDK.

0 Kudos
TyroneLigon1
Regular Contributor

I got pulled away for a couple of days. I'll give this a shot.

0 Kudos
TyroneLigon1
Regular Contributor

I went with the "Insert Cursor" solution. My testing indicates that our batch exports now run between 2 and 4.5 times faster.