|
POST
|
I am using ArcGIS 10.8 Basic (occasionally Pro but mainly ArcMap). I am afraid I am not even sure where to start looking but I would appreciate guidance on graph algorithms on a GIS scale. So basically my task is as follows: 1. Within the bounds of the black box I need to find a path from point A to point B. 2. The shaded red polygons are no-go areas so they cannot be traversed. 3. The "optimum" path shall be one of two types: a. The shortest geodesic distance between the points b. The path with the lowest terrain traversed w.r.t to the grid raster. In other words, if we were to make a profile of the raster along the path then the path with the lowest max value. Ex: Path A traverses terrain that is at max 120, Path B traverses terrain that is at max 239, Path C traverses terrain that is at max 155, the optimum path in this case would be path A since it traverses the lowest grand max terrain value along its path. Where would I start looking on how to solve this challenge with ArcGIS? I am quite proficient with ArcObjects and .NET. I'm just afraid I don't even know where to start.
... View more
11-08-2021
05:53 AM
|
0
|
4
|
2191
|
|
POST
|
I've connected to another SQL Server and that one also fails on Exception thrown: 'System.Runtime.InteropServices.COMException' in MyApp.exe System.Runtime.InteropServices.COMException (0x80040205): Create output feature class failed at ESRI.ArcGIS.Geodatabase.IFeatureDataConverter.ConvertFeatureClass(IFeatureClassName InputDatasetName, IQueryFilter InputQueryFilter, IFeatureDatasetName outputFDatasetName, IFeatureClassName outputFClassName, IGeometryDef OutputGeometryDef, IFields OutputFields, String configKey, Int32 FlushInterval, Int32 parentHWND) at ....
... View more
03-10-2021
08:30 AM
|
0
|
0
|
3250
|
|
POST
|
Thanks for all your help! So on this test using the Query Layer I chose my connection and then my SELECT with my WHERE. It complains that my table doesn't have an OID, which it doesn't. I just choose STATEID which is a number but not unique to each record. It converts it to an ITable. Then I can choose Display XY Data and I can now see that my selection of points is where they should be and it is definitely NOT the 11.5 million points in the source table. So I'm getting close.
... View more
03-09-2021
01:01 PM
|
0
|
0
|
3271
|
|
POST
|
The app actually uses ArcObjects SDK for automation so moving to Pro is not an option at this time. Also I do not the dba of the SQL Server so getting a view implemented would take some effort and time. I guess my only move here is to file an incident.
... View more
03-07-2021
07:20 PM
|
0
|
2
|
3305
|
|
POST
|
Ok her are my tests: The db/table I am working with is [WorldData].[dbo].[Obstacles] and has ~11.5 million records. In ArcMap 10.8.1 here is what I do to work with the data: 1. In the Catalog I use Add Database Connection, I enter my info and "AcmeCo002.sde" is created. 2. I double-click on the item to connect to the db and the available tables are shown in the Catalog. 3. I drag the table [Obstacles] to the map and it shows up as a ITable in the TOC. 4. At this point I know I want a small subset of the data so I right-click on the ITable and under Definition Query I enter: (xpos>=-9.5 AND xpos<=-8.6) AND (ypos>=38.3 AND ypos<=39.0). Using this same exact filter in SSMS gets me 8000 records. I click on the Verify button and it says all is good. 5. I then want to view this small subset so I right-click on the ITable and choose Display XY Data. This process took several hours at the very least! I left after 2 hours and came back in the morning but there was an event layer created. 6. Displaying the event layer takes a veryyyyyyyyy longggg time which to me says that ALL the records were exported and not just those in the Definition Query of the ITable. Sure enough after about 20 minutes all records in the table are displayed. All 11.5 million of them. 7. This is not how the ITable conversion worked in the past or how it's intended to work. Why would I need all 11.5M records when my Query Definition filters to 8K records? 8. This is probably why my .NET code is "hanging" because the IQueryFilter is not being applied when the ConvertFeatureClass executes. It sounds like its copying all 11.5M records and just taking hours to process.
... View more
03-06-2021
04:49 PM
|
0
|
1
|
3318
|
|
POST
|
The source is not a feature class, only a Table. In .NET I define it as an XYTable and with a QueryFilter that gets converted to a Feature Class. Let me see if I can do that manually with a small subset.
... View more
03-05-2021
06:30 PM
|
0
|
0
|
3602
|
|
POST
|
My company recently moved our SQL Server from one location to another and also updated it from V11 to V13. I have a .NET app that takes data from the SQL Server table and converts it to a point FeatureClass in a local FileGeoDB. The process has worked great up until the server move. I've setup a connection to the new SQL Server and that works. I can enumerate the tables on the source database. So am confident the connection to the new SQL Server is solid. Dim pWkspSource As IWorkspace = OpenSqlDbWorkspace(ci) I setup up my target workspace, dataset, and feature class and then I attempt to convert via Dim pFeatDataConverter As IFeatureDataConverter = New FeatureDataConverter
Dim pEnumInvldObj As IEnumInvalidObject = pFeatDataConverter.ConvertFeatureClass(fcSourceName, pQryFltr, fdTargetName, fcTargetName, Nothing, Nothing, "", 1000, 0) At this point the process just hangs at ConvertFeatureClass with no errors or exceptions. What could be the issue and/or what can I try to troubleshoot the issue?
... View more
03-05-2021
03:50 PM
|
0
|
9
|
3776
|
|
POST
|
Yes all my testing is to get in_memory to work. This approach works but the only downside is that RAM is still not cleared with every successive over-write. Although no exception occurs. I think that it could be limited by the user's RAM so we will see what happens on a bigger dataset.
... View more
06-02-2020
07:20 AM
|
0
|
0
|
3119
|
|
POST
|
Another tidbit of information after some more testing I noticed is that the process works much better WITHOUT the Delete_management. My testing process is as follows: 1. ExtractByMask 2. GetRasterProperties 3. Delete_management For my test I use the same output raster name "in_memory\rasOutput" for each iteration and GP.OverwriteOutput = True. When it gets to the second iteration I get an exception. If I omit step #3 Delete_management then I do NOT get the exception. The theory on this is that Delete_management is broken as well. It seems like it attempts to delete the subraster but can’t so it just keeps a lock on it. Here is the debug info when I INCLUDE the Delete_management. The exception happens at GP.Execute of ExtractByMask If I omit this Delete_management step then I do not get an exception and the code runs to completion. Oddly, it finishes but still uses about 1.2GB or RAM even after using the same output raster location and name. System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. at ESRI.ArcGIS.Geoprocessing.GeoProcessorClass.Execute(String Name, IVariantArray ipValues, ITrackCancel pTrackCancel) at ESRI.ArcGIS.Geoprocessor.Geoprocessor.ExecuteInner(IGPProcess process, ITrackCancel trackCancel, IGeoProcessor igp, IVariantArray iva) at ESRI.ArcGIS.Geoprocessor.Geoprocessor.Execute(IGPProcess process, ITrackCancel trackCancel)
... View more
06-01-2020
05:31 PM
|
1
|
2
|
3119
|
|
POST
|
Yes I have confirmed that the extracted subraster is the INTERSECTION of said polyline and the main raster. I guess you could say that the subraster is the extents of the polyline with most of the cells being Null since only the cells that intersect the polyline are actually extracted. Not sure what setting the environment to the extents of the polyline will do as the end result is still the same. Namely I have an extracted subraster in memory. That subraster is what is not cleared from memory. Thought about a RAMDISK but that involves each of my users setting that up and setting that as my temp output workspace in code. It could work but has some challenges with end users. Also gave some thought about saving to disk and doing a multi-threaded approach. That could also work but has some challenges. Namely me. I have done MT in the past but wanted to keep my code as simple as possible. Definitely something to look at if ESRI drags their feet.
... View more
06-01-2020
06:04 AM
|
1
|
0
|
3119
|
|
POST
|
The raster is not the issue here. The issue is the number of extracts that I need to do which could be 7000 to 12000 polylines. The requirement is NOT to group the polylines and then get the extract for the entire intersection. The requirement is to get the INDIVIDUAL extracts from each polyline. Take a look at my pseudo code. To do this anywhere near an acceptable time frame you must save to in_memory. But if the in_memory workspace isn't being cleared with a Delete_management then RAM usage just keeps building and eventually throws an exception.
... View more
06-01-2020
05:09 AM
|
0
|
2
|
3119
|
|
POST
|
Let me prepend my response by saying ESRI tech support and I have been testing like a hundred different strategies for the last 4 weeks. Nothing worked as the lowest common denominator was always the in_memory workspace. They ended up filing a bug and hopefully that will get fixed, in what a year or two. So thanks for the link. I recognize that thread as I went through almost every post on in_memory. Like the suggestion I tried the GP overwrite and the result is an exception. To me that means the raster is being locked in the in_memory workspace so neither deleting it or over-writing it works. Ill take a look at IGPUtilities. At this point I'm willing to try anything. The ExtractByMask is just taking the intersection of a polyline and a raster. Not much I can do with extent of format. I do know that writing to disk works but you lose performance. In my case it turns a 15 minute process (in_memory) to many hours (to_disk). so that is not an option. The other issue here also is that the in_memory workspace is per ArcMap session so no matter what you do the RAM usage just keeps building. When you close ArcMap it releases that memory so there must be a way to do that manually.
... View more
05-30-2020
09:55 AM
|
1
|
4
|
3119
|
|
POST
|
ArcMap/ArcObjects 10.8 with VB2019 compiled against .NET Framework 4.6 I have the need to process a very large amount of polylines against a raster using the ExtarctByMask gp. Saving the result sub-raster to memory is up to 5x faster than saving to disk so I opt to use the in_memory workspace. However RAM usage keeps building because the GP functions do not clear up these in_memory objects. My pseudo code looks something like this: for every polylineFeat 'extract a sub-raster as intersection of input raster and polyline feature Dim extBymsk As ExtractByMask = New ExtractByMask extBymsk.in_raster = inRastName extBymsk.in_mask_data = polylineFeat extBymsk.out_raster = "in_memory\" & subRasterName 'get properties of the sub-raster Dim rastProps As GetRasterProperties = New GetRasterProperties 'done with the sub-raster so delete it Dim delData As Delete = New Delete delData.in_data = "in_memory\" & subRasterNamer every 100 iterations delete in_memory workspace Dim delWksp As Delete = New Delete delWksp.in_data = "in_memory" 'garbage collect and wait GC.Collect() GC.WaitForPendingFinalizers() end every 100 iterations 'test to see if the sub-raster is truly gone from memory Dim rastPropsB As GetRasterProperties = New GetRasterProperties next polylineFeat The Delete_management for rasters in_memory just does not work. How do I know this? I put a test GP function GetRasterProperties AFTER the Delete operation and i can still get a result. It should throw an exception if the raster didn't exist. So I have about 7000 polylines to process and this routine throws an exception at about 2800 polylines. The reason is that RAM has been saturated for this thread. Has anyone else seen this? What have you done as a workaround? I contacted tech support and they say they will file a bug. But I need to process data today and the last bug I filed took 18 months to fix. I cant believe we are at 10.8 and the in_memory workspace still has defects. Any help appreciated. ~Abel
... View more
05-28-2020
12:17 PM
|
1
|
9
|
3320
|
|
POST
|
I've now spent a few minutes tweaking the XAML to get a error template that I like. Took me a while but I think I learned something new today. The one thing I have noticed is when the path is not valid then I get the red border and tooltip. All that works great. But now I click on another section of the Options, say "Layout". My options property sheet still has an invalid entry so the node has a red dashed underline to notify me that something is still wrong in that pane. Cool! I click back on my options node and the red border is now gone. Tootip is still there and the OK button is still grayed out. So I'm gonna go and see why the textbox reset.
... View more
05-08-2020
12:30 PM
|
0
|
0
|
1142
|
|
POST
|
Gotcha. I think as i work with the SDK I am getting better at it.
... View more
05-08-2020
08:49 AM
|
0
|
0
|
1282
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-25-2020 09:25 PM | |
| 1 | 08-17-2022 11:17 AM | |
| 1 | 07-24-2022 01:36 PM | |
| 1 | 07-14-2022 11:22 AM | |
| 1 | 07-14-2022 10:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-27-2025
11:11 AM
|