C# is a .NET programming language.

learn more… | top users | synonyms

0
votes
0answers
7 views

C# .NET Adding to a datagridview Date cell

I have a datagridview with two columns; a name and a due date. The name column is populated when you select a feature in ArcMap. The Date cell has a datetimepicker for the user to add a date. I'm ...
2
votes
1answer
26 views

How to use ArcGIS FeatureToLine with Managed Assembly

I am writing an ArcMap Add-In to combine multiple shapefiles and then run some custom python scripts on the resulting shapefile. However I cannot seem to get the Geoprocessor working to run the ...
0
votes
0answers
19 views

Failed to create raster dataset using ArcObjects?

I am currently unable to create a raster dataset. These are the 2 functions i have for creating the raster dataset but it seems to always throws an error "unable to create raster dataset". After ...
0
votes
2answers
50 views

ArcObjects C#: How to add selected features to a Data Grid View

[![enter image description here][1]][1]I'm trying to write a C# .NET add-in for ArcMap and I need some help. I want to be able to select a set of features in an SDE and then click a button that would ...
2
votes
2answers
30 views

How do I detect when “Map data not yet available”?

My app uses the CartoDB static map API to get a "center" map at zoom level 19 or 20. Most times it gets a good map, but depending where it's looking it sometimes gets a "Map data not yet available" ...
0
votes
0answers
37 views

Programmatically generate a heat map based on the the lat and long values

I am new to Arcgis and i am using version 10.2. I am using C#/.Net I would like to programmatically generate a heatmap based on the list of coordinates that i have in DB. I am stuck on how to ...
2
votes
1answer
31 views

How to make a polyline with two-sided arrows show two colors

I am very new to ArcGis development and so bear with me if I asked a silly question. I am using ArcGis 10.2 on C#. I have two features (A and B) on the map. I need to place two arrowed lines - one ...
1
vote
1answer
17 views

An unhandled exception of type 'System.AccessViolationException' occurred

I am trying to learn Arcobject with C# through a book named "begining arcgis desktop using dotnet" , in this book an example is given to use geoprocesisng tool to be used through arcobject. below in ...
0
votes
0answers
13 views

Arcobjects not drawing GraphicContainer if layers are in the TOC

Im trying to draw some graphic labels in Layout View for every row in a feature class chosen by a user in a combobox. I am just in testing out some code to draw the label graphic and it works fine, ...
0
votes
0answers
22 views

Exporting map with arcobjects interupted by refresh event

I have developed an ArcMap extension in C# for ArcGIS 10.0 with a Form that configures the PageLayout and exports the ActiveView as PDF. There are two different ways to do that. You could use ...
2
votes
1answer
30 views

Activate 'View Item Description' programmatically?

