C# is a .NET programming language.

learn more… | top users | synonyms

2
votes
1answer
200 views

Standalone program can see license

I used standart license initialization code in C# standalone program. It was working perfectly on 10.1 and 10.2. But after migrating to 10.3 it says Licenses are not available. Meanwhile ArcMap and ...
8
votes
4answers
5k 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: ...
2
votes
1answer
260 views

Segment matching on a polyline

I have about 1000+ running routes which I can load into memory as polylines using latitude and longitude data captured from a running watch. From these polylines I would like to be able to identify ...
0
votes
0answers
179 views

Assigning list or array to IRowBuffer Row without Row.set_Value()?

Is it possible to assign a list or array to IRowBuffer Row? I have something like the following: I have a fields (list) with values and i have to fill a Row with that values. public void fillRow(...
0
votes
2answers
72 views
+50

Drawing markers and text on ArcGIS map, at fixed size, independent of zoom?

I'm writing a WPF application, in C#, using ArcObjects. I have an ESRI.ArcGIS.Controls.AxMapControl on my form, and I'm trying to draw some graphics elements on top of it. The map I'm developing ...
0
votes
1answer
528 views

Getting map using C# code in ArcMap?

I have been programming in C# a small code for:1) create a polyline Featureclass in a GDB, 2)put that in the map view (ArcMap 10.2) and finally 3) edit that feature using a button or tool... Well I ...
0
votes
1answer
479 views

Drawing a line and getting the length of the line C#?

I am trying to get the length of a drawn line to a textbox but its throwing an NullReferenceException at var length = f.ToShape().ToGeometry().Length;. what else should i use in the code to finish ...
4
votes
2answers
525 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
9 views

find the format of GPS string in c#

I am developing a AVL system using c#,My avl doesn't have any datasheet or guide,so from my gps i get this data every 20 second string aaaa2 = "24-42-10-10-03-31-05-16-03-15-07-16-35-45-...
1
vote
0answers
16 views

GPS data can't be read when the device is moved

I am getting data from avl system as you can see with this format : *HQ,4106016320,V1,090458,A,5257.4318,N,15840.4221,E,000.00,000,101115,FFFFFBFF,250,01,0,0,5# As you can see the data that I get ...
0
votes
0answers
16 views

Convert Gml to Shapefile in C#

I need to convert a GML file to Shape in C#. I installed gdal with nuget, but could not get it to work. I also tried NetTopologySuite, but i am getting errors when parsing Gml. Any other suggestions, ...
0
votes
1answer
179 views

How to add attribute to a graphic in a list arcgis silverlight

I have got a list of graphics: System.Collections.Generic.IList results; The graphics in this list have got 4 attributes: 'name', 'city', 'street', 'contactnumber'. Now I wanted to add an ...
1
vote
1answer
48 views

Loading different shapefile in SharpMap?

I am currently working on sharpmap project with the need to work on offline maps. As i am fresher in this field,I am following the sharpmap tutorial and facing a problem with loading new shape files ...
1
vote
1answer
937 views

Converting FeatureLayer to graphics using ArcObjects?

How do I convert a Map or FeatureLayer to graphics on ArcObjects 10.1? Problem Solved this is the working code: private void Convert_to_graphics( IMapDocument doc) { IMap pmap; ...
1
vote
1answer
279 views

Handling mouse events for tool called by button?

I have a dockable window with a 2 buttons that call 2 different tools (Draw Marker and Select Features), What i want to happen is when the user clicks on the relevant button on the dockable window and ...
2
votes
2answers
464 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 ...
3
votes
1answer
198 views

How do I call ogr2ogr from a C# application?

I have an ogr2ogr (GDAL) command that I run to export points from a database to an XML file. ogr2ogr-f GPX c:\temp\points.gpx PG:"host=localhost port=5432 dbname=SpatialPlayground schemas=public user=...
1
vote
1answer
28 views

Alter Esri geoprocessing environment settings with C#

I maintain an extension to ArcMap (currently at 10.2.2) for coworkers' internal use. Several people lately have been tripped up by un-set spatial grid settings when trying to export data into a file ...
0
votes
0answers
9 views

Esri Wold Imagery images skewed - incorrect uri?

I'm downloading Esri's World Imagery into our map (http://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/export?) in C#. Downloads the images & they're almost correct but ...
0
votes
0answers
19 views

C# Arcobjects Adding multiple fields from selected features to datagridview

I'm fairly new to developing add-ins in c# and I'm trying to write multiple fields of selected features to a datagridview. Currently, the code will only display one field. I've been playing around ...
0
votes
1answer
29 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 ...
1
vote
1answer
40 views

Latitude/longitude to MBTiles Tile #

I've been Slippy Tiles Wiki page for equations to convert lat/long values (given via the user) to tile references, and then work with the data relating to the tile. My problem is the wiki's equation ...
3
votes
2answers
49 views

ArcObjects: Is there a way to insert an error into the Start Editing dialog

When I use the the Editor Start Editing toolbar item, a dialog with information, warning and error appears before the edit session is started: Is it possible to insert programatically my own error ...
4
votes
1answer
284 views

Call ArcGIS Server Buffer command without using SOM

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
1answer
124 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 Add a map to your app resource provided by ESRI (which seems ...
0
votes
1answer
323 views

Converting CAD to map tiles

My team is working on an application that has a map feature, and we want to extend this feature greatly. Among other things, we want the user to be able to load a CAD drawing, and place it on the map. ...
7
votes
1answer
590 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
38 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
2answers
75 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
1answer
439 views

Can I update the service on ArcGIS for 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
1answer
23 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 ...
1
vote
1answer
186 views

Trouble compiling ArcObjects Server Object Extension project into .SOE file

I'm writing a Server Object Extension(SOE) in Visual Studio 2012 using C# in Windows 7. I'm using the REST Template that comes packaged with ArcObjects 10.2. I'm able to build the program without ...
0
votes
0answers
31 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
0answers
47 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
40 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 ...
2
votes
2answers
52 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" ...
1
vote
1answer
25 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, ...
1
vote
2answers
143 views

Error Dotspatial featureset

Writing code using C# and the DotSpatial library, with the following code: FeatureSet fs = new FeatureSet(FeatureType.Polygon); fs = FeatureSet.Open(Application.StartupPath + "\\MapFile\\Land....
2
votes
1answer
32 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 ...
7
votes
1answer
782 views

Measuring Angle of two Points from North in ArcGIS 10.3 C# SDK

What is the most reliable method to calculate angle of a line from north, defined by it’s from and to points? I used to use IMeasurementTool interface found in defense solutions namespace found in ...
0
votes
1answer
42 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
1answer
22 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 : ...
6
votes
1answer
201 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 ...
0
votes
0answers
20 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
23 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 ...
3
votes
1answer
184 views

How to apply WHERE clause to relationship class using ArcObjects?

I'm trying to query objects related to objects and satisfying some query in ArcObjects. IRelationshipClass interface contains methods for getting all related objects but how can one filter them? I don'...
0
votes
0answers
20 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
48 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
27 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 ...