Hot answers tagged

18

First, a little background to indicate why this is not a hard problem. The flow through a river guarantees that its segments, if correctly digitized, can always be oriented to form a directed acyclic graph (DAG). In turn, a graph can be linearly ordered if and only if it is a DAG, using a technique known as a topological sort. Topological sorting is fast: ...


15

There are many ways to weight distances for constructing Thiessen polygons. The basic idea in constructing them is based on comparing the distance between an arbitrary point x and two fixed points p and q; you need to decide whether x is "closer" to p than to q or not. To this end--at least conceptually--we consider the distances dp = d(x, p) and dq= d(x, ...


14

With your background I would suggest that a .NET language using ArcObjects would be most familiar and VB.NET most familiar of all. Also, if you are looking at wider career opportunities beyond this project, then my gut feel is still with the .NET environment with a leaning towards C#, just based on the requirements I see employers asking for most often. ...


12

Kirk Kuykendall's recommendation to construct a spherical Voronoi diagram (Thiessen polygons) is a good one, but might have some technical hitches to work out. In the meantime, as an alternative, one can apply the standard raster solution as described in another thread. Use spherical distances instead of Euclidean distances. Here is an example using five ...


10

If you are only interested in the MAX value you can use the interface IDataStatistics. Using it you can get a simple statistical result, with min, max, mean, etc. http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeoDatabase/IDataStatistics_Example.htm


10

What you want is a weighted Voronoi diagram: http://en.wikipedia.org/wiki/Weighted_Voronoi_diagram also know as a circular Dirichlet tessellation when done with multiplicative weights in a 2d plane. Someone seems to have built an arcgis 9 extension to build these: http://arcscripts.esri.com/details.asp?dbid=15481 With a user guide available here http://...


10

I did not per se figure it out becuase i don't really understand what is going on here but I was trying different things until it worked. I am not sure whether it is suppose to work or whether this crudity can even be called a workaround but here it goes: Keep both "ESRI.ArcGIS.AddIns.targets" and "ESRI.ArcGIS.AddIns.11.targets" in the "C:\Program Files (...


8

I've never tried this but it seems like this would work: Create a 3D voronoi diagram of the sphere. This resulting polygons will be roughly centered on the original existing (seed) points. Loop through each resulting vertex to find the one that is farthest from its closest existing point. This point should be the most remote point on the globe.


8

If you know row, column, cellsize and extent, X & Y can easily be calculated. Note this assumes a North up raster. If the raster is rotated you'll need to know the other two affine transformation coefficients (or geotransform in GDAL speak). Also note that the column/row coordinates in the below are from (0.0,0.0) at the upper left corner of the upper ...


7

If the layer implements the IDataLayer interface (most layers do), you can access its IDataLayer.DataSourceName property. For example, for a feature layer, this property will return the FeatureClassName object, which provides various interfaces to examine the data source.


7

You can use the IFieldInfo::Visible property. Here's one way Dim pFieldInfo As IFieldInfo Dim pLayerFields As ILayerFields pLayerFields = pMxDoc.FocusMap.Layer(0) pFieldInfo = pLayerFields.FieldInfo(lIndex) pFieldInfo.Visible = False


7

If you create an ancillary table with the attributes (fkey,xcell,ycell), populated from the objectid and a gridding of the maximum Y coordinate (or centroid coordinate or upper-center envelope coordinate), then you could use SQL to update the table, with something like: UPDATE poly SET num = vtab.rownum FROM ( SELECT row_number() over (order ...


6

The easiest way is to cast the Map to IMapLayers and call the IMapLayers.ClearLayers method which: Removes all layers from the map.


6

Assuming your project is setup correctly, with all references added and compiles without errors. Using Visual Studio Express 2013, ArcGIS 10.3 and targeting .Net framework 3.5 Also ensure you add ArcObjects Library References to: DataSourcesGDB GeoDatabase Carto Public Sub New() On Error GoTo Trap Dim sPathFGDB As String Dim sFCName As String ...


5

I have been working with PolylineZ, PolygonZ, and PointZ feature classes for a long time now, and my experience is that the SHAPE_Length field is strictly XY. Because I do not have 3D Analyst (My employer has not seen fit to get it), I have had to do some fancy geometry to work with elevations. (Yes, vector equations would theoretically be easier, but I'm ...


5

(Converting my comment to an answer) If you already have bounding polygons created for all of your landform features, the vertices of those polygons should already be ordered consistently, assuming they are topologically valid. If so, you should be able to solve this using GP tools: Use Feature Vertices to Points to convert the polygons' vertices to points....


5

Not to be meant as a serious complete answer, but rather just an idea to toss around - I wonder if Thiessen polygons could perhaps be of any use in this case. Now, the trick is to find a reliable algorithm to identify those polygon boundary segments which form the centerline. Once you have the centerline, it is easy to decide on which side a point lies. Any ...


5

I believe that is an indication that VBA is not installed correctly or at all. See this ESRI help document: http://support.esri.com/en/knowledgebase/techarticles/detail/17844


5

Use System.Runtime.InteropServices.Marshal::ReleaseComObject to destroy the ArcObjects before you disassociate their reference.


5

You've declared mxApp, but you haven't actually set it to anything. If you're using an addin, you can set that with the line mxApp = My.ArcMap.Application


5

There are a few concepts that I see you are missing. I will try to explain them. 1- The first one has to do with spatial filter usage. You should pass a filter when you are using it, otherwise, just pass nothing. You have this code: Dim pSpatialFilter As ISpatialFilter Set pSpatialFilter = New SpatialFilter Dim pBlockBoundaryCursor As IFeatureCursor Set ...


5

Yes, since you are presumably using VB.NET (not VB, which is 20+ years old and no longer supported), you need to use the Imports statement to import namespaces. Specifically you want to put Imports ESRI.ArcGIS.Geometry at the top of your code files. Alternatively you could fully qualify the IPoint type every time you use it (ESRI.ArcGIS.Geometry.IPoint) ...


5

Visual C# 2010 Express: Project -> Project Properties -> Application -> Target Framework VB.NET 2010 Express: (thanks Jakub) Project -> Project Properties -> Compile -> Advanced Compile Options -> Target Framework (All Configurations)


5

You can check for the EditState on the editor extension.


5

To find the name of the dataset as stored in the database use IDataset.BrowseName. IDataset.Name will give you the layer name as it is named in ArcMap. You should also test that the layer can be cast to IDataset: If TypeOf currentLayer Is IDataset Then... Things like group layers don't implement IDataset, and will cause an error.


5

It seems you can no longer trust the ISelectionSet.AddList, according to the help document: This method should not be called by .NET or Java applications. Instead, call IGeoDatabaseBridge2.AddList. [C#] This method should not be used in .NET. Instead, use IGeoDatabaseBridge2.AddList. [Visual Basic .NET] This method should not be ...


5

You need to iterate the datasets to get his containing feature classes. Like this: While Not pSdeDSName Is Nothing Dim pEnumDataset = pSdeDSName.Subsets Dim pSubset = pEnumDataset.Next() While Not pSubset Is Nothing If pSubset.Type = ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTFeatureClass Then ListBox1.Items.Add(pSubset....


4

I was trying to think up a solution to this interesting problem but I could only generate more problems! I think there is a scenario that must be considered when stringing the points together to form a polyline and these are spikes as shown in the image below. If this is a sceanrio that never exists then my thought process was: Select points that code up ...


4

Solved, as per George's comment... Using ComReleaser As ComReleaser = New ComReleaser Dim pFCursor As IFeatureCursor = pFClass.Search(Nothing, False) ComReleaser.ManageLifetime(pFCursor) Dim pFeature As IFeature = pFCursor.NextFeature Do Until pFeature Is Nothing ... Try 'Start edit operation ...


Only top voted, non community-wiki answers of a minimum length are eligible