|
POST
|
If you are going to count the number of pixels in your raster then you need your raster to be an INTEGER grid so you can build its attribute table. Is your raster an INTEGER grid? If so you could do this several ways but probably the conceptually easiest way of doing it is to run your grid through a reclassify tool reclassifying NODATA into some integer value that is not being used by the rest of the pixels, then just look at the resulting attribute table and multiply the count by the cell size.
... View more
11-27-2013
05:58 AM
|
0
|
0
|
4049
|
|
POST
|
As of 10.1 you can return a handle on a single selected layer, have a look at this thread.
... View more
11-25-2013
05:21 AM
|
0
|
0
|
977
|
|
POST
|
You still need a NEW sub, that's required to instantiate the object, in your case a Tool. I would look at this page to help you understand how to build an addin.
... View more
11-25-2013
12:02 AM
|
0
|
0
|
929
|
|
POST
|
A Tool requires you to interact with the map display, was this your intention? A button is a control you click on and something happens (e.g. zoom to full extent). Your code does not seem to have the Sub that handles the event. So for a Tool you would expect to see an OnMouseDown event if your button was a Tool button or an OnClick Sub if it is a standard button.
... View more
11-21-2013
05:26 AM
|
0
|
0
|
929
|
|
POST
|
Sounds like you want to "extract by mask", you create another raster (or polygon) and crop back to that, so everything outside the polygon\raster mask is lost. This will change the extent of you image raster.
... View more
11-20-2013
01:22 PM
|
0
|
0
|
1864
|
|
POST
|
There is a way, not sure its documented but you can do it like this: Say you have an output that is connected as an input to the next tool and it has 3 nodes. You click and hold on the node NEAREST to the arrow end of the connecting line and drag it into the tool its pointing to. You then repeat as many times as you require always taking the NEAREST node to the arrow end. Duncan
... View more
11-20-2013
06:46 AM
|
0
|
0
|
2032
|
|
POST
|
If you did obtain some sort of bathymetry data for your lake then have a look at this thread on how to use it.
... View more
11-20-2013
06:35 AM
|
0
|
0
|
4832
|
|
POST
|
Have you tried making a call to Application.DoEvents* in between the first Refresh and the Sleep? *warning - many people have strong feelings about using DoEvents I use Application.DoEvents all the time in my VB .net applications; love it, usually resolves all those sorts of screen refresh problems and I've never observed any significant slowing down of the application. This is how I would call it in VB.
Dim App As New Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase
App.DoEvents()
... View more
11-20-2013
06:17 AM
|
0
|
0
|
2003
|
|
POST
|
Another performance boost is to ensure your Shapefile has a spatial index. A spatial index is not always guaranteed, especially if the Shapfile was built by another application. You can tell if you have an index by simply opening the attribute table and if you see a * in the Shape field header then you know you have a spatial index, goes for attribute indices too. Duncan
... View more
11-20-2013
06:10 AM
|
0
|
0
|
1669
|
|
POST
|
Now you may have been using a fictitious example but would a Textbox be a more appropriate control to enter these numbers? If you select '23' no one will want to keep scrolling down to say 99 every time. Would be much more intuitive to simply type it. The key interfaces are IFeatureSelection and IQueryFilter�??.
... View more
11-18-2013
10:08 AM
|
0
|
0
|
739
|
|
POST
|
pFeatureLayer is the pointer to a layer. So you would get a handle on a layer in a map through IMap.Layer. This returns a ILayer pointer. You would typically cast that into an IFeatureLayer which gives you access to many other properties such as the FeatureClass. Duncan
... View more
11-18-2013
10:01 AM
|
0
|
0
|
1269
|
|
POST
|
Jensen, This can be done in a model or very quickly manually. Run your table with PASS_NUM through the Summary statistics tool and group by PASS_NUM Add a new field to this stats table called "X" copy the FID\objectID into "X", this is your incremental number Join the stats table to your table based upon PASS_NUM copy "X" into TPN Duncan
... View more
11-18-2013
05:46 AM
|
0
|
0
|
1611
|
|
POST
|
Here are some ideas: Are your 2 rasters the same coordinate system? If not re-project one so it matches the other. Do the cells overlay each other, i.e. you are not seeing some sort of misalignment? Are they the same cell size, if not re-sample the zonal layer to match the data layer Your number of columns suggest that they have different extents so your zonal layer may not cover your data layer, not sure that is a problem but try to fix that? Duncan
... View more
11-18-2013
05:39 AM
|
0
|
0
|
1640
|
|
POST
|
You need to show us the part of the code that creates pOutFBuf.
... View more
11-18-2013
05:17 AM
|
0
|
0
|
604
|
|
POST
|
You can get a handle on the Workspace of a layer in the map document through IDataset. So something like: Dim pDS as IDataset
pDS = pFeaturelayer
Dim pWS as IWorkspace
pWS = pDS.Workspace Duncan
... View more
11-18-2013
05:09 AM
|
0
|
0
|
1269
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-03-2026 07:31 AM | |
| 3 | 06-29-2026 05:17 AM | |
| 1 | 02-15-2023 05:45 AM | |
| 1 | 06-16-2026 02:37 AM | |
| 1 | 06-15-2026 08:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
4 weeks ago
|