POST
|
Additionally, and after investigation, when we change the esriSelectionResultEnum from "Add to Selection" to"New", the performance increased 6 times (~1min). Thus, to narrow down the perfromance issue, it seems related to "Add to selection" option. However, the query requires this option. Any Advise!
... View more
01-18-2021
02:17 AM
|
0
|
0
|
372
|
POST
|
Thank you for replying, hereafter are the details: we are using FGDB data, the Target Layer includes 700,000+ features, and the Source Layer includes 200,000+ features. using the "Select by Location" built-in tool in ArcMap takes ~1.5 mins; however, using the code we have provided above takes ~6.5 mins. After Debugging, more than 5.5 mins is delayed in the following line of code: pTrgtFeatureSelection.SelectFeatures(TryCast(pSFilter, ESRI.ArcGIS.Geodatabase.ISpatialFilter), SelectionType, False) it is very critical performance issue, and I need to select the features in that layer in order to perform additional queries (attributes & spatial). We are also trying to find another way/method than "SelectFeatures" to select the features in the Target layer, however still not sure if there is. Please help.
... View more
01-16-2021
03:41 AM
|
0
|
1
|
406
|
POST
|
Hello All, We have just installed ArcGIS 10.1 and MS Visual Studio 10 to develop automation tools for select by attribute and select by Location. We developed a new add-in button in ArcMAP, and clicking it should do 4 queries, 2 of them are attribute queries and other 2 are spatial queries. order (1 attribute, 1 spatial, 1 attribute, 1 spatial) Suffering from very slow performance when using our code to perform the spatial queries. Please help!! Here after is the used code: Public Function p_GenSelectByLocation(ByVal SourceLayerName As String, ByVal TargetLayerName As String, ByVal Whereclause As String, ByVal SelectionType As esriSelectionResultEnum, ByVal RelationType As esriSpatialRelEnum) As Integer
Try
Dim pboolSrcFound As Boolean = False
Dim pboolTrgtFound As Boolean = False
Dim pEnumLayer As IEnumLayer = My.ArcMap.Document.ActiveView.FocusMap.Layers(Nothing, True)
Dim pSrcFLayer As IFeatureLayer = Nothing
Dim pTrgtFLayer As IFeatureLayer = Nothing
Dim pLoopLayer As ILayer = pEnumLayer.Next()
pEnumLayer.Reset()
Do Until pLoopLayer Is Nothing
If TypeOf pLoopLayer Is IFeatureLayer Then
If pLoopLayer.Name = SourceLayerName Then
pSrcFLayer = pLoopLayer
pboolSrcFound = True
End If
If pLoopLayer.Name = TargetLayerName Then
pTrgtFLayer = pLoopLayer
pboolTrgtFound = True
End If
End If
If pboolSrcFound = True And pboolTrgtFound = True Then Exit Do
pLoopLayer = pEnumLayer.Next()
Loop
If pSrcFLayer Is Nothing Or pTrgtFLayer Is Nothing Then Exit Try
Dim pSrcFeatureSelection As IFeatureSelection = pSrcFLayer
Dim pGeomToUnion As IGeometryCollection = New GeometryBag()
If pSrcFeatureSelection.SelectionSet.Count = 0 Then Exit Try
'Get union of Geometry of all selected features
Dim pCursor As ICursor = Nothing
pSrcFeatureSelection.SelectionSet.Search(Nothing, False, pCursor)
If pCursor Is Nothing Then Exit Try
Dim pfeatureCursor As IFeatureCursor = pCursor
Dim pFeature As IFeature = pfeatureCursor.NextFeature
Dim pGeometry As IGeometry
pGeometry = pFeature.Shape
Dim pCount As Integer = 0
Do Until pFeature Is Nothing
pCount += 1
pGeometry = pFeature.Shape
pGeomToUnion.AddGeometry(pGeometry)
pFeature = pfeatureCursor.NextFeature
Loop
Dim pEnumGeometry As IEnumGeometry = pGeomToUnion
'Dim pgeometrybag As IGeometryBag = pEnumGeometry
Dim pResultGeom As ITopologicalOperator = Nothing
If pGeometry.GeometryType = esriGeometryType.esriGeometryPolyline Then
pResultGeom = New Polyline
pResultGeom.ConstructUnion(pEnumGeometry)
ElseIf pGeometry.GeometryType = esriGeometryType.esriGeometryPolygon Then
pResultGeom = New Polygon
pResultGeom.ConstructUnion(pEnumGeometry)
End If
If pResultGeom Is Nothing Then Exit Try
'define the spatial filter and select the features based on the union Geometry
Dim pSFilter As ISpatialFilter = New SpatialFilter
'If pTrgtFLayer Is Nothing Then Exit Try
Dim pnameOfShapeField As System.String = pTrgtFLayer.FeatureClass.ShapeFieldName
pSFilter.GeometryField = pnameOfShapeField
pSFilter.Geometry = TryCast(pResultGeom, IGeometry)
pSFilter.SpatialRel = RelationType
Dim pTrgtFeatureSelection As IFeatureSelection = pTrgtFLayer
pTrgtFeatureSelection.SelectFeatures(TryCast(pSFilter, ESRI.ArcGIS.Geodatabase.ISpatialFilter), SelectionType, False)
Return pTrgtFeatureSelection.SelectionSet.Count
Catch ex As Exception
pFuncReturnDebug(ex)
Return -1
End Try
End Function
... View more
01-15-2021
02:39 AM
|
0
|
4
|
434
|
POST
|
Greetings, We have a project which requires implementation of ArcGIS for Desktop in order to host the geo-spatial data, and IBM Maximo to host the Asset management data. We need to integrate the two technologies in order to pull/push data from maximo to ArcGIS. Therefore, we need to know what ArcGIS licenses do we need to perform this task. Regards,
... View more
02-09-2018
02:30 AM
|
0
|
2
|
551
|
POST
|
Greetings, I have downloaded "PyScripter-v2.5.3-x64-Setup.ex" and I`m using the Add-in Manager to add a command on a toolbar inside ArcMap 10.1... I succeeded in adding the toolbar and the command, however I need to show a Messagebox at the On_Click event of the command and I`m not able to do that...This is my code below: import arcpy import pythonaddins class ButtonClass1(object): def __init__(self): self.enabled = True self.checked = False def onClick(self): arcpy.AddMessage("TestMessg") print("text") pass Please help!
... View more
03-18-2014
02:28 AM
|
0
|
2
|
5910
|
POST
|
After posting this form, I tried to add the AxLicenseControl and I select ArcEngine license from the properties and everything went smooth... Thanks...
... View more
03-10-2014
06:37 AM
|
0
|
0
|
57
|
POST
|
Greetings, I`m trying to develop a form in vb.net 2010 that contains ArcEngine MapControl, TOCControl, & ToolbarControl in order to load a data in the map control and view it using the commands in the toolbar control... I used the following: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxTOCControl1.SetBuddyControl(AxMapControl1) AxToolbarControl1.SetBuddyControl(AxMapControl1) 'Add generic commands. AxToolbarControl1.AddItem("esriControls.ControlsOpenDocCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsAddDataCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) 'Add page layout navigation commands. AxToolbarControl1.AddItem("esriControls.ControlsPageZoomInTool", -1, -1, True, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsPageZoomOutTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsPagePanTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsPageZoomWholePageCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) 'Add map navigation commands. AxToolbarControl1.AddItem("esriControls.ControlsMapZoomInTool", -1, -1, True, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapZoomOutTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapPanTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapFullExtentCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapZoomToLastExtentBackCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapZoomToLastExtentForwardCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) 'Add map inquiry commands. AxToolbarControl1.AddItem("esriControls.ControlsMapIdentifyTool", -1, -1, True, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapFindCommand", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) AxToolbarControl1.AddItem("esriControls.ControlsMapMeasureTool", -1, -1, False, 0, esriCommandStyles.esriCommandStyleIconOnly) End Sub At the runtime when I tried to load a geodatabase, and exactly when I tried to access a personal geodatabase I got the following error: "Couldn't connect to the database. Please validate the integrity of the database and/or your network connection and try again." Please advise !! Thanks in advance...
... View more
03-10-2014
05:29 AM
|
0
|
1
|
659
|
POST
|
Greetings, I`m using the Data Reviewer Extension in ArcMap 10.1 and I always run a batch Job inculdes many Domain checks and everything runs smoothly and the results always being written to the Reviewer Table successfully. However I need the checks to run only on specifed fields and not on all the fields of the data, so is there anyway to specify the fields to be checked or else is there a way to include the FieldName column in the Reviewer Table so that I can get the records of my specific fields only to generate my QA/QC report.. Please advise me on how to do this, and please specify if any other scenario that may lead me to a solution to my issue. Thanks in advance...
... View more
06-10-2013
01:23 AM
|
0
|
1
|
3478
|
POST
|
Thank you meikojosan, I think that you are right regarding issue #1. Regarding issue #2 I can say that even me I don`t have further details to send it to youbut what happens that when I run the batch process the ArcMap freezed and generate the described error only. So is there any way to get more details about this error? Thanks....
... View more
06-10-2013
01:04 AM
|
0
|
0
|
145
|
POST
|
Thanks meikojosan, I wonder why ArcMap is not managing this issue in a way that it should recommend the user to use File GDB as the workspace and not Personal GDB. Please not that after initiating two runs of the described Batch job in my 1st post, please check the results for each one: The results are written to the table but the following error genertaed for 5000 records: [INDENT] Unable to save Reviewer geometry for RecordID 4983 as its spatial reference is incompatible with Reviewer workspace spatial reference. Extent of geometry is outside the Reviewer Dataset XY domain .[/INDENT] The ArcMap Freezes then it generates error message with the following title: [INDENT] ArcMap has stopped working [/INDENT] Now I will go with your option and run this Batch without checking the Null Values and use the File GDB as the workspace. However, is there any hardware specs recommendation to run such a process successfully? Please advise..
... View more
06-03-2013
10:26 PM
|
0
|
0
|
145
|
Online Status |
Offline
|
Date Last Visited |
01-18-2021
12:18 PM
|