A framework, developed by Microsoft, that compiles any of several COM-based programming languages into machine-executable language.

learn more… | top users | synonyms

1
vote
1answer
1k views

Writing In-memory IFeatureLayer to Shapefile using ArcObjects (Engine SDK)

I've been working on this for a little while now, and can not seem to get this thing working. I've managed to export a geodatabase feature class and shapefile to a shapefile, but what I'm struggling ...
1
vote
0answers
210 views

Looking for .NET Heat Map API / SDK

I have a requirement to add a 'heat map' style layer to a Javascript/jQuery based application that I am working on. So far, I have used heatmap.js with no problems at all. My only concern with this ...
4
votes
3answers
312 views

How to use ITrackCancel to escape IRubberBand track?

I have a BaseTool for AX_MapControl and AX_PageLayoutControl that allows to draw a polyline via IRubberBand. But once the rubberband is started, you can't cancel it e.g. by hitting escape. I found ...
2
votes
2answers
1k views

How to perform transformations using ProjNet?

While writing some unit tests I thought it would be convenient/possible to use ProjNet to convert from EPSG:4326 into several other coordinate systems (3875,3395). I figured it would be as easy as ...
2
votes
0answers
60 views

Is there an easy common gis abstraction available in .Net

Is there an easy common gis abstraction available in the .Net programming world that cuts the dependency to a concrete gis implementation, e.g. to the esri silverlight/wpf sdk. ... for example ...
5
votes
1answer
2k views

How can I update an MXD file programatically?

I'm using ArcGIS 9.3.1. product line and MXD files. At our customer we have multiple environment (DEV, QAS, PROD) which should be more or less identical except they use different datbases and a few ...
1
vote
0answers
62 views

Viewing Tables in the AxTOControl using ArcObjects

SE, I was wondering if anyone out there has written a Table filter for the AxTOCControl in the ArcObjets Library. I've rolled my own Table view for now in C#, but would like to try and keep things ...
3
votes
1answer
757 views

IFeature.set_Shape The coordinates or measures are out of bounds

I'm trying to add a point to my map, but something with the way I used shp2sde create caused me to have a incorrect spatial extent or something. So I'm getting "out of bounds" error. How do I go ...
2
votes
1answer
756 views

ArcObjects: Setting image of a command button to a partially transparent bitmap

In an ArcMap 10 add-in, I am attempting to create a toggle button of sorts whose image changes based on the button's state. This answer describes how to set an add-in button's image programmatically ...
2
votes
1answer
351 views

Shapes of this entity type not allowed in this layer when CreateFeature() is called

I have the following code that calls on a remote geodatabase server. Everything is connected and working, but when I try to add a point and use featureclass.CreateFeature();, it shuts down. At first ...
1
vote
1answer
275 views

IMapServerObjects.get_Map says object is null reference.

