C# is a .NET programming language.

learn more… | top users | synonyms

0
votes
0answers
15 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
23 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
141 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
403 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
15 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
13 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
7 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
45 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
81 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
29 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
21 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
25 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
381 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
489 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
50 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
939 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
315 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 ...
0
votes
1answer
119 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
94 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
28 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
28 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
116 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
24 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
110 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
31 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
32 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
81 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
213 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. ...
1
vote
0answers
77 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
2answers
304 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
205 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 ...
6
votes
1answer
406 views

Display Feedback “Stutters” When Moving Features

I have a custom tool for moving features that implements IDisplayFeedback and geometry-specific CoClasses to show the user where they are moving the feature. IMovePolygonFeedback polygonFeedback; ...
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 ...
1
vote
1answer
67 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 ...
0
votes
0answers
22 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 ...
0
votes
1answer
247 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 ...
1
vote
2answers
213 views

How to add command developed with C# to ArcToolbox?

I have a command that I developed with c#. I want to add this command to the ArcToolbox. Is there any way to add such a command to ArcToolbox in ArcGIS Desktop programmatically ?
1
vote
1answer
916 views

Change The Label Field In GeoFeatureLayer

I currently have a basic shapefile that's a map of the United States. It has the name of the states, populations, and other pieces of information that I can get the names of via the following code: ...
0
votes
1answer
56 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 ...
4
votes
1answer
188 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
43 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
28 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: ...
3
votes
1answer
2k views

ArcObjects - Adding ArcGIS Server Layer to MXD Programtically

I am trying to add a layer from ArcGIS online to a mxd programatically with no luck. See code sample below. The error is happening at pAGSServerConnectionFactory.Open(props, 0); Anyone been able to ...
0
votes
1answer
20 views

how to use IUniqueValueRenderer for empty geodatabase point file with ArcObjects

I have empty geodatabase file with point geometry created programatically. I have style file with several symbols. I basically want to add all these symbols to my shape file before creating ...
3
votes
4answers
3k views

SQL Server Geometry to geography conversion

I have imported a number of Shape files from the ordnance survey using shape2SQL these have been imported as geometry however i would like to convert them to Geography and specifically to srid 4326 ...
0
votes
0answers
42 views

How to work with gdb from c#?

I have installed PostgreSql 9.3, PostGIS(last version) and Npgsql. I have geodatabase(tmp.gdb) how to make conection for this DB from c#? And how to connect this DB to PostgreSql? It possible to ...
1
vote
1answer
36 views

gdalwarp '-tps' equilvalent in C# wrapper?

I am attempting to do the following from code: gdal_translate.exe --config GDAL_DATA "D:\gdal\bin\gdal-data" -of GTiff -a_srs EPSG:4326 -gcp 0 0 -108.724530873811 40.1376029956585 ...
0
votes
3answers
63 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 ...
1
vote
0answers
26 views

How to emulate OpenLayers button click in C#

I'm trying to call a click of a user using C # with the following code ( " C # : GeckoWebBrowser.Navigate ( javascript : void ( Document.getElementById ( ' idOfElement ' ) .click ( ) ) " ) ; ...