C# is a .NET programming language.

learn more… | top users | synonyms

0
votes
1answer
12 views

SharpMap & BruTile library: Method not found

I'm using SharpMap 1.1 and BruTile 0.12.0 in my project. when I try to add a Tilelayer to the map the program stops with an unhandled exception of type System.MissingMethodException. ...
0
votes
2answers
49 views

ArcMap keeps crashing whilst using simple C# .NET addin

I honestly have no clue what is causing this. I want to have a message appear that tells me which layers are selected or not. Here is my code: using System; using System.Collections.Generic; using ...
0
votes
0answers
13 views

Start Editing Return Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

I'm using IEngineEditor.StartEditing method to start an edit session on SDE Workspace. My workspace is having a right value because I have no problem to get a feature class using it. I'm not sure ...
1
vote
2answers
51 views

Which version of C# should I learn for ArcObjects with .NET?

I'm wanting to pick up ArcObjects and have decided on C# over VB as my language. I know that arcpy uses python version 2.7. If I had started learning python 3.2 to learn arcpy I'm sure I would have ...
0
votes
0answers
22 views

Offline Maps API for C# Desktop Application?

I have a C# WPF application which has browser control to display a Google Map. Google Maps API v3 is being used in the application. I use data received from a service to plot users current location ...
0
votes
0answers
23 views

How to Read GDB from c#

I am trying to read .gdb file using osgeo api i go for following code but cant read. suggest me. string File= @"D:\GDB File\Demo.gdb"; public IConnection OpenFDOSourceConnection(string File) ...
1
vote
0answers
22 views

featureLayer.UpdateCompleted problem?

I am trying to show a particular kind of rendering to my geometry when a user clicks on the record of a feature data grid and zooms to the selection but cant figure out as to what i am doing wrong.. ...
0
votes
0answers
24 views

ArcGIS Runtime .NET resources

