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
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
897 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
160 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
391 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
996 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
566 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
1k 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
894 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
547 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
135 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
2answers
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
491 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
3k 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
1k 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
285 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
4k 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
2answers
321 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
607 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
790 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
409 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
696 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
415 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
276 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
329 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
504 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
407 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
325 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
366 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
6k 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
303 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 ...
5
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)?
3
votes
1answer
3k 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
1k 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
357 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: ...
5
votes
3answers
2k 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 ...
5
votes
3answers
657 views

Looking for a .NET Dijkstra component using Shapefile

I'm totally new to stackexchange and i'm in this beautiful informative place for one problem. I'm a .net programmer and i need to write a program that reads a shapefile and performs routing operation. ...
6
votes
2answers
878 views

How to read data from PostGIS in DotNet (VB.Net/C#)

I have stored my data in PostGIS (PostgrSQL). Now I want to read the data in DotNet ArcEngine Application using VB.NET/C#. Anyone know how to read the data from PostGIS in .Net? Regards
4
votes
0answers
642 views

How to find layer ID and name from Identify query using ArcGIS Web ADF?

I need to retrieve the layer ID of every layer returned by the IQueryFunctionality.Identify function (I am using ADF with .NET) Identify function spits out a DataTable array for layers which have ...
10
votes
4answers
513 views

Does SHAPE_Length take into account elevation values?

Does the Shape_Length attribute take into account the elevation? For instance, if I have 3 points: A, B, and C A.X = 10 A.Y = 10 A.Z = 10 B.X = 10 B.Y = 10 B.Z = 50 C.X = 0 C.Y = 0 C.Z = 10 Then I ...
10
votes
2answers
916 views

ArcGIS 10 add-in: Top-level exception handling

The ArcGIS 10 add-in I'm working on is pretty simple -- just a tool control and a dockable window. I'm handling the specific exceptions I anticipate occuring at the source and throwing everything ...
2
votes
1answer
590 views

Read .DEM (USGS) FIles with C#

I have a huge number of .DEMs and have been investigating how to process them into something useful. Does anyone know how, or even if it is possible to read coordinates and elevation data from ...
4
votes
3answers
947 views

Get part of polyline based on 2 points in Arc Engine

Currently I have a layer with polylines; in another layer, I allowed the user to create 2 points on the polyline. I want to know if there is a function for the polyline feature that I can use to get ...
3
votes
1answer
263 views

Reference to ArcObjects IUknown interface

Does anyone know what the ArcObjects reference library is for the IUnknown interface? I migrated the code below into Visual Studio and there is an error on the "Dim pSelItem As IUnknown" line. ERROR ...
6
votes
1answer
1k views

ArcMap Addin - add interoperability connection programatically

I'm currently building an add-in for ArcMap - ArcView using the .Net framework. The user of ArcMap and the Add-in should access data published from WFS services. I am aware that it is possible to ...
1
vote
1answer
284 views

Integrate ArcGIS 10 extension INTO ArcEngine 10

I was wondering if there is a way at all to use some of ArcGIS 10's extension into arc engine. A good example would be if we could put Arc Hydro extension into ArcEngine. Thanks and Regards, Kev
5
votes
1answer
507 views

.NET And ArcGIS 10x - Where have all the wrappers gone?

With prior versions (to ArcGIS 10x) of ArcGIS, the .NET wrappers used to be placed in a dotnet directory. Where are they located with 10x? With prior versions, I used the absence or presence of this ...
3
votes
1answer
443 views

Choice approaches for passing a selected feature to a method in ArcObjects? (C#)

It pains me to ask such a basic question, but after several hours (not exaggerating) of trying to figure this out and failing, I come to GIS.se What I am trying to do is pass a selected feature ...