C# is a .NET programming language.

learn more… | top users | synonyms

1
vote
1answer
629 views

Implementing Custom Selection Tool (Adding to current selection) with ArcObjects?

I am trying to implement a custom selection tool in ArcMap 9.3.1 that is functionally similar to the default ArcMap selection tool with "Adding to current selection" enabled. ie. the user can click to ...
1
vote
1answer
329 views

Programmatically creating ArcGIS Image Service and adding it to map using C# / .NET?

How can I programmatically create ArcGIS Image Service and add that service to my MXD file programmatically? I am using C# .Net.
0
votes
0answers
17 views

Get clipped polygon area using ArcObject Issue

I try to get clipped Polygon area using ArcObject. Following is my code: var topologicalOperator = routePolyline as ITopologicalOperator; var routeBufferPolygon = ...
-3
votes
0answers
19 views

How to export coordinate X,Y system from dwg [on hold]

How to export coordinate system X,Y from dwg AutoCAD file using C# .NET code.
1
vote
1answer
15 views

Map matching a stream of GPS points to possible bus routes & C# map matcher

I have streams of GPS points that are transmitted from a device aboard a bus in real time. I would like to use these points to infer which route the bus is following. I have routes stored as GPS point ...
0
votes
3answers
146 views

Arcmap Refresh Button

I am working with ArcMap and C#. In the bottom left hand corner, there is a menu where you can toggle between Data view and Layout View, a Pause button, and a refresh button. I have created an Add-in ...
2
votes
4answers
7k views

Insert Geography data into SQL Server 2008

Can someone guide me to or give me an example on how would one go about insert/query Geography data in Sql Server 2008 ( Polygon with 4 points and Point in specific) using C# EF or Linq2Sql. I've ...
-3
votes
0answers
19 views

Implementing C# identify tool in toolbar using ArcGIS Engine?

Has anybody implemented "Identify Tool" in Toolbar control using C# (visual studio 2013) and ArcGIS Engine 10.1?
0
votes
1answer
202 views

Null reference exception was unhandled by user code error from ArcObjects and c#?

I'm new in programming . i'd like to write a simple code that can create offset from a polyline . i wrote the below code but when run the code i encounter to the error " Null reference exception was ...
0
votes
0answers
11 views

ArcGIS Runtime SDK for .NET (Windows Phone) - ArcGISLocalTiledLayer Issue

I'm developing Windows Phone 8.1 client for our company ArcGIS maps. Online layers works fine, but I need to deliver offline maps (Map Tile Package - .tpk file) to users with bad connectivity. My ...
2
votes
0answers
23 views

Setting Field in ArcMap Symbology Properties using ArcObjects?

I am programmatically rendering a feature layer in ArcMap but I can't set the Field property in the Symbology properties form. This results in the layer having the correct render/breaks/legend ...
1
vote
2answers
2k views

How to use Sharpmap to display spatial data from MS SQL Server 2008

Can anyone show me a step by step example on how to use Sharpmap to display MS SQL server spatial data using C# as the programming language? Please note I have exploit some of the example online but ...
0
votes
0answers
18 views

How to select object on the map in pan mode?

The user moves on the map (pan mode). The he clicks right mouse button. I want to select the element and then display context menu. What is the way to select element on the map in pan mode? I use ...
1
vote
1answer
189 views

C#/.Net Library that can draw a line across the date line

I want to be have an embedded map in my application that can handle drawing lines across the date line. I have tried out dotspatial and sharpmap and neither have been able to handle this. Edit: Here ...
1
vote
1answer
679 views

Converting FeatureLayer to graphics using ArcObjects?

I want to convert a Map or FeatureLayer to graphics on Arcobjects 10.1, Any help or code examples Problem Solved this is the working code: private void Convert_to_graphics( IMapDocument doc) ...
0
votes
2answers
1k views

Unselecting Individual Selected Features using ArcObjects?

In my Add-In built using .NET ArcObjects/C# with Arc 10.0 I would like to be able to programmatically unselect a subset of all selected features gathered through a reference to ...
2
votes
1answer
226 views