Are there any books/blogs/youtube channels/websites, for beginners, that provide training for ArcGIS Runtime for .NET (C#). I know of this resource provided by ESRI (which seems quite good upon ...
0
votes
0answers
29 views

Copying Feature from shapefile to new shapefile in c#?

I am Creating new shapefile from shapefile such as (Parcels.shp to Parc.shp) and i am success to copy one feature at a time but getting error when copying multiple feature suggest me. done:copy one ...
0
votes
2answers
33 views

Adding STAThread to an ESRI Addin

I am a bit stuck at the moment, I have a c# addin, which as part of one the methods, contains SavefileDialog object. The code also contains a Timer. The steps for the user is: Click on the map ...
0
votes
0answers
38 views

Searching for features added in an edit session with QueryFilter only works when using object id or no WhereClause

I'm getting strange behaviour reading added features from a feature class while within an edit session. The feature class is in a personal geodatabase and is open in the map control in an ArcEngine ...
0
votes
1answer
13 views

Deleting an invalid inmemory layer from the Table of Contents

I am writing an ESRI addin (in c#) where in_memory layers are used. When the user opens the map document and activates the tool, the tool checks whether the in_memory layer is valid or not, and if it ...
0
votes
1answer
21 views

ArcObjects WPF Legend Toolkit Control doesn't show layers

I'm starting to develop GIS applications using ArcObjects for c# and WPF. I have to say: what a difficult disorganized and not well documented API, but that's another story. I'm trying to migrate a ...
0
votes
1answer
41 views

Track Map Events in ArcObjects Dockable-Window Addin

I'm building an Addin for ArcGIS 10.2 with c#. It is a dockable Window, that will host some controls for our custom export solution. I want to listen to Map-Move events of the main map ...
0
votes
2answers
62 views

Convert labels to Annotation addin crashes ArcMap

I am trying to write an ArcMap (10.3) Add-In in C# .NET that will convert labels to annotation. I have used a majority of the code from the relevant snippet on the ESRI resources website. When I run ...
0
votes
0answers
16 views

What is the best practice for adding a new point to an existing feature class using C#

I have a web application developed in C# (VS 10). There is no visual GIS functions in my application, however I need to let users add new locations in an existing feature class, which is available on ...
1
vote
0answers
15 views

FDO Geometry to GeoAPI Geometry [closed]

I doing a project on Shape File .I am trying to convert FDO Geometry to GeoAPI Geometry. suggest me.
0
votes
0answers
9 views

using c# arcgis zoom in / out fails after saving mxd

I saved the map to mxd with some zoom level. when i retrived the map it is not retaining the zoom level and also the zoom level is not changing even if we try to change the map boundary
1
vote
0answers
26 views

Optimize Code for Spatialdata intersection

I am working with ArcGis with c# and I Face some major issue and I do not reach why that issue is occurs. I am creating a shape file using ArcGis SDK which is created successfully. I have 500000+ ...
0
votes
0answers
48 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) { ...
-4
votes
2answers
50 views

Create Blank ShapeFile in C#

I just want to create a Blank Shape file using c#. Any one suggest me code for it.
1
vote
2answers
60 views

Casting ILayer to IFeatureLayer in ArcObjects 10.1

I'm trying to use the following code in an ArcMap extension: private IFeatureLayer getLayer(string lname) { IMap map; IFeatureLayer flayer; IEnumLayer ...
1
vote
1answer
28 views

Releasing features from a recycling feature cursor

I have a recycling feature cursor that is used to fetch a single row. Is it my responsibility to release that returned feature, or will it be cleaned up by the cursor as it would be if I consumed the ...
1
vote
0answers
21 views

how Npgsql.EntityFramework support Spatial data

I am using Npgsql.EntityFramework + EntityFramework6.My database is postgresql. I Added to my C# project with this tutorial : ...
4
votes
3answers
115 views

Add and remove tools from ArcMap toolbar via C# Button and ArcObjects?

OK I updated the draft with some of the suggestions but am still having some issues. I am trying to create a custom button in arcmap that when pressed will edit a toolbars content. Doing things like ...
0
votes
0answers
47 views

How to embed ArcMap graph into winforms dialog using .NET/C# and ArcObjects?

I am creating an addin for ArcMap in csharp and want to add a graph to a dialog. The native arcgis graph control doesn't seem to been available from the visual studio toolbox. I can't figure out ...
3
votes
1answer
42 views

Can I get a unique reference to a feature layer in ArcObjects?

I want to build an IDictionary with the feature layers of my TOC in ArcObjects. So I need key value pairs. The value will be an attribute of the feature layer but I am wondering what to use as key. I ...
2
votes
2answers
66 views

Get feature from list

I've done this: while (feature != null) { if ((feature.get_Value(feature.Fields.FindField("NAME")) != null) && ...
0
votes
0answers
28 views

Closest line, line intersects box and general help

I've been knee deep in information about Geo data, projection and topography but can't find a simple library/method to help me with basic calculations of coordinates. I'm using Google Maps API in ...
1
vote
0answers
39 views

ArcObjects — How to tell if an event is already wired up

Using Visual Studio 2010 C# and ArcMap 10.1. In a custom ArcObjects extension, a bunch of events are wired up at startup. For example, this simple standard code chunk: IEditEvents_Event ...
0
votes
0answers
39 views

How to read Spatial Data File (.SDF) in C#

Using the Mapguide .NET C# API (with FDO API) i would like to reads sdf and creates a shapefile out of it. So basically take sdf as input source and create a shapefile out of. please suggest me ...
0
votes
0answers
11 views

Can't find assembly ref for Mapguide.schema.FeatureSource

Error in missing Asembly reference for using OSGeo.MapGuide.Schema.FeatureSource; // Build the feature source object model FeatureSourceType fsType = new FeatureSourceType();
0
votes
0answers
23 views

Create a shapefile from any FDO feature input

Using the Mapguide .NET C# API (with FDO API) i would like to create a class that reads from one data source and creates a shape file out of it. it will provide the feature ID, source and destination ...
1
vote
3answers
98 views

ArcMap get coordinate system

How can I get current coordinate system type from opened file? I tried var coord = ESRI.ArcGIS.Geometry.esriSRProjCSType.... ???; Can you tell me, what should I do? UPD: I need to save current map ...
0
votes
1answer
57 views

What's the best way to break closed polyline using ArcObjects?

I have a polyline feature class with several closed lines (the start point = the end point). I need to break these lines in two features, using ArcObjects (doesn't matter Java, VB or C#). I have ...
0
votes
0answers
30 views

How to convert points shapefile with a designed attribute containing Z values to a 3D shapefile

I need to write C# program which would convert points shapefile with a designed attribute containing Z values to a 3D shapefile. Any suggestions how to do it?
0
votes
0answers
34 views

Cast, Convert Esri.ArcGIS.Geo.IRecordset TO system.Data.Dataset solutions?

I have a bunch of tools that are still running on Arcmap 9.2 drive and I am updating my tools so they can run on 10.1. I came across this problem in one of my functions, where I needed to cast an ...
3
votes
1answer
64 views

Setting Up Snapping Environment Snapping Type

I try to setup snapping environment snapping type by referring to this source (http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000001s1000000) but I can't combine ...
0
votes
1answer
46 views

Adding Field using C# winform and ArcObjects?

How to add a field in featureclass by using C# winform,arcobjects? It means when we click on command winform should open and afetr field entries it should be add in to table.
0
votes
1answer
39 views

Selecting a Graphic Element on button click using IGraphicContainerSelect

I am having trouble type casting and using the right interfaces. I have a function that loops through all text elements with a specific property set. Once a match is found, I want to be able to select ...
0
votes
1answer
38 views

HRESULT 0x80010202 exception in ArcMap closest feature searching by ArcObjects?

My method must return closest feature attribute. But there's a problem, it finds closest feature but returns COM exception HRESULT 0x80010202 void selectStreet(IPoint point, IActiveView activeView) ...
0
votes
1answer
45 views

Parallel Computing error using GP tool in C#

I have been using ArcGIS Geoprocessor(GP) tool whenever possible even though it is like a black box in my ArcObject development. Most of my operations are involved with data processing, such as ...
1
vote
1answer
54 views

error 0x80040239 : Using the intersect method of ItopologicalOperator

I would like to intersect a polygon and a polyline to know if the polyline is in the polygon. The code work but when i do it on more than 100 000 times in a for, there is this error : ...
4
votes
1answer
113 views

Getting feature at point in C#

I want to get the feature at where mouse was clicked in map. So I was wondering how to get features which intersects with that point. Plus I was wondering how can I check what type of object it is ...
0
votes
0answers
26 views

Finding What version a PGDB is programtically

So i have a list of 681 personal geodatabases. I want to figure out what version (9.x, 8.x, 10.x) these things are. So i want to write a program that will read the filepath from a database table and ...
1
vote
1answer
80 views

ArcMap tool for deleting polygon with C#

I need to create custom tool for ArcMap, which would let the user delete polygons by mouse clicks. I am pretty new in this thing, so how can I retrieve a selected polygon so I could delete it? Plus do ...
1
vote
0answers
85 views

Why ArcMap.Application.Document is null on run?

Why ArcMap.Application.Document is null on run? There is my addin. It consist of tool and docWindow. DocWindow opens when tool is selected. When I run ArcMap with selected myTool and opened window, ...
0
votes
1answer
101 views

How to query all layers in ArcMap and get access to them by name or index?

I have next issue: I have ArcMap with tons of layers. Some of these layers may contain another layers with data (aka Composite layers) or they don't. The depth of composite layers in unknown. I need ...
0
votes
0answers
53 views

Converting *.asc to *.shp without using ArcGIS for Desktop or QGIS?

I am trying to perform file conversion programmatically, using C#. I have read the ESRI Shapefile Technical Description (An ESRI White Paper—July 1998). I cannot calculate records for *.shp file ...
0
votes
0answers
33 views

Error Esri.FileGDB.FileGDBException Message=General function failure

Whats wrong? Code: Geodatabase geodatabase = Geodatabase.Open("C:/tmp/tmp.gdb"); Table table = geodatabase.CreateTable("StreetInfo", "C:/tmp/Table.xml"); xml: ...