POST
|
yes. after doing a Union with NTS and exporting it to Wkb, importing the Wkb into an ESRI geometry and doing insert/update no memory leakage appears to be occurring anymore, so seems to be related to doing a Union with the ArcGIS Pro SDK
... View more
02-22-2021
09:55 AM
|
1
|
0
|
908
|
POST
|
Seems like NTS-Union is causing some Z-values with NaN for some polygons for some reason. Created an ugly SequenceFilter for NTS which updates all Z-values with "0.001" just for testing purposes and can confirm that the memory leak is not there when doing the Union with NTS instead of the ArcGIS Pro SDK, so the leak seems to be somewhere in the Union-call in the ArcGIS Pro SDK.
... View more
02-22-2021
03:30 AM
|
0
|
2
|
916
|
POST
|
That's a good suggestion, I will try this and see if it resolves my issue, just did a quick try and I seem to be getting faulty polygons when using NTS Union, will need some more investigation.
... View more
02-22-2021
12:37 AM
|
0
|
3
|
918
|
POST
|
I did try this and I am not getting a memory leak if I remove the parts writing/updating the database
... View more
02-22-2021
12:36 AM
|
0
|
0
|
918
|
POST
|
Hello, I've been using the ArcGIS Pro SDK to write an application which updates a Geodatabase. It seems to be accumulating a lot of memory usage over time though, and it doesn't seem to be my own code which is accumulating, but rather heap memory. I tried isolating the relavant parts into a smaller PoC for you to observe the issue yourselves. Basically what this application does it: Creates well known binaries (Wkb) from Gml using NetTopologySuite Imports the Wkbs into ESRI Geometries using the GeometryEngine Creates a union of the geometries using the GeometryEngine Stores the Feature (with Geometry) in a Geodatabase In the real application I get about 20GB of memory usage after storing about 4 million features in the Geodatabase. I've used the application .NET Memory Profiler to try to look into what's using all the memory and it seems to be the Union-call which isn't getting cleaned up? Looking at the heap I have alot of these for example: ntdll!RtlAllocateHeap( HANDLE, DWORD, SIZE_T )
ucrtbase!_malloc_base()
pe!pe_xd_find_patt()
pe!pe_spheroid_ext_new_errext()
pe!pe_spheroid_clone()
pe!pe_datum_clone()
[Managed to native transition]
ArcGIS.Core!ArcGIS.Core.Internal.IGeometryEngineIOP.GEUnionArray( IntPtr[],SpatialReferenceTiny,string,string,ref bool )
ArcGIS.Core!ArcGIS.Core.Geometry.GeometryEngine.Union( IEnumerable<Geometry> )
SampleApp!BALSynchronizer_v2.Helpers.ArcGisHelper.ESRIGeometryFromWKBs( IEnumerable<Wkb> ) ArcGISHelper.cs Line 24
SampleApp!SampleApp.Program.InsertGdb( RowBuffer,Building ) SampleApp.cs Line 117
SampleApp!SampleApp.Program.StoreInGdb( string,List<Building> ) SampleApp.cs Line 135
SampleApp!SampleApp.Program.Main( string[] ) SampleApp.cs Line 187 I cant see any way to dispose the ESRI Geometries manually so I assume that they should be automatically disposed somehow? Got any suggestions for me? 🙂 Have a great weekend! /Lars
... View more
02-19-2021
05:31 AM
|
0
|
7
|
1016
|
POST
|
Hello Wolfgang Kaiser, Thanks a lot for your time and help with this issue. We have gone with the "distinct polygon"-path with other applications but wanted to avoid it seeing all the issues we have had with that route But now I know which two ways we can do this and will discuss with the end-users, thanks again! BR Lars
... View more
06-18-2020
04:13 AM
|
0
|
0
|
1234
|
POST
|
Hello Wolfgang Kaiser, yes, you are correct, there should be no holes at all in this Geometry, so I am expecting a result like the one you show in your first picture (in red). I didn't put in any checks regarding CW vs CCW rotation of polygons in my SampleApp, mostly because it hasn't affected my results in my regular application. Let me know if you would like an updated SampleApp with this in place as well for completeness sake. Sounds awesome that you'll be looking into it! I'll be eagerly be awaiting your results thanks a bunch for your help so far!
... View more
06-16-2020
12:44 AM
|
0
|
2
|
1234
|
POST
|
Ah, of course, I was looking for a way to change the geometry type by going into design mode, didn't realize I had to re-create the entire feature, thanks! I've created a seperate feature class named BuildingMultipatch and tried creating the building geometry using the code sample I provided earlier, the result is unfortunately the same though.
... View more
06-16-2020
12:38 AM
|
0
|
0
|
1234
|
POST
|
Hello Wolfgang Kaiser, Attached is the SampleApp I created, I've expanded it with my attempt at Multipatch as well but I am hitting the same issue as I am in my "real" application when I try to add Multipatch there, I get an error saying "No support for this geometry type". This is my attempt at Multipatch: But throws this error: Just remove this Line with multipatch if you only wish to test this using CreateMultiPolygon which was I was originally having issues with in this Thread.
... View more
06-15-2020
05:36 AM
|
0
|
2
|
1234
|
POST
|
Hello ESRI-community , I am working with creating a Geodatabase of buildings and have run into an issue I wanted to get straightened out. I have a written a software to parse buildings from GML into ESRI geometries and then store them in a GDB/SDE, but I seem to be able to get the Shapes working properly for some of the more complex building bodies. The more complex buildings get their GML-data split into multiple parts which I want to merge into one shape in ArcGIS Pro. So I do this by first creating a Polygon for each part, then taking all those polygons and creating one Polygon out of them. The Issue I am having however is that some of the polygons end up as interior holes and some as exteriors, see this sample: I have read some documentation saying that the order of the points in the polygon is important, as depending on if they are CW or CCW will determine if it will be an interior or exterior ring. I have ensured that the points are in the correct orientation but am still having the same issue. I have read some other documentation saying that a polygon within an exterior polygon will always end up as an interior polygon, and a polygon within that interior polygon will end up as an exterior polygon and so on. Could anyone give me some direction on this? I have created a sample application for this which i could attach if what I am trying to accomplish should be working but I have ran into some issue Thanks! Best regards Lars
... View more
06-09-2020
11:31 PM
|
0
|
9
|
1357
|
POST
|
Good morning Wolfgang, Thanks for the thorough check! I was working on trying to create a working sample for my issue but was unable to reproduce it. I then went back to my original solution and started taking things out, ultimately it was another Library which was causing the Issue with ArcGIS (GDAL). After removing GDAL, ArcGIS started working properly again, strange that it was only appearing after upgrading to 2.5.x but guess that's some difference there Will switch to something other than GDAL to parse GML for the time being. Thanks again! BR Lars
... View more
06-09-2020
11:08 PM
|
0
|
0
|
1196
|
POST
|
When you are saying compiled under 2.5, do you mean that i am referencing the 2.5 dlls? or are you refering to something else? (yes, I have the 2.5 dlls referenced). Also had to change to .Net Framework 4.8 since the project wouldn't compile otherwise. I tried isolating the issue to a new application which I would be able to include here, but my sample project seems to be working actually. I will try to get it to the same point which I have gotten my main application to and then I'll include it here. Thanks!
... View more
03-26-2020
07:29 AM
|
0
|
0
|
1196
|
POST
|
Yes, i've recompiled with 2.5 as well as changed target framework to 4.8. I will try with an applyedits session for inserts as well (already have it for edits which are also failing)
... View more
03-26-2020
07:27 AM
|
0
|
0
|
1196
|
POST
|
Hello, I have written a console application (in C#) which uses Core & CoreHost to update as well as create features in an GDB as well as an SDE. This was working when I was using ArcGIS Pro 2.4, but I recently tried updating to ArcGIS Pro 2.5 and have been getting an error ever since when storing the feature. This is what my code looks like: using (var buildingsTable = geodatabase.OpenDataset<FeatureClass>(Constants.Building.TABLE_NAME))
{
foreach (var building in newBuildings)
{
using (var rowBuffer = buildingsTable.CreateRowBuffer())
{
rowBuffer.FillFromBuilding(building);
buildingsTable.CreateRow(rowBuffer).Dispose();
}
}
}
And this is the error which the core dll is giving me: Klassen har inte registrerats
vid ArcGIS.Core.Internal.IFeatureClassIOP.FeatureClass_CreateFeature(IntPtr featureClassHandle, IntPtr featureBufferHandle)
vid ArcGIS.Core.Data.FeatureClass.CreateFeature(RowBuffer featureBuffer)
vid ArcGIS.Core.Data.FeatureClass.CreateRow(RowBuffer featureBuffer)
--- Slut på stackspårning för interna undantag ---
vid ArcGIS.Core.Data.FeatureClass.CreateRow(RowBuffer featureBuffer)
vid BALSynchronizer_v2.Services.BuildingFeatureService.UpsertBuildings(IEnumerable`1 buildings) i "Klassen har inte registrerats" is Swedish and translates to "The class has not been registrered" Looks like this is some issue in the underlying COM-layer? I've tried removing and re-installing ArcGIS Pro 2.5 without success. Any suggestions? Thanks in advance. Best regards Lars
... View more
03-25-2020
08:38 AM
|
0
|
6
|
1338
|
POST
|
Thanks Narelle! I went another route and went from GML to WKB (via an external library) and then from WKB to ESRI Geometries in the end. Will try to try this at some point as well though.
... View more
03-25-2020
08:31 AM
|
0
|
0
|
1433
|
Title | Kudos | Posted |
---|---|---|
1 | 02-22-2021 09:55 AM | |
1 | 02-26-2020 11:35 PM |
Online Status |
Offline
|
Date Last Visited |
03-11-2021
06:15 AM
|