C# is a .NET programming language.

learn more… | top users | synonyms

0
votes
0answers
4 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 ...
4
votes
1answer
315 views

How to add individual layer of WMS group layer to ArcMap?

I am attempting to add a single WMS layer that is part of a WMS service group layer. I am writing code to do this using ArcObjects in C# .Net. So far I have been unsuccessful. I can either only add ...
3
votes
1answer
347 views

CodeDom.Compiler fails in Arcmap add-in, but works from console app

The Test method in the code below succeeds in a console test app, but fails when I call it from within an Arcmap add-in, throwing a ReflectionTypeLoadException with a loader exception saying: ...
0
votes
1answer
278 views

How to update/delete data from a datagridview?

I wanna be able to update/delete data from a datagridview, and when I do that of course the data in my PostgreSQL database should be edited too. So I've thought about giving the user the ability to ...
0
votes
1answer
301 views

GDAL WMS Question

I'm new to GDAL and am currently trying to hit a WMS using gdal. I need a way to save the image to my desktop. I currently have an xml file with the WMS description syntax that gdal wants -> ...
1
vote
0answers
9 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 : ...
2
votes
1answer
666 views

Do I need an Add-in or a Stand-Alone Application for a custom form?

The type of application I want to build for ArcMap is to be run from inside of ArcMap and on a click of a button a custom form appears in front of User in which User enters certain parameters and then ...
4
votes
2answers
929 views

Convert Sql Server Spatial data to GeoJSON & plot on map

I have a sql server table with Geo spatial data. An example of row would be (with Column names): type: streetline code: 231001 geog: 0xE6100000011 ........ Centroid 0xE61000000C....... geom: ...
0
votes
1answer
227 views

Get points along a polyline at defined distance c#

I need to store into my array the points along the polyline at each defined distance. Example: The Polyline length is 50m, I set the interval to 5m. I have to store in the array all the points along ...
2
votes
1answer
100 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 ...
3
votes
3answers
241 views

Is there any way to write a snipet of code with function of “SDELayer -o register” command

I try to create a geodatabase using some SQL command and then register some tables of it with SDE. I create an empty geodatabase using sde post installation and then create tables and other database ...
0
votes
1answer
128 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 ...
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 ...
2
votes
1answer
39 views

Cannot Find GPTS Object - GDAL C#

UPDATED To clarify my previous post. I have written a small application to convert maps saved as PDF's to PNG files then tile the maps to be used in a webservice. After experimenting with the PNG ...
3
votes
2answers
107 views

How can I hide a tool from command window under category

I have created a tool, a button and a dockable window under one project. To open/close the dockable window, button is used. For some specific work, by clicking some specific button from dockable ...
3
votes
2answers
57 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 ...
2
votes
1answer
104 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 ...
3
votes
2answers
388 views

Where to buy training licenses for learning ArcObjects?

A client of mine wants me to do some work with C# and ArcObjects. However, I have no real experience with C# (or much ArcObjects except with Java to be honest). Rather than outsource the work, I ...
0
votes
0answers
35 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 ...
0
votes
2answers
1k 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 ...
2
votes
2answers
58 views

Get feature from list

I've done this: while (feature != null) { if ((feature.get_Value(feature.Fields.FindField("NAME")) != null) && ...
3
votes
1answer
36 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 ...
0
votes
2answers
359 views

How to Create shapefile using Geometry field

I am working on ArcObject. I want to create shape file using arcObject. I am very close to it. but need some better alternative as i feel my solution may fall short in time when there are lakhs of ...
0
votes
1answer
46 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 ...
4
votes
1answer
193 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
26 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
32 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
1answer
142 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 ...
5
votes
1answer
423 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.
0
votes
0answers
20 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
16 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 ...
0
votes
0answers
9 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();
3
votes
1answer
53 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 ...
1
vote
3answers
90 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
0answers
26 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
27 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 ...
5
votes
1answer
399 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, ...
0
votes
1answer
508 views

Geoserver with Openlayer map showing problem

I have a Geoserver runnning at 8888 port and url is http://localhost:8888/geoserver. I can browse any layer created by my custom data. ...
1
vote
0answers
53 views

ToDataSet() replacement ArcGISI 10.1

I am currently upgrading 9.3 codes to 10.1. There used to be ToDataSet() function in ESRI.ArcGIS.Utility.Converter class. Class still exists in ESRI.ArcGIS.ADF, but ToDataSet function is gone. Does ...
6
votes
5answers
3k views

Programmatically edit/update metadata in ArcGIS 10

Has anyone succeeded in programmatically updating metadata in ArcGIS 10? Considering using Python/arcpy but ArcObjects (C# or Python/comtypes) is also a possibility. I need to update both the FGDC ...
10
votes
1answer
943 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 ...
0
votes
1answer
30 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
0answers
31 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
123 views

Get the vertices on a LineString either side of a point (Sql Server 2008)

I have a point that sits on top of a LineString, both Sql Geometry types. POINT('0.5 0.5') LINESTRING('0 0 NULL 1, 1 1 NULL 1') I want to find the vertices of the LineString that lie either side ...
0
votes
1answer
26 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) ...
1
vote
2answers
130 views

C# - Access content from ArcGIS Online

I have got an existing .NET C# desktop application which already reads various GIS formats. I would now like to add support to read data from ArcGIS Online. What options have I got to access ...
0
votes
1answer
37 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
35 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
98 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
2answers
218 views

How to add a Data Frame to mxd in a c# stand-alone application?

I am writing a stand-alone application in c# (using vs2010). I have ArcGis Desktop license. I only need to insert a new data frame in an mxd file and save this mxd. So: I create MxDocument coclass. ...