So I am trying to access a map layer, which I can connect to. try { agsconn.Connect(); Log.Write("Connected.", "myclass"); ...
8
votes
3answers
2k views

ArcObjects (ArcGIS for Desktop and C#): How to cast between the ArcMap COM UI and my custom .Net UserControl objects?

I'm creating a utility to run in ArcGIS for Desktop using ArcObjects (9.3.1 SDK) and C#.Net. My prototype involves a toolbar with two comboboxes and a tool. The first combo selects a layer in the TOC, ...
1
vote
2answers
2k views

Georeferencing an image in C# with GDAL

I want to upload a jpeg or some raster image into a C# form and then on entering the latitude and longitudes I need to be able to create an GEOTIFF file of the same image. How can this be done in ...
8
votes
2answers
814 views

C# version for ArcObjects 9.3

Can I use C# 4.0 with the target framework set to .NET 3.5 to develop an extension for ArcMap 9.3? Or does it have to be C# 3.0 or earlier?
5
votes
1answer
145 views

How long should I hold onto (cache) references to IWorkspace, ITable, IFeatureClass?

After many months of programming with ArcObjects, I still feel somewhat unsure about two related issues: For some operations, workspaces and datasets must be explicitly opened before they can be ...
2
votes
1answer
335 views

Are there known issues about UPPER, LOWER SQL functions in ArcGIS 10, file GDB?

Platform: ArcGIS 10 SP3, .NET I use: IQueryFilter queryFilter = new QueryFilterClass(); with ArcGIS .NET SDK and build a query... Does anybody had problems using UPPER(stringField) and ...
0
votes
1answer
848 views

How can i add sharpmap to visual studio2008?

i have just installed visual studio 2008. and i want to add sharpmap or any other tool so that i can add shape file in .net. I have selected sharpmap because by the search i have got that sharpmap is ...
0
votes
1answer
433 views

CenterPoint of Polygon in ArcEngine .Net 10

I am currently trying to get the center point of a polygon. In GIS, i can see the "x" mark in the center of the polygon, but I do not know how to get it from the IPolygon object. I tried getting the ...
3
votes
1answer
926 views

C# Library for converting Shapefile Projection

Is there any C# library which can take a shapefile as an input with projection information defined (e.g, EPSG 3011) and return a new shapefile with user specified projection (e.g, EPSG 4326) ?
6
votes
2answers
748 views

Basic .NET mapping components?

Which .NET mapping components are currently available? Focus is on desktop use and fairly basic mapping of SHP files (thematics etc.), not the more advanced GIS functionality (reprojections, clipping, ...
5
votes
1answer
1k views

'invalid url' on ArcGIS server REST API

From time to time, the services on our ArcGIS server will not be available, and when requesting tiles, I will get a 'invalid url'. This is okay, sometimes it is scheduled downtime, maintenance or just ...
4
votes
2answers
449 views

How to generate an image from WKT?

I am looking to programatically generate an image from a WKT string (or any other common format, such as WKB or SQL Spatial geography). Are there any existing libraries that allow for this? I am ...
2
votes
1answer
126 views

IGPutilities in IGPFunctions

Quick question, in Esri's area calculation sample of IGPFunction implementation they use IGPUtilities but they don't release the instance. On the singletons page in SDK help they list GPUtilities as ...
5
votes
2answers
1k views

How can I write a GEOTIFF in C#?

I want to upload a jpeg or some raster image into a C# form and then on entering the latitude and longitudes I need to be able to create an GEOTIFF file of the same image. How can this be done in ...
14
votes
1answer
1k views

Calling arcpy/python from .NET?

Are there any available examples that show how python can be integrated into a .NET ArcGIS Addin or Extension? I have a series of python scripts that I would like to call from form events (e.g. button ...
9
votes
1answer
396 views

Any experiences or “gotchas” integrating Whitebox GAT (free and open) with the ArcMap UI?

I wrote a number of ArcGIS VBA automations in grad school; however, they're fully dependent on the ESRI SpatialAnalyst extension, which is not only closed-source but expensive to the point of ...
4
votes
3answers
2k views

Visual Studio 2010 templates for ArcGIS missing

It seems that I do not have ArcGIS templates in VS 2010 templates folder - \Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\ and as a result ArcGIS ...
1
vote
3answers
956 views

C# library for bounds based geometry search

I am searching for C# library which has code that builds spatial index in memory based on geometry bounds and enables fast searching for all geometry inside given bounds. I prefer free library.
9
votes
2answers
273 views

Custom implementation of ArcGIS function

I would like to find out what it takes to create a custom implementation of an ArcGIS function. In particular, I would like to implement GeoAnalyst.ISurfaceOp2.Visibility() in order to get it to run ...
5
votes
1answer
3k views

.NET Entity Framework with PostGIS?

Is it possible to use the .NET Entity Framework with PostGIS? I've reviewed a few options, including hookup it up with Npgsql using ...
0
votes
1answer
261 views

ArcGIS 10 IGPFunction2 and IGPFunctionFactory Implementation

I'm creating a custom ArcToolbox tool in C# .NET in ArcGIS 10 SP2. Though I seem to be having two issues which maybe related: Firstly, my tool is run as a background task i.e. the GP dialog does not ...
4
votes
1answer
460 views

How to use ICalculator with a pre-expression in C#

Another wonderful predicament. I am trying to use an instance of ICalculator to update a field based on another field. Textbook stuff. Unfortunately, the example in the SDK for C# is a bit lacking. ...
2
votes
1answer
651 views

Schema Lock issue when using ITable.AddField via ArcObjects

During a process I am running, I sometimes need to create a field that is missing in an attribute table. Unfortunately, the program is complaining that the table I am adding the field to has a schema ...
3
votes
1answer
357 views

Problems reading data from a file geodatabase using an OleDbConnection

I'm able to connect to an ESRI fgdb using an OleDbDataAdapter and read the attribute table just fine - from within visual studio. However, when I put the code inside a windows service it crashes (no ...
2
votes
1answer
518 views

How to control which Fields are exported in ArcObjects? (via Field Mapping)

In ArcMap 10.x, if you use the Export Data command on a layer that has hidden/disabled fields, those fields will not be present in the created feature class/table. My question is simple: how do you ...
2
votes
0answers
362 views

GeoPDF Library for .NET or JavaScript

Anyone know of any open source .NET or Javascript libraries for creating GeoPDFs? I know of QuickPDFLibrary, but i'm preferably looking for something open source. I want to programmatically generate ...
3
votes
0answers
246 views

IUniqueValueRenderer on Polyline and Points made my Features all invisible

I am currently using IUnique value renderer like this: foreach (string nodeType in nodes) yield return new KeyValuePair<string, ISymbol>(nodeType, CreateNewSymbol() ); public static ...
4
votes
1answer
283 views

Directory.GetFiles vs. ListDatasets - Which is the tool for the job?

I'm currently writing an arcobjects app that performs an arbitrary set of geoprocessing tasks on a group of shapefiles and/or dbf tables. My current implementation uses Directory.GetFiles to build an ...
3
votes
1answer
456 views

Unable to create temporary GeoDatasets in g_g_g folders

I am converting a VBA macro that was written for ArcGIS 9.3 to a VB.NET project using the ArcGIS 10.0 .NET SDK. I am getting the following error whenever the code tries to create a temporary ...
6
votes
3answers
1k views

.NET library to convert KML to WKT?

Anyone know of a free OpenSource .NET library i could use to convert KML to WKT? I know i can use openlayers and there are many JavaScript possibilities, but i need to do this on the back-end.
3
votes
2answers
351 views

uniquely identify feature classes & compare them for equality

I want to implement EqualityComparer<T> for feature classes so that I can stuff them into a Dictionary or HashSet. For motivation, say that I am looping over many IFeature objects which belong ...
0
votes
1answer
269 views

IUniqueValueRenderer with three fields

I have found some ArcObjects code to get unique values on one field for a IUniqueValueRenderer but I can't conceptually wrap my head around how to do that with 3 fields. Would this be .Net code or is ...
2
votes
3answers
322 views

List layers in directory .Net ArcObjects or plain .Net — C# preferably

Any code samples to list arcgis layer files from a directory so they can be looped over?
0
votes
2answers
5k views

How to convert lat long to meters using Mercator projection in C#

I have set of lat long values and I want their equivalent in meters using Mercator projection in C#. Can you please post some sample code or api example of some library that does exactly this?
3
votes
1answer
243 views

ArcObjects .NET: Get more info out of COM Exceptions - how to get description info from ErrorCode?

Ok, I can trap the COM exception and convert the ErrorCode to the proper enum, (e.g. esriGeometryError.E_GEOMETRY_WRONGTYPE). But is there a way to get the error description from the enum? For ...
4
votes
3answers
1k views

Any .NET library to calculate polygon area?

Is there a .NET library to calculate area enclosed by polygon made up of geo coordinates (lat longs)?
2
votes
1answer
2k views

How to determine if a mouse click falls within a polygon

I have a polygon drawn on top of a layer using the graphicsContainer of the current activeView, then I want to be able to show a custom context menu if the user right clicks INSIDE the polygon. So I ...
6
votes
1answer
803 views

ArcGIS 10: AddIn Extension loading toolbox issue

I have an extension class in an ArcMap addin project of which loads a custom toolbox into ArcToolbox when the user opens ArcMap or opens a previously created map. My toolbox gets added to ArcToolbox ...
3
votes
2answers
317 views

ArcObjects IFeatureConstruction::PlanarizeLinesFromCursor error

I wrote a little tool in ArcObjects/C# for planarizing a line feature class. I am using IFeatureConstruction::PlanarizeLinesFromCursor because I need to apply a query filter. Now, I figured out a bug: ...
4
votes
2answers
1k views

How to unproject WKT to WKT in .NET?

I have WKT in this format: GEOMETRYCOLLECTION(POLYGON((491990.250718 6212873.59755,491492.160493 6212904.94117,491265.64715 6212790.54445,491319.517251 6212550.36334,491579.624164 ...