|
POST
|
Just to be clear. What made the big difference in performance for me were two things: 1. I reverted my target feature classes to core Esri objects. They had inadvertently been left defined as custom object classes as required by the ArcFM application. 2. Made use of a FeatureBuffer and InsertCursor to create the new features. I flush the buffer after each 2,000 features. With these two changes the process that completes in 4 minutes for 120,000 features in a File Geodatabase completes in (about) 4 minutes in the Oracle database. Thanks again for the responses. Ed
... View more
02-13-2014
04:43 AM
|
0
|
0
|
1556
|
|
POST
|
A file gdb will almost always outperform an entreprise gdb. The model is much, much simpler, you are just writing to a file on your hard drive. As long as on-access scanner isn't killing the performance it will be much faster. For the code side, I would consider not using an edit session or at least not use an edit operation if you can get away with it. The option to turn off the undo/redo doesn't always work (Note that the supression of undo/redo logging is not supported for remote database workspaces.) I would consider using an insert cursor and calling flush every so many records (100? something to experiment with.) CreateFeature for sure will create an objectId for each call when it is called so, right there sql statements are being generated one at the time... I suggest you look at the following link and avoid creating the features one by one. There are more direct ways of doing this. If you need to process the data, you can do that in the fgdb and then load. http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000003rp000000 From the database side, a lot can be done tweak the performance. The trick is to know what is holding you up. Do you have versioning? How big is the user temp space? What is going on with the roll back log? Do you have replication? These are some of the many things you need to master to get performance out of your database. A good orace DBA can be invaluable in figuring out performance on the Oracle side. You can also consider using spatial SQL to insert the features directly through the SQL geodatabase API http://resources.arcgis.com/en/help/main/10.1/index.html#//006z00000008000000 I have also dabbled in exporting recordsets into XML and importing them as a new featureclass in Oracle, maybe that can work for you. Variable size sample sets, some good metrics and some experimentation, I think you will find an efficient way of doing this. Alexander - Thanks very much for your comments and suggestions. While investigating some of the options you put forth I had a breakthrough. I tried to use the ArcCatalog simple data load and found it to fail. At that point I realized my classes were registered for use with the ArcFM software -- custom GeoObjects. I unregistered the classes and found performance improve dramatically. I'm not quite at the speed of the FGDB -- but pretty close to it. Thanks again - you pointed me in the right direction! Ed
... View more
02-12-2014
12:35 PM
|
0
|
0
|
1556
|
|
POST
|
Using IFeature.Store is the slowest way to save changes to a gdb if you're making large numbers of edits. Instead, use IFeatureclass.Update to get an update cursor and call IFeatureCursor.UpdateFeature where you would normally call Store. For creating new features, use IFeatureClass.Insert to get the cursor and IFeatureCursor.InsertFeature. Also, before you start, place the feature classes you're writing to into LoadOnly mode using IFeatureClassLoad. Take them out of LoadOnly mode when you're done. Neil - Thanks for the reply. As my post says, I'm not using IFeature.Store. I've tried using an insert cursor, as well as WriteFeature and WriteFeatures from the IFeatureClassWrite interface. All are equally slow. My example also shows that I'm using LoadOnly mode. Forgot to mention that I've removed all indexes from the target class -- except that for ObjectID. And I've remove all relationships. The target is also a simple point feature class - no network or topology defined. Ed
... View more
02-12-2014
10:49 AM
|
0
|
0
|
1556
|
|
POST
|
Hello ??? I???ve got a process that???s built in C# using ArcObjects v10.1 that reads data from a feature class in a source File Geodatabase, applies updates to attributes and sometimes the shape, and writes a new feature to a target feature class in another File geodatabase. This works fine. As a typical example in one case it reads and writes about 120,000 features in 4 minutes. Now I need to update the process to write to an Oracle SDE instance. Overall it works, its just much slower. For example, the process that took 4 minutes to process 120,000 records in an FGDB takes 18 minutes in Oracle. This alone would be OK. My issue is that I???ve got some processes that take hours in the FGDB. As part of the updates for Oracle I???ve switched to use of IFeatureClassWrite::Write instead of IFeature::Store that I was using in the FGDB. My understanding is that the FeatureClassWrite doesn't trigger events like Store. However this doesn???t seem to make much difference. Here???s an overview of what the process does. // Get the target workspace IWorkspace targetWorkspace = workspaceFactory.OpenFromFile(connectionString, 0); IWorkpaceEdit workspaceEdit = (IWorkspaceEdit) targetWorkspace; // Start editing workspaceEdit.StartEditing(false); workspaceEdit.StartEditOperation(); // Open the source and target feature classes IFeatureWorkspace sourceFeaWorkspace = (IFeatureWorkspace) sourceWorkspace; IFeatureClass sourceClass = sourceFeaWorkspace.OpenFeatureClass(sourceClassName); IFeatureWorkspace feaWorkspace = (IFeatureWorkspace) targetWorkspace; IFeatureClass targetClass = feaWorkspace.OpenFeatureClass(targetClassName); IFeatureClassWrite fcWrite = (IFeatureClassWrite) targetClass; // Put the target class in load-only mode and apply a schema lock IFeatureClassLoad fcLoad = (IFeatureClassLoad) targetClass; ISchemaLock schemaLock = (ISchemaLock) targetClass; schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock); fcLoad.LoadOnlyMode = true; // Read from the source and write to the target IFeature targetFea = null; IQueryFilter queryFilter = new QueryFilter(); IFeatureCursor feaCur = sourceClass.Search(queryFilter,true); IFeature sourceFea = feaCur.Next(); while (sourceFea != null) { [INDENT]targetFea = targetClass.CreateFeature(); // Update the shape and attributes // Store the target feature fcWrite.WriteFeature(targetFea); sourceFea = feaCur.Next(); [/INDENT] } // Stop editing and release lock workspaceEdit.StopEditing(true); schemaLock.ChangeSchemaLock(esriSchemaLock.esriSharedSchemaLock); fcLoad.LoadOnlyMode = false; I???ve also tried grouping features into an ISet and using IFeatureClassWrite::WriteFeatures. No difference in performance. I???ve also tried using an InsertCursor. No difference in performance. Is it just the case that writing directly to an Oracle SDE instance is 4 to 5 times slower than writing to an FGDB? Any insights or suggestions at all would be much appreciated. Thanks, Ed
... View more
02-11-2014
04:17 AM
|
0
|
5
|
2063
|
|
POST
|
Had the same problem. Editing a file Geodatabase. Arc 10.1 on Windows 7 64 bit. Out of the blue after much previous successful editing. Got to a point where it failed consistently. Had McAfee virus scan and Mozy back-up running in the background. Turned both off (and actually disconnected from the Internet) and could then save successfully. Don't know whether it was McAfee or Mozy or both. Thank you everyone who suggested looking at the background processes. Doesn't seem like the best long-term solution to turn them all off, but at least I can move forward. Ed
... View more
01-31-2014
06:35 AM
|
0
|
0
|
2483
|
|
POST
|
I've got a case where a line feature class is the destination of a one-to-many relationship and has an integer foreign key field named (for simplicity's sake) "ForeignKey". When this is split by an edit operation I want both new lines to retain the same relationship to the original parent, so I created a range domain named "DuplicateForeignKey" with a split policy "Duplicate". Hope was that the value in the "ForeignKey" would remain in both new features after the split. No so. At least not so far in my testing. Only one feature retained the foreign key value -- the longer one. My goal is to use the IFeatureEdit2.SplitWithUpdate method to do the splitting programmatically. The ForeignKey was not duplicated as I'd hoped, so I tried the same operation using the Split tool in ArcMap. Same results. I may be missing something basic here. Any suggestions would be much appreciated. I'm working in ArcMap 10.1, ArcEditor licensing (I guess that's called "Standard" now.) Thanks, Ed
... View more
12-11-2013
05:00 AM
|
0
|
0
|
1171
|
|
POST
|
After some sleep I realized the solution to the problem was to create a new selection layer from the first layer that had the join, and then use SearchDisplayFeatures on the selection layer. Briefly, key parts of this are: // Get a reference to the join table IDisplayTable displayTable = (IDisplayTable)pFLayer; ITable table = displayTable.DisplayTable; IRelQueryTable relQueryTable = (IRelQueryTable)table; ITable destTable = relQueryTable.DestinationTable; IDataset tableDS = (IDataset)destTable; // Create a temporary layer using the selection set from the // current layer IFeatureLayerDefinition pFLayerDef = (IFeatureLayerDefinition) pFLayer; IFeatureLayer pTempLayer = pFLayerDef.CreateSelectionLayer(pFLayer.Name + "_xxTemp", true, tableDS.Name, ""); // Search the new layer.. pCursor has the results IGeoFeatureLayer pGeoFLayer = (IGeoFeatureLayer)pTempLayer; pCursor = pGeoFLayer.SearchDisplayFeatures(pQF, true); // Remove the temporary layer m_pMap.DeleteLayer((ILayer)pTempLayer); (Its probably not the intent of this forum for someone to ask a question and then later answer it themselves -- but it may be that writing the question down helped me solve it. I don't think I get points for this. Anyway, thanks Forums!) Ed
... View more
12-07-2013
06:28 AM
|
0
|
0
|
521
|
|
POST
|
I've got a tool that needs to operate on a selected set of features in a layer. It then needs to process a subset of the selected features based on a query filter. This is straightforward. For example: IFeatureSelection pFSel = (IFeatureSelection)pFLayer; ISelectionSet pSelectionSet = pFSel.SelectionSet; IQueryFilter pQF = new QueryFilter(); pQF.WhereClause = "MATERIAL = 'PL'; IFeatureCursor pCursor; pSelectionSet.Search(pQF, true, out pCursor); And pCursor holds the result. Now, what if the layer in question is a join layer. If I want to select from the join layer using a field in the joined table I can use SearchDisplayFeatures on IGeoFeatureLayer, as in: IGeoFeatureLayer pGeoFLayer = (IGeoFeatureLayer)pFLayer; pCursor = pGeoFLayer.SearchDisplayFeatures(pQF, true); Which works fine. But if I want to subset an existing selection set using a query filter that references a field in the join table... well, I'm stumped. Any suggestions would be much appreciated. Thanks, Ed
... View more
12-06-2013
02:52 PM
|
0
|
1
|
806
|
|
POST
|
Richard - Thanks for the reply. I'm sure virtual memory was running out. Originally the environment was set to allocate no more that 4GB to the paging file. When this was changed to allow the system to manage it automatically there was some improvement, but would still crash -- often. The typical error message was: "R6025 - C++ Pure Virtual Function Call". This was not caught in any try/catch block and ArcMap exited rapidly afterward. No evidence was present in the event log -- at least none I could find. The development OS was Windows 7-64 bit. The Citrix server runs Windows 2008 R2 �?? 64 bit. Would you suggest that that is the significant difference? Ed
... View more
12-01-2013
03:41 PM
|
0
|
0
|
948
|
|
POST
|
I recently completed a process where I built and tested a command in ArcMap using the ArcObjects SDK. The command makes extensive use of objects in the Geodatabase, Carto and Geometry namespaces. As is strongly advised I made sure all cursors created when querying the Geodatabase are released when the command is done with them (using Marshal.ReleaseComObject). The command was tested extensively on other desktop machines and numerous issues rooted out. By the time it was to deliver to the client I was feeling pretty good. But the client had a Citrix application server. And when the command was installed there we quickly discovered it to fail in ways it had never failed in all of our desktop testing. After multiple mis-diagnoses and considerable stress and strain we found that other COM objects needed to be released as well. A particular case in point was this: (ISegmentCollection) segCol = (ISegmentCollection)curvePolyline; (IEnumSegment) polySegments = segCol.EnumSegments; int outPartIndex = 0; int outSegIndex = 0; int partIndex = 0; polySegments.Next(out polySegment, ref outPartIndex, ref outSegIndex); while (polySegment != null) { switch (polySegment.GeometryType) { case esriGeometryType.esriGeometryLine: // do stuff break; case esriGeometryType.esriGeometryPolyline: // do stuff break; case esriGeometryType.esriGeometryCircularArc: (ICircularArc) circArcPart = (ICircularArc)polySegment; // do stuff break; } polySegments.Next(out polySegment, ref outPartIndex, ref outSegIndex); } When this was altered to release the polySegment, polySegments and segCol objects on completion of the "while" loop and when the circArcPart object was released after use (and other similar changes) the code worked reliably. After the fact I heard from other developers that Citrix is, for whatever reason *way* more sensitive to COM object life span management than desktop applications. So..... my question is, what makes Citrix so sensitive? And more importantly, are there guidelines for COM object management for Citrix that would supplement the general information ESRI provides on releasing COM objects? Thanks, Ed
... View more
11-30-2013
02:30 PM
|
0
|
4
|
1646
|
|
POST
|
So.. I found the IDowmain.Owner property and have built a simple VBA script that allows me to update the owner in ArcCatalog. Yet to test this in an SDE instance but seems to work OK in a File Geodatabase -- though of course the "owner" doesn't really apply in a non-SDE Geodatabase. Ed
... View more
10-10-2013
06:23 AM
|
0
|
0
|
650
|
|
POST
|
Is there a way to change to owner of a coded value domain? There doesn't seem to be a way to do this from the ArcCatalog user interface -- even when connected as SDE. Though I may be missing something. I guess the fall back option would be to export the domain, delete it, then import it as the new owner. Would like to avoid this path if possible. Thanks in advance for any suggestions. Ed
... View more
10-07-2013
06:54 AM
|
1
|
1
|
3506
|
|
POST
|
Craig - I appreciate the feedback. Thanks. Not sure I fully follow your suggestion, though. If I move one region of the network to a different database instance or into a different dataset within the same instance (with new class names of course) then I could just use the normal process for creating a network. Are you suggesting possibly taking the sparse region, moving it to a separate instance. Building a network with a course-grained snapping tolerance. Then drop the network and move it back into the full database and create a new network with a fine-grained tolerance? Ed
... View more
08-13-2013
03:36 PM
|
0
|
0
|
1287
|
|
POST
|
Here's a question. I've got a Geodatabase on which I want to build a geometric network. But I don't want to apply the same snapping tolerance to the full database. There are dense regions and there are sparse regions and I'd like to apply a relatively small tolerance in the dense and a relatively large tolerance in the sparse. One thought I had is to find a way to apply geometric network snapping, by region, outside the process of actually creating the network. In this way I'd apply a small snap tolerance to the dense and a larger tolerance to the sparse. Then create the network with the smaller tolerance (or no tolerance at all) knowing that sparse area features have already been snapped. If I did this I'd need to find the interface that performs geometric network snapping and see if that can be separated from the network creation process. Anyone done this? Any comments would be much appreciated. Thanks, Ed
... View more
08-07-2013
07:08 AM
|
0
|
3
|
1535
|
|
POST
|
Jake - Thanks for the suggestion on update cursors. I tried this (within ArcObjects) and it worked, but it wasn't so fast. Maybe you were suggesting using python. At any rate, I didn't have a lot of time to futz so I created a dictionary linking the old key to the new key then updated by class using look-ups to the dictionary. Maybe a little more effort than I was expecting, but it works and works quite fast over a large number of rows. Thanks again for the suggestion! Ed
... View more
01-07-2013
01:38 PM
|
0
|
0
|
907
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-14-2026 07:31 AM | |
| 1 | 05-11-2026 02:55 PM | |
| 1 | 01-07-2026 12:34 PM | |
| 1 | 01-04-2026 05:14 PM | |
| 1 | 12-17-2025 07:45 AM |
| Online Status |
Offline
|
| Date Last Visited |
Saturday
|