|
POST
|
the command "Reclassify" gives wring result! Why? Please, see the attached image that shows my question I tried to reclassify the raster to 7 classes, but I got 7 classes and another one which I couldn???t know what it is!!! How to solve this problem so that I can have only 7 classes? Thank you
... View more
02-26-2011
03:30 PM
|
0
|
1
|
862
|
|
POST
|
How to buffer the raster according the certain value of the cell? Please, see the attached image that shows my question I need to get a raster that represent a buffer of 500 m from the built up area (which have the cell value number 3). If the same problem is in vector, I use the buffer command then erase command. What are the equivalent commands for raster?
... View more
02-18-2011
02:04 PM
|
0
|
0
|
1086
|
|
POST
|
Is the command �??location allocation�?� existing in ArcGIS as in ArcInfo Worksation? The command location allocation find the best site location for facilities based on: The demand in each polygon The minim travel distance Assuming the number of facilities In ArcInfo workstation, if these data are given, then the best locations of facilities are plotted alongside with the spider showing the relation between each polygon and the facility Please, see the attached image This is different from the location allocation exisiting in Network analyst! what is the equivelent command in ArcGIS? Thank you
... View more
02-09-2011
02:49 PM
|
0
|
0
|
1329
|
|
POST
|
How to convert the file of the extension *.e00? Please, see the attached image that shows my question Is there a way to convert the file *.e00 to shape file or raster?
... View more
02-01-2011
08:59 AM
|
0
|
1
|
3016
|
|
POST
|
ArcGIS 10: is the location allocation just only choose the new locations based on the existing ones or suggest new location totally different from the excising ones Please, see the attached image that explains my question Here, i have: ??? 47 demand point ??? 9 facilities to cover the demands ??? I need to make the number of facilities 3 I found that the system choose these from the existing 9 facilities and doesn???t suggest any new location! How to make the system suggest new locations for the facilities that not necessarily to be from the existing ones?
... View more
01-29-2011
02:30 AM
|
0
|
1
|
1884
|
|
POST
|
Hello, how to accumulate the values of field using VBA ??? Arcobject? Please, see the attached image that shows my question Any help is very much appreciated Regards kalid
... View more
12-11-2010
01:20 AM
|
0
|
2
|
1371
|
|
POST
|
Hello, How to print the fields of table in textbox in form using VBA ??? Arcobject? Please, see the attached image that shows my question Any help is very much appreciated Regards kalid
... View more
12-11-2010
01:06 AM
|
0
|
1
|
1101
|
|
POST
|
Hello, How to write a code that does the ???frequency??? for a field in attribute table of a layer using the VBA ??? Arcobjects? Please, see the attached image that shows my question Thank you Regards Kalid
... View more
12-10-2010
04:46 PM
|
0
|
1
|
817
|
|
POST
|
Hello Venkat, Thank you very much for the code. It would be very much appreciated if you develop the code so that: �?� First to intersect the layer of hospital with the layer of district (both are polygon) �?� Then to have the frequency in the table of the intersected layer so that we know the number of hospitals in each district In this case: We don�??t need to start editing and to have the field �??name�?� in the district layer in order to get the result (as it�??s in the provided code) Thank you Regards Kalid hi, How do you intersect point and polygon...You are looking for Points within the polygon ?if that is true i have already given you the code that perfectly working...please check previous forms Thanks
... View more
12-10-2010
12:29 PM
|
0
|
0
|
736
|
|
POST
|
Dear Venkat, Thank you so much for the answer. It�??s really helpful Sure. The code you have developed is working perfectly. 1. how to develop the code so that we don�??t need: �?� To work in edit session. �?� To have the field �??name�?� in the district layer. 2. How to develop the code considering the following approach: �?� to intersect the two layers (districts and hospitals: both are polygons) �?� And then to make summery in the table of the resultant layer (from the intersection) so that we count all the hospitals in each district. I�??m supposed to print the result in the form and then to be able to export it to a table to excel Please, see the attached file Appreciated Kalid Hi, please check below code... Sub test() Dim pMxDoc As IMxDocument Set pMxDoc = ThisDocument Dim pPolyFLayer As IFeatureLayer Set pPolyFLayer = pMxDoc.FocusMap.Layer(1) Dim pPointFlayer As IFeatureLayer Set pPointFlayer = pMxDoc.FocusMap.Layer(0) Dim pEditor As IEditor, pUID As New UID pUID.Value = "esricore.Editor" Set pEditor = Application.FindExtensionByCLSID(pUID) If pEditor.EditState = esriStateEditing Then pEditor.StartOperation CountFeatures pPolyFLayer.FeatureClass, pPointFlayer.FeatureClass, _ esriSpatialRelContains, "NAME" pEditor.StopOperation "PolygonDensity" Else MsgBox "no edit session" End If End Sub Sub CountFeatures(pFC1 As IFeatureClass, _ pFC2 As IFeatureClass, _ lSpatialRel As esriSpatialRelEnum, _ strCountFld As String) Dim pFCur As IFeatureCursor Set pFCur = pFC1.Search(Nothing, False) Dim lFld As Long lFld = pFC1.FindField(strCountFld) If lFld = -1 Then MsgBox "field not found: " & strCountFld Exit Sub End If Dim pFeat As IFeature Set pFeat = pFCur.NextFeature Do While Not pFeat Is Nothing Dim pSF As ISpatialFilter Set pSF = New SpatialFilter Set pSF.Geometry = pFeat.ShapeCopy pSF.SpatialRel = lSpatialRel pSF.GeometryField = pFC2.ShapeFieldName pFeat.Value(lFld) = pFC2.FeatureCount(pSF) MsgBox "OID: " & pFeat.OID & ", count: " & pFeat.Value(lFld) pFeat.Store Set pFeat = pFCur.NextFeature Loop End Sub is that your looking for ?... Thanks and Regards, Venkat
... View more
12-10-2010
11:21 AM
|
0
|
0
|
2070
|
|
POST
|
Hello, I need to write a code (in VBA- Arcobjects) to intersect two layers (both are polygons) and then to make summery Please, see the attached image that shows my question ??? The first layer represents the boundaries of the district ??? The second layer represents the hospital ??? First i need to intersect the two layers ??? Then, I need to count the number of hospitals in (inside) each governorate Thank you Kalid
... View more
12-09-2010
09:31 AM
|
0
|
2
|
1052
|
|
POST
|
thank you for so much, actually i need it to be written in VBA-Arcobjects not in any other language. have you any idea how to do it in VBA-Arcobjects ? where can i find examples of similar kind of work? thank you regards Jamal Hi, Please find below code working fine for me...points count will be added into polygon layer ...updated into given filed..... using System; using System.Drawing; using System.Runtime.InteropServices; namespace CountPoints { /// <summary> /// Summary description for CountAllPoints. /// </summary> [Guid("96ac8c8b-1a7c-457d-aa69-dcdcba6034f2")] [ClassInterface(ClassInterfaceType.None)] [ProgId("CountPoints.CountAllPoints")] public sealed class CountAllPoints : ESRI.ArcGIS.ADF.BaseClasses.BaseCommand { #region COM Registration Function(s) [ComRegisterFunction()] [ComVisible(false)] static void RegisterFunction(Type registerType) { // Required for ArcGIS Component Category Registrar support ArcGISCategoryRegistration(registerType); // // TODO: Add any COM registration code here // } [ComUnregisterFunction()] [ComVisible(false)] static void UnregisterFunction(Type registerType) { // Required for ArcGIS Component Category Registrar support ArcGISCategoryUnregistration(registerType); // // TODO: Add any COM unregistration code here // } #region ArcGIS Component Category Registrar generated code /// <summary> /// Required method for ArcGIS Component Category registration - /// Do not modify the contents of this method with the code editor. /// </summary> private static void ArcGISCategoryRegistration(Type registerType) { string regKey = string.Format("HKEY_CLASSES_ROOT\\CLSID\\{{{0}}}", registerType.GUID); ESRI.ArcGIS.ADF.CATIDs.MxCommands.Register(regKey); } /// <summary> /// Required method for ArcGIS Component Category unregistration - /// Do not modify the contents of this method with the code editor. /// </summary> private static void ArcGISCategoryUnregistration(Type registerType) { string regKey = string.Format("HKEY_CLASSES_ROOT\\CLSID\\{{{0}}}", registerType.GUID); ESRI.ArcGIS.ADF.CATIDs.MxCommands.Unregister(regKey); } #endregion #endregion private ESRI.ArcGIS.Framework.IApplication m_application; public CountAllPoints() { // // TODO: Define values for the public properties // base.m_category = "Spatial Analsis"; //localizable text base.m_caption = "Spatial Analsis"; //localizable text base.m_message = "Counts the point inside the polygon"; //localizable text base.m_toolTip = "Counts the point inside the polygon"; //localizable text base.m_name = "Spatial_Points_Inside_Polygon"; //unique id, non-localizable (e.g. "MyCategory_ArcMapCommand") try { // // TODO: change bitmap name if necessary // string bitmapResourceName = GetType().Name + ".gif"; base.m_bitmap = new Bitmap(GetType(), bitmapResourceName); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.Message, "Invalid Bitmap"); } } #region Overriden Class Methods /// <summary> /// Occurs when this command is created /// </summary> /// <param name="hook">Instance of the application</param> public override void OnCreate(object hook) { if (hook == null) return; m_application = hook as ESRI.ArcGIS.Framework.IApplication; //Disable if it is not ArcMap if (hook is ESRI.ArcGIS.ArcMapUI.IMxApplication) base.m_enabled = true; else base.m_enabled = false; // TODO: Add other initialization code } /// <summary> /// Occurs when this command is clicked /// </summary> public override void OnClick() { // TODO: Add CountAllPoints.OnClick implementation ESRI.ArcGIS.ArcMapUI.IMxDocument pMxDoc = m_application.Document as ESRI.ArcGIS.ArcMapUI.IMxDocument; ESRI.ArcGIS.Carto.IFeatureLayer pPolygonLayer = pMxDoc.FocusMap.get_Layer(1) as ESRI.ArcGIS.Carto.IFeatureLayer; ESRI.ArcGIS.Carto.IFeatureLayer pPointLayer = pMxDoc.ActiveView.FocusMap.get_Layer(0) as ESRI.ArcGIS.Carto.IFeatureLayer; ESRI.ArcGIS.Editor.IEditor pEditor; ESRI.ArcGIS.esriSystem.UID pUID = new ESRI.ArcGIS.esriSystem.UIDClass(); pUID.Value = "esricore.Editor"; pEditor = m_application.FindExtensionByCLSID(pUID) as ESRI.ArcGIS.Editor.IEditor; if(pEditor.EditState == ESRI.ArcGIS.Editor.esriEditState.esriStateEditing ) { pEditor.StartOperation(); GetAllPoitsInsidePolygon(pPolygonLayer.FeatureClass, pPointLayer.FeatureClass, ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum.esriSpatialRelContains, "TVSID");//TVSID is filed name whihc should be in the poly layer pEditor.StopOperation("PolygonDensity"); } else { System.Windows.Forms.MessageBox.Show("Not in edit session"); } } private void GetAllPoitsInsidePolygon(ESRI.ArcGIS.Geodatabase.IFeatureClass pFeatureClass1,ESRI.ArcGIS.Geodatabase.IFeatureClass pFeatClass2,ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum lSpatialRel,String strFeatFld) { ESRI.ArcGIS.Geodatabase.IFeatureCursor pFeatCursor = pFeatureClass1.Search(null,false); int lFld=0; lFld = pFeatureClass1.FindField(strFeatFld); if(lFld == -1) { System.Windows.Forms.MessageBox.Show("field not found: " + strFeatFld); return; } ESRI.ArcGIS.Geodatabase.IFeature pFeature = pFeatCursor.NextFeature(); while (pFeature != null) { ESRI.ArcGIS.Geodatabase.ISpatialFilter pSpatialFilter = new ESRI.ArcGIS.Geodatabase.SpatialFilterClass(); pSpatialFilter.Geometry = pFeature.ShapeCopy; pSpatialFilter.SpatialRel = lSpatialRel; pSpatialFilter.GeometryField = pFeatClass2.ShapeFieldName; pFeature.set_Value(lFld,pFeatClass2.FeatureCount(pSpatialFilter)); System.Windows.Forms.MessageBox.Show("OID: " + pFeature.OID + ", count: " + pFeature.get_Value(lFld)); pFeature.Store(); pFeature = pFeatCursor.NextFeature(); } } #endregion } } I hope this helps you.... Thanks and Regards, Venkat Tammineni
... View more
12-09-2010
12:46 AM
|
0
|
0
|
2070
|
|
POST
|
Hello, How to write a code VB ??? Arcobject that counts the number of points inside each polygon? Please, see the attached image that shows my question I???ve two layers, point layer and polygon layer, I need to write a code that calculate the number of points inside each polygon Thank you kalid
... View more
12-08-2010
01:01 PM
|
0
|
6
|
2647
|
|
POST
|
What is the code that add field to layer and does an operation Please, see the attached image that shows my question When I press the button in the form, I need to add field to the layer ???School??? and to divide the field maths on pupils What is the code? Thank you
... View more
11-30-2010
02:48 PM
|
0
|
1
|
892
|
|
POST
|
Calculating the slope form the raster (Measure type is percent_rise) What does the slope of the value 2500 mean? Please, see the attached image that explains my question
... View more
07-20-2010
02:04 PM
|
0
|
2
|
2192
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-30-2022 10:43 PM | |
| 2 | 05-05-2025 10:33 AM | |
| 1 | 05-08-2025 09:49 PM | |
| 1 | 05-06-2025 11:10 PM | |
| 1 | 02-20-2021 01:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-17-2026
05:06 AM
|