Tag Info

New answers tagged

1

If you take a closer look at the documentation example, you'll notice that they use the IFeatureClass::AddField function IField guidField = new FieldClass(); IFieldEdit guidFieldEdit = (IFieldEdit)guidField; guidFieldEdit.Name_2 = "OldGlobalID"; guidFieldEdit.Type_2 = esriFieldType.esriFieldTypeGUID; guidFieldEdit.DefaultValue_2 = null; ...


0

Try following the link from @KirkKuykendall which leads to Bing Maps Road: This LPK file contains the Bing Maps Road web mapping service. Requires ArcGIS 9.3.1 or more recent.


0

As a workaround, the documentation recommends calling Python from out of process. While the topic is on arcpy, it should apply to anything that uses Python in the stack. I'd strongly recommend contacting Esri support to address this particular issue, though. It may already be in their knowledge bade with a solution.


0

Had a quick search on Google for what R6034 meant and here are some threads, it may not even be anything to do with ArcMap? Thread Reason StackOverflow Q&A And a whole load more...


0

Using your code: private IPolygon BoundingPolygon() { try { IGeometryBridge2 pGeoBrg = new GeometryEnvironment() as IGeometryBridge2; IPointCollection4 pPointColl = new MultipointClass(); // edited here int numPoints = pList.Count; WKSPoint[] aWKSPointBuffer = new WKSPoint[numPoints]; for (int i = 0; i < ...


0

With 10.0 and Oracle 11g I can open an esriDataSourcesGDB.SqlWorkspaceFactory using a property set as you describe above. However from 10.1 forward I've had to change my programs to use esriDataSourcesGDB.SdeWorkspaceFactory and the following property set: IPropertySet propertySet = new PropertySetClass(); propertySet.SetProperty("SERVER", ...


1

ESRI have "improved" their forum site and it's now hard to find any of the archived threads but I did find this code fragment in a thread from 2008. I've done very little in Engine so this may be a red herring? ICommand command = new ControlsZoomToSelectedCommandClass(); command.OnCreate(this.axMapControl1.Object); command.OnClick();


0

Algorithm to get desired result: Take the Line in focus Add some buffer (0.0000005) at Right (or Left) side of the Line geometry. Check whether buffer geometry is ‘Inside’ the Polygon geometry or ‘Overlap’ with Polygon geometry.


0

This is possible in python using FeatureClasstoFeatureClass with Fieldmappings. You can also rename fields at the same time. So if you have a Featureclass with FIELD3,FIELD2,FIELD1 and you want the result to be FIELD1,F2,F3 then the following code should accomplish this. arcpy.env.overwriteOutput = True input_fpath = ...


0

This answer was submitted by @Vince in the comments to the initial question. In a direct connection the Instance parameter needs to look like this INSTANCE = sde:sqlserver:(servername) and the Server parameter is ignored. More information can be found here


1

iTopologyExtension interface is part of the ESRI.ArcGIS.EditorExt namespace, so you need to import this namespace at the top of your module (and also check it is added to references): Import ESRI.ArcGIS.EditorExt Or if you don't want to import, just reference iTopologyExtension in full: Dim pTopoExt As ESRI.ArcGIS.EditorExt.ITopologyExtension I think ...


0

The solution was to set IGeoProcessor2.AddToResults to false. Something like IGeoProcessor2 gp = new GeoProcessorClass(); gp.AddToResults = false; IGeoProcessorResult results = new GeoProcessorResultClass(); IVariantArray parameters = new VarArrayClass(); parameters.Add(tempFC); parameters.Add(outFC); results = ...


1

include ESRI.ArcGIS.DatabaseSourcesFile in your project here is a C# code showes you how to open a shape file,you can convert it to VB.Net simply IWorkspaceFactory ipShapeWF = new ShapefileWorkspaceFactoryClass(); `//strfilepath the path to shape file,include only folder not shape file itself' IWorkspace ipShapeWS = ipShapeWF.OpenFromFile(strfilepath, 0); ...


0

You require to check out the licenses of the extensions required: aoInitialize.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCode3DAnalyst); aoInitialize.CheckOutExtension(esriLicenseExtensionCode.esriLicenseExtensionCodeSpatialAnalyst); When using an ArcView or ArcEditor license, a program must explicitly use AoIntialize, and ...


1

Just an idea but you seem to be constructing your rectangle from a ring and the help talks about wrapping rings in higher level geometry. If it were me and as it looks like you are building a simple rectangle I would have built the polygon this way (not sure it makes a difference but worth a try?)... Dim pPolygon As IPolygon4 Set pPolygon = New Polygon Dim ...


1

I have never tried them myself, but it looks like the iScreenDisplay interface has rotation functions: iScreenDisplay Also check out screenDisplay.DisplayTransformation.Rotation() Might be a good starting point.


0

I figured out a few reasons why my WMS layers were not drawing: I was adding individual WMS layers to the map - layers will not draw unless the full parent WMS group layer service is added - individual layers can then be turned on/off as desired. Folder permissions on our ArcGIS server were set incorrectly for WMS service. I'm not sure why it was letting ...


1

try this using ESRI.ArcGIS.DataManagementTools; FeatureToPolygon featureToPolygon = new FeatureToPolygon(); featureToPolygon.in_features = pInWorkspace.PathName + "\\" + pInFeatureClassName.FeatureDatasetName.Name + "\\Temp_Line_UnNamed"; featureToPolygon.out_feature_class = pInWorkspace.PathName + "\\" + pInFeatureClassName.FeatureDatasetName.Name + ...


0

You are looking for the ITopologyProperties.Classes property. Use this sample code to get a reference to your topology. From your ITopology, get ITopologyProperties. Store ITopologyProperties.Classes in an IEnumFeatureClass. Use the sample code here to enumerate over your IEnumFeatureClass to get the feature class you want (since multiple feature classes ...


0

I think @MichaelMiles-Stimson is right and you should use the SdeWorkspaceFactory instead of SqlWorkspaceFactory and then solve the following errors you mentioned. The examples are here and this way works in our project.


1

You'll need to define both a horizontal coordinate system (could be projected, like UTM) and a vertical coordinate system (like NAVD88, making sure to be in the same units as your horizontal). A vertical coordinate system expresses elevations relative to a baseline, usually a mathematical representation of the Earth's surface. Your measured elevations ...


0

The order of parameters is incorrect. Have a look at the Project tool help page, your parameter order must be the same as this. Also what is "GCD_WGC_1984"? To my knowledge that's not a coordinate system, I'm guessing you meant GCS_WGS_1984? But that's academic as your parameters are out of order!


1

That should work without problems, double check if the parameters that you are passing to the IPropertySet object are right. Are you writing the "serverinstance" property properly? that's the most common problem. IPropertySet propertySet = new PropertySetClass(); propertySet.SetProperty("dbclient", "SQLServer"); ...


2

See this question: Event raised when selected layer changes in TOC, but it will unfortunately not be good news for you, as no event of such kind is available in ArcObjects. The answers will provide some hack-ish workarounds which you may find useful.


0

I recently dealt with a similar problem; I wanted to pass an SDE layer as .near_features and it only worked when I passed the layer's path string. Talked to the Esri Support and they came back a few days later and said it was a bug. Bug number: #NIM102924 Synopsis: Generate Near table geoprocessing tool s "Near Features" parameter doesn't accept ...


0

If you have Spatial Analyst but not 3D analyst, we (a university team) created an ArcGIS 10.0 addin that computes regular and weighted Voronoi polygons using a raster methodolgy. The addin itself is free and the code is open source. https://github.com/UNTGeography/VoronoiDiagramsGIS


2

You need to access the active document in order to get access to layers. Create a reference to the document using your IMxApplication object (pMxApp): Dim pMxDoc as IMxDocument = pMxApp.Document Then access layers through focusmap: Dim pLayer as ILayer = pMxDoc.FocusMap.Layer(i) Where "i" is the index of your layer.


2

ArcGIS Online has a full REST API: http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r300000267000000 It's also worth mentioning, that the ArcGIS Runtime SDK for WPF and upcoming successor ArcGIS Runtime SDK for .NET provide .NET APIs for interacting with ArcGIS Online items (among many other things).


0

After spending a week going nuts we went through several iterations trying to find a solution to getting nearest point. We don't know or understand if NearestPoint creates edge issues or if the polygon is just rougher than the actual raster. We tried several steps to actually affect the nearest point: Fibonacci Sequence generating a golden spiral to ...


0

After a great deal of research, I found that Near documentation STATES that the second parameter is a FeatureLayer. However it can contain multiple geographies, so in their usual undocumented way, this tool takes only a string representation of the data. This opens up so many possibilities of issues that I did not want to think about it. What I did ...


0

You may use the IFeatureDataConverter.ConvertFeatureClass method. Here is a code snippet: Converting simple data


3

The method for removing a feature depends on the cursor. If you are using a recycling cursor: pCur = pFeatClass.Search(null,true) do not call delete in any way, shape or form. Calling delete on a recycling cursor removes the buffer so there is nothing to load the next feature into which is why it's getting cranky when you call NextFeature() - you've already ...


0

I find that Beginning ArcGIS for Desktop Development Using .Net (Publisher) to be useful. They break down the operations into decent little exercises that are fairly practical. Plus, you can download their code from the website. Other Suggestions If you are better with Java, you can also do ArcObjects in that language, too. I don't believe there is much ...


2

You can use Trace Geometric Network gp tool and accumulate in_edge_along_digitized_weight {An edge weight that is used as a cost for traversing through an edge along the digitized direction of that edge. The weight must already be defined for the given geometric network} - and - FIND_UPSTREAM_ACCUMULATION. use the accumulated value for the index


0

Note: This answers the question, as asked in the body (about efficient line generation from points), not the title (about how to create a shapefile). As with most aspects of ArcGIS, there is more than one way to construct geometries. The most efficient methodology for bulk conversion (not user interaction), involves use of the ...



Top 50 recent answers are included