Tag Info

Hot answers tagged

15

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: ...


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

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, ...


11

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 ...


8

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


8

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 ...


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

VB.NET vs C# really does come down to, mostly, a matter of opinion. Mine would be strongly in the C# camp, as VB.NET's predecessors (VB & VBA) actively encouraged horrible coding practices ("On Error Resume Next", anyone?) and they live on, in the culture surrounding the language and in gestures towards backwards compatibility. However, given your ...


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

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


5

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 ...


4

A better way to execute tools in VB, VBA, or .NET is to use the IGeoProcessor interface, rather than the dispatch object. This link will take you to a sample of using the IGeoProcessor in VB/VBA to execute tools and return the tool messages: ...


4

VB.NET is a good language, much better than the old VB, but still I am strongly in the C# camp. For someone entering the .NET world, it's better to take advantage of the fact you are essentially in a learning process and incorporate taking on C# in it as well. I will not compare the two languages here as there has been plenty written about them, as well as ...


4

(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 ...


4

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. ...


4

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.


4

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 ...


4

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


4

You need a function that returns the selection set count property on your layer. If the count is >0 than you can enable your button. ISelectionSet.Count Property


4

Instead of checking for a selection directly in the button's OnUpdate routine, which runs very frequently, I would write an extension that uses event handlers to respond to selection events and caches the selection state of your layer, and then in the OnUpdate routine check the extension's cached state. Of course this is probably overkill if there is only ...


4

The syntax for combobox (as well as other controls) is different in VB.NET. You should review the help to see the changes. cmbBox.ListCount --> cmbBox.Items.Count cmbBox.List(l) --> cmbBox.Items.Item(l) cmbBox.AddItem(sItem, l) --> cmbBox.Items.Insert(l, sItem) cmbBox.AddItem(sItem) --> cmbBox.Items.Add(sItem)


4

Rather than try to pick apart your code I will just offer some general suggestions: You will probably want to use a list or dictionary data structure or XML to store your layer names/workspaces and use data binding to bind the list to your user interface. You might consider using a dropdown list or list view instead of radio buttons if there are more than a ...


4

The easiest way is to cast the Map to IMapLayers and call the IMapLayers.ClearLayers method.


4

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)


4

The affine transformation makes no sense if you have lat/lon coordinates and a map in some kind of projection. This is how a map of your region looks in UTM 36N projection: and this is IsraeliTM: You can easily see that the meridians are not parallel, and the latitudes are large circles. Affine projection only works when the grid is orthogonal. Try ...


4

If your application is running inside of ArcGIS your product license should handle the activation of extensions for you. Failing that you can always use ArcObjects to check out the required extensions. How to use extensions (ArcObjects) Extensions provide additional functionality to applications. Before using the functionality provided in an ...


4

If you comment out the Store call, you should be good: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0025000007wv000000 Store should not be called inside of edit events, such as OnCreateFeature, OnChangeFeature or OnDeleteFeature. Even if you are modifying the geometry or other field values, Store will be called once the ...



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