Tag Info

New answers tagged

0

You might consider using a spatial cache via ISpatialCacheManager3. The documentation doesn't say if all the featureclasses in the cache need to be in the same workspace, see the Using spatial caching to optimize spatial queries section. I'd be very curious if that is the case. Here's a snippet from that page: // Open the feature classes used by the ...


0

You will want to read up on SOAP ( http://resources.esri.com/help/9.3/arcgisserver/apis/soap/whnjs.htm) and REST (http://resources.esri.com/help/9.3/arcgisserver/apis/rest/index.html) services. At 9.3.1 you could still use ArcObjects, but you had to duplicate all your code because the objects had to be created in a ServerContext. But ArcObjects were still ...


0

Working solution Just to tag this question as answered, I'm reposting my working solution: ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop); m_application = new ESRI.ArcGIS.ArcMapUI.MxDocumentClass().Parent; IWorkspace2 workspace = FileGdbWorkspaceFromPath(@"F:\Projects\!Water\Sewers.gdb"); IFeatureWorkspace ...


1

Instead of using ILayer I've used IFeatureLayer within a cursor (ICursor) and IDataStatistics enumerating by System.Collections.IEnumerator to to get values for a certain column.


1

You cannot directly delete the raster, since your application still has references to it. What you need to do, is to delete all references you are holding to it in code, and then delete it using lower level ArcObjects: IDataset:Delete


1

If you're developing a standalone application you will require a ArcEngine runtime license on the users machine. This is different to the Desktop license which will work if you're developing plugins for Esri tools. It may be worth looking at the ArcGIS runtime SDK for WPF. This is licensed differently and depending on the features you require, may not ...


2

Two thoughts: Why not just use QGIS? It performs a lot more functions than what you are looking for, but is ready to go 'out of the box'. This is a plugin for PGAdmin3 that lets you view postgis table geometries as images (maps).


0

here is a great explanation on how to make heat maps with arcgis 1. Make a copy of your points (usually this goes without saying when using geoprocessing tools....but it really is important in this case because this WILL change the geometry of your original data) Use the Integrate Tool Use the Collect Events Tool (use the count field) Use the Hot Spot ...


0

Can you use geometry instead? If so, you can use MapDotNet Studio to export your shapefile and create a SQL Server table. www.mapdotnet.com. The download is free and you would not need the licensed upgrade for what you are doing. If you must use geography, you could use MDN to create a table using geometry, then create a geography as follows ...


0

You can execute sql statements in the same connection, but arbitrary selections become more difficult. You can take a look at the IWorkspace::ExecuteSql method for DDL or DML. Selections have to be done through either a query layer or a QueryDef.


1

Last time I checked, ArcGIS desktop license does not provide you a design time license for the ArcGIS Engine TOC control. The TOC control used by ArcMap is not re-usable in a standalone exe. You can use RuntimeManager.InstalledRuntimes to see what is installed on the machine, before initializing a license. Since Engine licenses are less expensive than ...


0

I use following code snippet to get selected features from map for a specific feature layer: public List<IFeature> GetSelectedFeatures(IFeatureLayer featureLayer) { IFeatureSelection featureSelection = (IFeatureSelection)featureLayer; var selectionSet = featureSelection.SelectionSet; IFeatureClass featureClass = featureLayer.FeatureClass; ...


0

Here are two examples of getting values from the selected features. This one lists all the values for the feature IMxDocument pMxDocument = ArcMap.Application.Document as IMxDocument; IMap pMap = pMxDocument.FocusMap; ILayer pLayer = pMap.get_Layer(0); IFeatureLayer pFeatureLayer = (IFeatureLayer)pLayer; IFeatureClass pFeatureClass = ...


2

There are a number of issues which could be at play here: You probably changed your data by using 'Fill' because it is designed to change data by filling hydrological sinks. 'Copy Raster' is the correct tool for copying rasters. Clipping can change the max/min values because your resultant dataset is not the same as what you put in unless you clipped to ...


1

You are right in saying that ArcGIS Desktop's Garphing framework is not very developer friendly. If you want to access it, and create graphs, you need to use the IDataGraphT interface. There are many samples and snippets linked on the documentation page. I personally hate the graphs in ArcGIS Desktop. They are ugly, and you don't really have much ...


1

If you are creating an extension that is only accessed from say desktop then consider developing an AddIn extension as these are much easier to deploy on client machines. If you are creating an extension that makes ArcMap talk to say MS Access then a standard extension (COM) would be required but then you have to register it with the OS and deal with admin ...


3

I got this book 2 weeks ago while browsing (again) for books covering your same question. Definitely worth purchasing. It's taken me a while to understand interface programming (that ArcObjects uses) but this guy explains it pretty well in Chapter 5. Lots of sample code and examples on how to create add-in's and extensions. The book covers 10.1 as well. ...


1

You might be able to do this using IDatasetContainer.AddDataset. From the IDatasetContainer documentation: The IDatasetContainer interface lets you move datasets between feature datasets and workspaces. Both objects implement the interface. It should only be used to move datasets between feature datasets and the workspace level within a single ...


1

The following code did work . . . IGeoProcessor2 gp = new GeoProcessorClass(); gp.AddToolbox(@"C:\TestToolbox.tbx"); IVariantArray parameters = new VarArrayClass(); gp.Execute("CreateCoverLayer", parameters, null); Sending in the empty array did the trick.


1

This book came out in March 2013 and covers 10.1 Lots of examples and how-to's... Well worth purchasing... http://www.amazon.com/gp/product/1118442547/


2

From the help on ICursor: Cursors are forward only; they do not support backing up and retrieving rows that have already been retrieved or making multiple passes over data. If an application needs to make multiple passes over the data, the application needs to reexecute the query that returned the cursor. You really shouldn't be passing around cursors ...


0

I've given up trying to do what I want through the direct code APIs and found that using the SOAP services for "Map Server" and "Geometry Server" expose more or less what I need and do not require licensing of additional ESRI components other than the ArcGIS server as I understand it.


1

Ok, this is the most simplistic extension with persistence. Works as expected, see the comments. [ComVisible(true)] [ProgId("Test.TestExtension")] [Guid("FD5E7EA9-DEFC-4AA5-81C8-A378BFA4D506")] [ClassInterface(ClassInterfaceType.None)] public class TestExtension : IExtension, IPersistVariant { private IApplication _application; public void ...


0

double GetXyTolerance() { var map = ArcMap.Document.FocusMap; var spatialRef = map.SpatialReference; if (spatialRef!=null && spatialRef.HasXYPrecision()) { var spRefTolerance = spatialRef as ISpatialReferenceTolerance; if (spRefTolerance != null && spRefTolerance.XYToleranceValid ...


2

Try using the geoprocessor managed assembly instead of the geoprocessing one. You can call execute without a parameter variable, as shown with the system delete below, but im not sure what it will do with a custom tool. Geoprocessor gp = new Geoprocessor(); DeleteFeatures delete = new DeleteFeatures(); delete.in_features = layer; gp.Execute(delete, null);


1

Ensure that "Embed interop types" is turned off for all Esri interop assembly references.


0

Make sure your project references the ESRI.ArcGIS.Client.Toolkit.dll assembly.


1

Both your foreach loops iterate the same list!


0

Some other options: DotSpatial has a Projections library Proj4 is ported to .net as: Proj4Net Proj.net Altough I'm not sure how well maintained these are


2

Yes, in the Config.esriaddinx just remove the text within the categories tag and re-build your solution: e.g. category="" This should eliminate it from being listed in commands within the Add-Inn category.


0

if you're willing to use the GDAL/OGR C# bindings, which you can get here assuming you use Windows, you can achieve what you want via the OSGeo.OSR library and proj4 projection expressions from spatialreference.org. The specifics of finding and installing GDAL/OGR builds for your operating system are covered in other questions and several blog posts. But ...


0

I realize that this an answer to an older thread but if you've upgraded to 10.1, check out the Tabulate Intersections tool in the Analysis toolbox (ArcInfo level). I don't think it handles empty spaces but in theory you could create a bounding box polygon, clip out your original data, merge the clip with your original data and assign the clip with dummy ...



Top 50 recent answers are included