C# is a .NET programming language.

learn more… | top users | synonyms

1
vote
2answers
644 views

How to create GRASS scripts in C# in Windows

Most of the tutorials that I have seen are under Python and Linux. Is it Possible to create GRASS scripts in C# or atleast in Windows. I can create scripts using a different language as a compromise ...
7
votes
4answers
1k views

US One Address locator style missing city, state and zip code fields?

I am using the file: C:\Program Files\ArcGIS\Desktop10.0\Locators\US One Address.lot To do address resolution on a parcel / polygon layer. I'm trying to understand why the file doesn't contain ...
5
votes
2answers
4k views

No constructor defined?

In my C# Console Application, Visual Studio 2010 highlights new FeatureClassNameClass() in my below line of code and states "ESRI.ArcGIS.Geodatabase.FeatureClassNameClass has No constructors defined" ...
6
votes
2answers
2k views

Create a closed polygon from a series of edges given a point

I have a series of points fed into a voronoi graph class that returns a series of edges defining the bounds between these points, the process works it returns a series of edges. I now need to do a ...
3
votes
2answers
898 views

Way to Ensure that the Image Centroid is Within Image Bounds

My application uses the ArcGIS Silverlight API to select polygons from a map layer. It uses the Geometry.Extent.GetCenter() method to get the centroid of the shape and add a thumbtack image at those ...
3
votes
0answers
381 views

How to Create Custom ZoomIn Button that is Windows Tools Button with Custom Cursor?

I want to create large zoomin Button without toolbarbutton. I created a 'Zoomin Script' on axMapContorol. It worked is fine but I can't set cursor. My code is as follows: IMapControl3 mapControl = (...
3
votes
1answer
4k views

Create centreline from a polygon

I am working on a project to create a centerline from a polygon automatically. The user select a polygon and click a button, the centerline will create for him. I have tried the build-in function “...
1
vote
1answer
640 views

Setting color of a feature “street” with a FeatureRenderer

I have a layer with streets and I'm trying to change the color of the streets. I know I asked a similar question, How do I change the colors of my layer file?, and the answer worked for points. ...
3
votes
1answer
2k views

Identify sample doesn't work

I'm trying to follow the Identify snippet from the ESRI ArcEngine SDK http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/Do_Identify_Snippet/00490000000n000000/ The third ...
4
votes
1answer
236 views

How do you convert a SOAP PolylineN from one namespace to another?

I'm doing a proof-of-concept to try to speed up a data service that accesses DB2 databases and a GeometryService on an ArcGIS server using the ADF and the SOAP API. I'm trying to speed up data access ...
3
votes
1answer
719 views

ARCGis LayerToKML Skips Feature Layers and Doesn't Process Layers in Group Layers

I am using ARCGis desktop and have written a quick conversion program to convert my layers to kml but I ran into some issues. It seems the only layers it can process correctly are group layers. ...
2
votes
1answer
760 views

Georeferencing help (GeoTiff into MapWindow6)

I'm a newbie with MapWindow6 and I would like to figure out a couple of things. 1 - Whenever I drag and drop a GeoTiff into the map (MapWindow6) I can not see that image at its place, I mean that ...
2
votes
2answers
906 views

Problems closing dbf-table edited with ArcObjects

To change values and add new values to a dbf-file, I connect to the dbf and use the ITable interface to make the edits. At the end I release the COM-objects of the table and the workspace. But when I ...
5
votes
1answer
462 views

Passing WorkspaceName to another thread for opening?

My winforms app gets an IWorkspaceName from an IDatasetName via the GxObject selected in a GxDialog. I want to pass it across to a worker thread for opening. I know how to write multithreaded ...
12
votes
8answers
5k views

ArcObjects Resources [closed]

What are the best books/web sites for C# development with ArcObjects? The ArcGIS Resource Center is very helpful, but I am trying to find sources with more examples.
2
votes
0answers
162 views