I have created an ArcMap add-in for browsing data layers and adding them to the TOC. I would like to add a button that when clicked will open the selected layers item description (before it is added ...
0
votes
1answer
18 views

Unable to populate required data in combobox

I am new in C#, I was given a VB code to migrate in C#. I have done most of it but not able to populate data in COMBOBOX. On clicking the dropdown button, Combobox is blank, on clicking the blank box ...
0
votes
1answer
25 views

How to draw line/multiline, polygon/multipolygon with SharpMap from Coordinate Source

I have a list of n points, exactly x objects in GeoJSON from a CouchDB. I want to generate lines/multilines and polygons/mutipolygons with SharpMap and add this to a Layer in VB.NET. For points its ...
0
votes
0answers
15 views

Selection anchor when selecting features programatically

In an edit session, I am using code to select multiple features from an SDE polygon layer. After the selection is performed, the user can then use the rotate tool to adjust the features to their ...
0
votes
0answers
22 views

Is it possible to obtain the envelope of a Data Frame element in Layout view?

I'm wondering if there is a way to create an envelope in map units of the extent of the Data Frame element in Layout view. I've tried this approach: IMxDocument mxdoc = ArcMap.Application.Document as ...
0
votes
0answers
19 views

PanTo not changing extent

I am attempting to unit test a method that pans a map however every time i unit test the method the extent of the map never changes. I tested it to zoom to a point first and then pan as well. ...
1
vote
1answer
42 views

How to access XY position of text element in Layout view using ArcObjects

I'm wondering which interface will allow me to set the XY position of a text element in the page layout of my MXD. I have tried the IElement.Geometry.Envelope.PutCoords(Y, X) to no avail.
0
votes
0answers
24 views

Problem with some C# code in ArcMap 10.2

I have been programming a Base Tool control using C# to allow me to initialize the edition of a specific featurelayer in an ArcMap view; a time ago I used to do the same thing in ArcMap 9.3 and it ...
0
votes
0answers
12 views

GeoApi transformation throws NotImplementedException

Im trying out GeoApi and Proj.Net for transformation of coordinates between coordinate system. The code below gives me an NotImplementedException for any transformation, I checked the source code and ...
0
votes
0answers
15 views

Cannot pan to correct location using IEnvelope.CenterAt(IPoint)

It seems no matter what projection I try it pans me to the Atlantic Ocean. I have run across this before in an ArcPy script and it was due to being in a projected coordinate system and thus it was ...
0
votes
1answer
20 views

Street layer representation

I've a difficult for the representation of my street Layer. She is loading due to the Oracle Spatial Provider. I create a vector layer for the representation, but for example, the result is : ...
1
vote
1answer
28 views

Cannot center IActiveView at IPoint in C#.NET add in

I'm testing a simple portion of my add in and can't get it to center/pan to a specified point, I've included what is currently in my OnClick() method. No errors appear it just refreshes and nothing ...
0
votes
0answers
51 views

Map Projections - WHAT?

I have a problem (C#.NET): What I have: Points with a coordinate (Lan & Lon) A canvas (WPF) with a dynamic size A control which represents a point A zoom factor, the kilometres from right to ...
0
votes
0answers
44 views

How to feed Openlayers with the TileWMS requested from CSharp API instead of Geoserver directly?

First, I need to mention that I am able to request Tile WMS from the Geoserver directly, with the code below: var myTileLayer = new ol.layer.Tile({ source: new ol.source.TileWMS({ url:...
0
votes
0answers
27 views

run shp2pgsql command in c# application

I worked for a month on this command but in vain ; really if someone already tried to help me find the error , because when I load the application displays the message to me as the shapefile was ...
1
vote
0answers
45 views

I want to cut polygons in a polygon layer.

I want to programmatically cut polygons already loaded in arcmap. For instance if originally I have 1 polygon feature and 1 row in attribute table. When I cut them, I should see 2 independent features ...
2
votes
0answers
34 views

ArcObjects Custom Tool for a VB App

We have an old VB6 app that uses the map, toolbar and toc controls. On the toolbar, we've added the custom menu so users can add other built-in tools or tools they've created. One of our customers ...
2
votes
1answer
53 views

ArcObjects 10.0 Add-Ins

I'm using 10.0 because that's what our customer that I'm attempting to build a custom add-in for is using. I am following the "Walkthrough: Building custom UI elements using add-ins" from the ...
1
vote
0answers
28 views

500 error when uploading shape file to Geoserver with C#

I receive a 500 internal server error when attempting to PUT a shape file using REST. I can manually import the file, publish and preview it. So the file is fine. Geoserver log: 2016-05-24 12:20:25,...
5
votes
2answers
220 views

Lat/Long -> UK Easting/Northing?

I have a fairly accurate formula (implemented in C#), which allows me to convert UK Eastings/Northings to WGS84 Latitudes and Longitudes. Despite extensive Google searches, I could not find a formula ...
2
votes
0answers
47 views

Use SharpMap with WebGL Earth

I'm trying to display a layer on top of a WebGL Earth view inside an Asp.Net 5, MVC 6 website. I have no problem to do this in a desktop application, but I am totally unable to do it on the website. ...
2
votes
0answers
31 views

Get Z value from point in LAS Dataset using ArcObjects

Using ArcObjects (C#) I am trying to build a tool that will extract the Z value from a point in a LAS Dataset when the user clicks on it (then use that value elsewhere). My intention was to use the ...
1
vote
0answers
26 views

GDAL compilation to .NET (C#) use

I want compile GDAL library for use in C# program. I use Microsoft Visual Studio 2013. First, I compiled GDAL C++. As a result I have DLLs and libraries (No problems) . Next, I tried to compile with ...
2
votes
0answers
35 views

Is it possible to create an ArcGIS library?

Can I create my own ArcGIS library that contains commonly used features inside my own functions/methods? I would like to make a dll that can be reference in my projects for using common features such ...
2
votes
1answer
24 views

The type 'ESRI.ArcGIS.Display.RgbColorClass' has no constructors defined

Trying to create a simple line symbol. But getting an error: "The type 'ESRI.ArcGIS.Display.RgbColorClass' has no constructors defined" public override void OnClick() { IDocument pdoc = ...
1
vote
1answer
19 views

Error in opening shapefile located on network

I have been able to successfully open a shapefile using Gdal when it is situated on my local machine. However, when I put the file on another machine on the network and try to open it, it fails. ...
4
votes
3answers
134 views

How to get WKT for various Spatial Reference Systems?

I need to provide WKTs of spatial reference systems in the APIs provided by GDAL/OGR. Is there some specific place where I can look for WKTs of the spatial reference systems that I'm working with? Or ...
1
vote
2answers
49 views

Changing layout background from red to blue through button add-in with C# and ArcObjects?

I am working on Arc Objects using C# and I have to make a button add in, such that if I click button one time then layout background color changes to red and then if I click again then button add in ...
1
vote
0answers
48 views

How to use offline MbTiles with Telerik's WPF map control?

Telerik's UI for WPF includes a map control: UI for WPF - RadMap. There's some discussion of how to configure it to use a local mapping service: Implement custom map provider, but it seems to be ...
1
vote
1answer
58 views

Resampling a raster file with GDAL C#

Is it possible to resample the raster by using GDAL C# binaries, in a way that every other cell in a row and column is removed? Basically a replication of this GDAL command: gdal_translate -outsize ...
2
votes
1answer
54 views

Determine if Point is in feature class attribute table

I'm working with ArcObjects, C# and ArcMap. I have an attribute table that has several rows of data including a "shape" field that holds a point geometry. I also have a random point. How can I iterate ...
0
votes
0answers
17 views

C# selecting map tiles from user defined rectangle points?

I have a WPF user control with which the user can draw a rectangle on the map canvas to define an area for downloading background imagery tiles from a web service. The tiles are in Lat long 1x1 degree....
3
votes
0answers
41 views

GDAL c# API returned different WKT from gdalinfo

I've found completely different results in WKT strings while using gdalinfo utility and method from c# API GetProjectionRef(). In the first case the result was: PROJCS["WGS 84 / Pseudo-Mercator", ...
1
vote
1answer
19 views

ArcGIS AddAsync .NET API Not working

I'm creating a web service that will be passed a list of objects that include the Lat/Long coordinates and some other data such as Speed. When I use the ArcGISRuntime library to add the features to ...
1
vote
1answer
59 views

ExportToPDF creates blank PDF

I have a MapDocument that I am trying to export to PDF. I am using this example. However, it always says it is finished but when I open the pdf file there is nothing in it. I have tried exporting to a ...
1
vote
1answer
46 views

How do I select objects I click on in ArcGIS (.Net)

I have a MapView in my xaml code, which contains several GraphicsLayer. The first layer is the actual map, and the second is small SimpleMarkerSymbol representing locations. What do I do to be able ...
0
votes
0answers
11 views

ILayerFile.Open - The maximum record length has been exceeded

I have been able to use ILayerFile layerFile = new LayerFileClass(); layerFile.Open(layerFilePath); with out any problems until it just started giving me an error. Error: -2147220646 ...
0
votes
0answers
143 views

Drawing route on google map using gps device and calculating actual distance?

I Want to draw route on google map with the help of gps device and calculate the actual distance. Can anybody help with this? public GoogleAPIModel GetDistance(string origin, string destination) ...
2
votes
1answer
64 views

C# Arcobjects 10.3: Change the source version on a layer file

I'm using arcobjects (C#) to load my layers to the table of contents, and I need to update the data source to change the version. The layer file is set to the correct source at the DEFAULT version. ...
0
votes
1answer
27 views

ArcGIS Identity Tool Output Fields

I am using the Identity tool which takes 3 parameters: in_features, identity_features, and out_features. Does the output FeatureClass need to have fields that are a combination of the fields in ...