C# is a .NET programming language.

learn more… | top users | synonyms

1
vote
1answer
177 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
7 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
40 views

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

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 add the selected features' field to a ...
0
votes
0answers
36 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 ...
2
votes
2answers
29 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
13 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 ...
2
votes
1answer
248 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
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
129 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
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
0answers
21 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 ...
7
votes
1answer
752 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
24 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
13 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 ...
2
votes
1answer
185 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 ...
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 : ...
0
votes
1answer
452 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 ...
6
votes
1answer
190 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
13 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 ...
3
votes
1answer
181 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
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. ...
2
votes
2answers
439 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 ...
4
votes
2answers
506 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
1answer
487 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 ...
1
vote
1answer
38 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 ...
3
votes
1answer
180 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=...
7
votes
1answer
583 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
0answers
11 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 ...
1
vote
1answer
27 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 ...
4
votes
1answer
281 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
42 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
26 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 ...
2
votes
1answer
433 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 ...
2
votes
1answer
416 views

how to transform DB stored EPSG data to Geography data type in sql server

I have a 3 GB database in SQL Server, with certain points stored in float values. The points are stored in EPSG 3765. I would prefer to have them saved in the Geography datatype. I can not store them ...
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
1answer
48 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 ...
2
votes
0answers
33 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 ...
1
vote
0answers
26 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. ...
0
votes
1answer
299 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. ...
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 ...
15
votes
1answer
742 views

Understanding why ArcPy Cost Path Analysis tool faster than ArcObjects? [closed]

Although I use python to create geoprocessing scripts/services, I was under the impression that using ArcObjects to do the equivalent operation(s) will have better performance. I've posted ArcGIS ...
1
vote
0answers
23 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 ...