How can I upload an annotation featureclass to ArcSDE using C#?

I can upload the shape files to ArcSDE database successfully,but I fail to upload annotation featureclass.
3
votes
1answer
670 views

Opening a shapefile with roads, how to display the roadnames?

I am using ((AxMapControl)myMap.AddShapeFile( directory, shapeFileName) To display a shape file which has road data. Now the roads display properly, but the road names aren't displaying. How can ...
1
vote
1answer
493 views

How to Save a Raster or Polygon to ArcMap Table of Contents in C#?

Just as the title says, I want to save the Raster to the table of contents. I have a Raster displaying on the ArcMap IDisplay, but I can't figure out how to save it to the Table of Contents in ArcMap....
7
votes
2answers
3k views

Deploying Application With C# GDAL/OGR Bindings

I developed a relatively simple web app that uses the C# OGR bindings to do a couple of simple geometric functions; buffer, clip...etc. I developed this application on my local machine, which has ...
8
votes
3answers
2k views

Creating floating-only (non-dockable) window in ArcMap using ArcObjects?

I'm looking for a way to create a floating window in ArcMap. To give an example just look at the window of the Identify tool. Floating means that it stays in front of the map document at all times ...
4
votes
2answers
794 views

Maturity of Mapserver mapscript C# bindings?

I've been thinking about possibly porting an internal custom GIS application built on top of Python / PyQt / Mapscript / GDAL-OGR / PostGis to C#. I was wondering about the maturity of the C# ...
2
votes
1answer
2k views

With Geographic Coordinate systems, why does my spatial query select all features from a feature layer?

Background: Add-In for ArcGIS 10 Desktop via ArcObjects for .NET The below code returns ALL features for the layer when the map is specified with any Geographic Coordinate System. However, the below ...
4
votes
3answers
555 views

Image of police car -> dynamically draw police car number

Let's say I have 10 police cars using the same image, and I want each one to be numbered 1 - 10, but the number 1 is dynamically drawn on top of the police car image. What is the class / interface I ...
3
votes
1answer
615 views

Is it possible to figure out which “Path”(PointCollection) is clicked on within a PolyLine?

I am using ArcGIS WPF's Polyline to plot several lines (PointCollections). Adding a Path(PointCollection) looks something like this. PointCollection collection = new PointCollection(); PolyLine ...
0
votes
2answers
2k views

Accessing raster dataset's attribute table? [closed]

I need to loop through the rows in the raster attribute table and add a date for each row.
1
vote
3answers
2k views

Developing ArcPad 10 forms with Visual Studio?

I have been trying to develop solutions with ArcPad 10 Studio for a while now and finding it restrictive. I would like to use the Visual Studio environment to develop ArcPad 10 solutions (form ...
8
votes
2answers
1k views

Can custom map tiles be consumed via ArcObjects within my ArcGIS 10 Desktop AddIn?

Can I programmatically consume and render custom map tiles in ArcMap via our ArcGIS 10 Desktop AddIn? The AddIn is built using the ArcObjects SDK for C#/.NET and ArcGIS 10. Pulling and rendering map ...
12
votes
12answers
8k views

Learning .NET for ArcGIS (mainly Desktop) use?

I have basic programming skills (I program simple vba python and lisp scripts and had gone through a java course a long time ago), but it seems to me (judging by ESRI publications) that there is no ...
2
votes
1answer
924 views

IElement added to IGraphicsContainer ignores zOrder

I display a balloon callout after casting a axMapControl.Map to a IActiveView and doing this: pGraphicsContainer = activeView as IGraphicsContainer; pGraphicsContainer.AddElement(pElement, zOrder); ...
1
vote
1answer
627 views

Custom Layer not drawing using ArcObjects?

I have a Customer layer which inherits BaseCustomLayer. I add it to my MapControl via addLayer but the function public override void Draw(esriDrawPhase drawPhase, IDisplay Display, ITrackCancel ...
0
votes
1answer
1k views

Use lat / long to create polyline that can be passed into DrawPolyline

public void DrawPolyline(ESRI.ArcGIS.Carto.IActiveView activeView) { if(activeView == null) return; ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay; screenDisplay....
5
votes
5answers
9k views

How to convert coordinates from Gauss-Krueger to Longitude/Latitude?

I'm a newbie in the GIS world so please advise me :) In my .NET/C# project I need to show some shapes/points on the Bing Map. The problem is I have the Gauss-Krueger coordinates and need to convert ...
1
vote
1answer
1k views

Convert from ITM ref to GPS ref?

How can I convert from ITM ref (Israel new map) to GPS ref and from GPS ref to ITM ref? I need any C# sample code or formula for this. For example: 32.086156,34.769239 = 178364,665948 Or : 29.548783,...
5
votes
1answer
238 views

When a class in an ArcGIS extension should be an ArcGIS class

Visual Studio templates provided by the ArcGIS SDK offer a "ArcGIS Class" which is a simple C# class that has the attributes Guid, ClassInterface, and ProgId before the class declaration. While adding ...
4
votes
1answer
195 views

Is the ServerAction Method Required in a ImapServerCommandAction?

I am using an ESRI toolbar control buddied with a map control. I am using a command. Below is a simple example. My question is to clarify - having the ServerAction method is a requirement when you ...
6
votes
3answers
962 views

Server Object Extension doesn't work

I built a server object extension in C# and Visual Studio 2010, using the ESRI sample for the Spatial Query SOE as a starting point. (see the page on resources.esri.com) The SOE never displays a ...
1
vote
5answers
1k views

Store Geometry in a database with the ESRI Silverlight API

Is it possible to store geometry objects in a database using the ESRI Silverlight API? For this particular case, the client may have SQL Server 2005 installed instead of 2008 and therefore I can not ...
10
votes
1answer
982 views

Implement ArcGIS Custom Features with C#?

Is it possible to implement custom features in .NET? If so, how? I suspect the issue is being able to do COM aggregation with .NET, but I can't find anything on that ... Does anyone know if it is ...
-1
votes
1answer
2k views

ASP.NET: store class properties in session and use of session handler — is it good design? [closed]

I have a class called EditMapUtilities. Here are some class properties that I want to persist: public class EditMapUtlities { public static Boolean isInitialEditMapPageLoad { get { ...
21
votes
9answers
7k views

How can I implement ESRI REST API?

ESRI announced that they are releasing the ArcGIS REST API as open technology. I've got an ISP running Sql Server 2008 with IIS7. Does anyone know of a good walk through showing how I can write C# ...
2
votes
3answers
684 views

Verifying that ArcInfo Workstation is Installed?

What is the best way to verify that a machine has ArcInfo Workstation installed? A code sample in VBA, VB or C# would be great!
3
votes
1answer
482 views

ITopologicalOperator and Z Values

I have 2 polygon featureclasses with Polygon ZM features. I am trying to do a ITopologicalOperator.Difference() on these feature classes but it errors saying that: Geometry cannot have Z values ...
4
votes
2answers
1k views

Unable to cast COM object (IMapServer --> IMapServerObjects)

I have just deployed an AGS-based application to our web server. This app worked great in development, but after deployment to the server I got the following error: Unable to cast COM object of type '...
6
votes
2answers
1k views

MapScale not being persisted properly in mxd when programmatically changed outside of ArcMap environment

I am trying to change the scale of a map in an mxd OUTSIDE of ArcMap in a standalone Windows application. The problem is the scale is never persisted - the best code I have come up with is the ...
6
votes
4answers
18k views

Converting latitude and longitude into northing and easting?

I have the following UK postcode dy8 3xt and know that the latitude and longitude is:- 54.452772 -2.156082 I also know that the Easting, Northing for the postcode is:- 389490 283880 However ...