Error in Symbol Selector Sample for ArcGIS Engine?

I am stuck at running this ArcGIS Engine Sample code, when I get: COM EXCEPTION WAS UNHANDLED BY THE USER I'm looking for any working example of Symbol Selector. I'm working on XP SP3, ArcGIS ...
3
votes
1answer
202 views

Getting Annotation selection using ArcObjects?

I have annotations stored in mxd document, when I select some annotation, I tried to get the selection through graphics selection, so I always get the rectangle of the dataframe (because I'm working ...
2
votes
1answer
26 views

Executing async method inside relaycommand using ArcGIS Pro SDK and MVVM?

I'm developing a "search tool" dockpane in the ArcGIS Pro SDK using MVVM. I have a button on my dockpane hooked up to a relaycommand in my viewmodel, which trys to call an async method in my model to ...
0
votes
0answers
19 views

Unable to get property 'parse' of undefined or null reference error in building Windows Forum Application in C# by Visual Studio 2010

I am trying to build a Windows Forum Application that will uses to download and display some layer in the Geoserver. But every time that I run the app I will see an error(image). Can anybody help me ...
2
votes
1answer
135 views

How to output ActiveView to JPEG image using ArcObjects?

I have an ArcGIS Desktop extension and I need to extract images from the map. How can I programmatically output the active view to a jpeg image?
4
votes
1answer
234 views

Call ArcGIS Server Buffer command without using SOM

All, I wanted to see what the best way was of calling the geometry service to carry out a Buffer operation on ArcGIS Server 10, without using the SOM. Ideally I want to consume the REST API, using a ...
0
votes
0answers
20 views

Failed to run Local Geoprocessing tool in ESRI runtime sdk

I have created a gpk using the below python script in ArcGIS 10.3.When trying to consume as Local geoprocessing service in 10.2.5,I get below errors. The application is running using developer ...
0
votes
1answer
168 views

Is snapping working when changing from NAD83(decimal degree) to NAD83 Zone UTM 11N(meters)?

I've used the following ESRI snippet to Convert the display extents in Pixels (at the current map scale) and then return out the map units. public System.Double ...
2
votes
1answer
295 views

Can I update the service on ArcGis Server programmatically?

There is Windows Service. This service adds user raster data to the Raster Dataset in sde database. The Raster Dataset registred on the ArcGis Server. This Raster Dataset also was publishing on ...
0
votes
0answers
67 views

hDC of DynamicDisplay is always zero

When I try to access the hDC of my dynamic layer the result is always 0. Is there a way to get a non zero hDC from a layer that inherits BaseDynamicLayer? public class BalloonCalloutLayer : ...
3
votes
1answer
48 views

What is the C# Arcobject I must use in order to set programatically the SQL Query of an LYR file?

I would like to change programatically the SQL Query of a LYR file. I'm developping in C# using ArcObject. Actually I'm able to get an instance of IWorkspaceFactory from an opened layer with this ...
1
vote
1answer
550 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 ...
2
votes
0answers
54 views

Loading Raster with SharpMap (GDAL) doesnt work

i have problems loading rasterfiles (.tiff) with SharpMap I tried initializing a SharpMap GDAL Layer but nothing happens. It doesnt even throw and error when debugging after i set a path for the file ...
0
votes
0answers
23 views

Mouse Double Click Events

I would like to display a Message Box Dialog when the user activates the -esri selection tool- and double clicks anywhere on the map. or when they doubleclick any feature on the map please note that ...
-1
votes
1answer
823 views

How to learn ArcObjects (.NET, C#) for desktop applications but having only Arcmap desktop license? [closed]

How can I learn .NET and C# for desktop applications having only a desktop license? I want to upgrade myself in the development side so I'm trying to learn this stuff and I'm searching all the ...
0
votes
0answers
20 views

Find line where the beginning or end of line touches a polygon with minimal radius

I need to check, If a point from a beginning or an end of a line is nearby a polygon. The target is to check, whether the line is nearly connected to a polygon. The data are coming from a shapefile. ...
6
votes
1answer
720 views

How to read Geotiff tags and pixel per pixel values using GDAL C#

I'm new here and I'm new at programing with GDAL C#. My question is how I can get the value of SRTM GEOTIFF pixel to compare with it's neighbors, and how can I get the values of Geotiff tags.
2
votes
1answer
192 views

Create FeatureClass in Personal Geodatabase and store data

I have to create a new featureClass in my existing personal GeoDatabase. And save some polylines into this featureClass. How can i do it? I need c# code to do this. Edit: I have a problem during ...
2
votes
1answer
45 views
0
votes
0answers
19 views

Running ModelBuilder through .NET does not always created expected geodatabase?

This code is the run a ModelBuilder through C# .NET this ModelBuilder works to convert a (.dwg) autocad file to a geodatabase but the problem is sometimes it works perfect but other times it doesn't ...
0
votes
0answers
40 views

Referencing ESRI feature class in C#

I would like to reference an existing feature in C# web app. I have a web app written in C# that front-ends a SQL Server database. The app uses non-spatial data in general but some of the objects ...
3
votes
1answer
3k 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 ...
3
votes
1answer
659 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
39 views

convert ordnance survey easting and northing data to WGS84 latitude longitude values

The C# code published here is not very accurate as also mentioned by tanoshimi. I think this has to do with the lack of 'approximate Helmurt transformation'. Just curious is anyone aware of some ...
7
votes
1answer
110 views

Adding new map to current project using ArcGIS Pro .NET SDK?

The new ArcGIS Pro SDK for .NET is currently in beta for ArcGIS Pro 1.1, and I'm having trouble with map/project objects. I can add layers to an existing map, but I can't seem to figure out how to ...
6
votes
1answer
477 views

GDAL.RasterizeLayer not ported to the C# bindings?

I am trying to use the OSGeo.GDAL.Gdal.RasterizeLayer(…) from GDAL 1.9.2 and it requires some SWIGTYPE parameters: OSGeo.GDAL.Gdal.RasterizeLayer( OSGeo.GDAL.Dataset dataset, int bands, ...
3
votes
1answer
231 views

How do I use code (preferably c#) to clip all points within a shapefile that are not contained within a polygon?

So the task is simple: I want to take a point shapefile as input and remove all of the points that are not contained within a polygon. I'm using DotSpatial to do this, but the catch is that there are ...
0
votes
1answer
334 views

Coordinate transformation/reprojection using DotSpatial

need some help. The following piece og code worked with an older version of DotSpatial. public static Geometry Project_EPSG25832_To_EPSG3857(byte[] wkb, int SRID) { ...
5
votes
0answers
189 views

Is it possible to add a command to the ArcMap Find dialog context menu?

I think I already know the answer to this... which is "no", but I wrote this up so I'll ask anyways. Is it possible using ArcObjects to extend/customize the ArcMap Find tool/dialog by adding a ...
0
votes
0answers
7 views

Mouse events on ArcGisRuntime 10.2.5

I am upgrading my application from 10.2.3 to 10.2.5 In 10.2.3 you could add mouse events of MouseLeftButtonDown, MouseMove, MouseLeftButtonUp and MouseRightButtonUp on ...
3
votes
1answer
1k views

Feature Layer is not showing the points on the map

I have a simple feature layer. The points will show up if I put the URL in a DynamicMapServiceLayer, but I need to use maptips, so that will not work. Below is my relevant XAML. <esri:Map ...
2
votes
1answer
319 views

How to calculate which zip code is closer to which in USA using C#?

I'm not living in USA, and I'm doing a small project for a company based in USA. The point is that, there are businesses and each of them have their address and zip code. Then, I have a form where ...
2
votes
1answer
262 views

Read DGN file in java or c#

I'm looking solution to read DGN file in java or c# without any success. Gdal makes many problem and doesn't support all element eg. complex element. Does anyone know of a library that supports the ...
0
votes
0answers
10 views

C# library for navigation computations

I am interested in a library for C# that provides computations common in the area of SAT navigation, such as coordinate system conversion (e.g. ECEF to NED), Line-of-sight computations of power ...