C# is a .NET programming language.

learn more… | top users | synonyms

1
vote
0answers
117 views

Dotspatial.Projections with custom Proj.4 string

I have lat,long values that I need to convert to x,y in a custom Lambert Conformal Conic projection defined as +units=m +a=6371229 +b=6371229 +x_0=0 +y_0=0 +proj=lcc +lon_0=0 +lat_2=25.0 +lat_1=25.0 +...
2
votes
2answers
111 views

Arcobjects 10.3.1: TOC listeners

I am writting an addin using ArcObjects C#. I have setup the following listeners, but they are not being hit. My code at the top of the addin.Extension class is: ... private static ...
1
vote
0answers
47 views

Line with specific angle

I've created a line by mouse click event when I click on the second point I need two lines at an angle of 28 degrees from the first line how should I do it?. IPoint point1; IPoint point2; ...
1
vote
1answer
58 views

GUID to open Geoprocessing Enviroment Settings Window through C#?

I am trying to let the user click the enviroment button at the bottom of my custom form and have the Enviroment Window Pop Up. I cannot seem to locate the Enviroment Settings Window GUID anywhere? ...
2
votes
1answer
45 views

Accessing array of values(height, intensity) associated with raster from ArcObjects without looping?

I am trying to access the array of point values(mainly height and intensity) from a raster through C# without looping through values. I am looking for a direct pointer to the array of values inside of ...
1
vote
1answer
38 views

Get FeatureDataSet of a invalid FeatureClass

I have a project that repairs broken datasources. One goal of the project is to add the datasource of a featuredataset to repair any broken feature classes. However, so far the only way I've seen to ...
0
votes
1answer
53 views

Shapefile location change repair. HResult E_FAIL

I'm working on a ArcMap plugin using ArcObjects that will change the location of a shapefile that is broken. However, I'm getting HResult Error E_Fail whenever I try opening the feataure class. This ...
0
votes
0answers
27 views

Geometry Location In Respect To Another Geometry

I am trying to figure out where a geometry is residing in respect to another geometry. My Image explains things better, I have Square nodes A, and B. and I have circle Child nodes X, and Y. I have all ...
1
vote
0answers
37 views

How to generate mapguide legend?

I'm trying to generate the legend of my mapguide map from the mapguide API but I've found any samples... Have you an idea of how to use GenerateLegendImage function on a layer and how to convert the ...
0
votes
0answers
43 views

Problem with Viewshed analysis in ArcObjects

I want to execute the Visibility Analysis Tool using ArcObjects 10.3. I tested the tool in ArcMap and it works great with the test data I provided, hence it should work as well in ArcObjects code. The ...
1
vote
1answer
40 views

IfeatureLayer.search() second time return error

I have the following method in my code and have a button that when clicked run this code. In the first click all of code runs without error. but in second run I receive an error on line: ...
1
vote
0answers
178 views

OpenStreetMap coloring the map tiles by state, zip code polygons from C# VS 2013 WPF desktop application

My question is likely to close on stackoverflow. My aim is to create a map from C# VS2013 WPF desktop application (not web application) with OpenStreetMap on win7. This a colored map with US states ...
2
votes
0answers
130 views

Creating Checkout Replica in ArcObjects (from ArcSDE geodatabse to file geodatabase)?

I'm trying to create a checkout replica of some feature classes from an ArcSDE geodatabase to a file geodatabase using ArcObjects. I'm trying to follow this: How to create a replica in a connected ...
-2
votes
1answer
74 views

Can you edit an ESRI addin outside of Visual Studio?

I would like to edit text file within an addin without going into visual studio etc and recompiling the addin. I have tried using 7-Zip and WinZip - editing the file and then saving it back - and ...
1
vote
2answers
149 views

Spatial Query between polyline features and point features within specified Buffer

I'm new to GIS (so I'm lost on this) and looking for a C# code sample to help me do 2 types of spatial queries. I have 2 Layers only. First layer is pipelines, which are polyline shapes so I can ...
0
votes
1answer
129 views

Add Layers to Arcmap 10 Crashes

Would anyone know the reason why this happens? and possibly a way to fix it. I am stumped In the following code. The first addlayer works, but crashes on the second addlayer with a 'vshost32.exe has ...
1
vote
0answers
73 views

How to Get ArcFM Session name

I need some information about session name getting. i am working on ArcMAP VBA with ArcFM database i have create some validation tools on this data. i provide error report with validation name but ...
1
vote
2answers
237 views

C# / .NET library for converting GeoJson to KML

I'm pulling in data from ArcGIS using ArcGIS.PCL which provides the geometries as GeoJson. I'd like to convert this GeoJson to KML. Does anyone know of any .NET libraries that provides this ...
0
votes
1answer
70 views

Capturing an event On Sketch Finish in ArcObjects

I am using IEditEvents_Event and IEditor. I invoked the GarciaUI_CreateNewFeatureTask and used: pID.Value = "esriEditor.SketchTool"; pCommandItem = pCommandBars.Find(pID); if (pCommandItem != null) { ...
1
vote
2answers
124 views

Unable to open IWorkspace using IWorkspaceFactory with operating system authentication

I'm trying to open a workspace from the IWorkspaceFactory interface. Here's what I'm trying at the moment: ESRI.ArcGIS.Carto.IFeatureLayer featureLayer = (ESRI.ArcGIS.Carto.IFeatureLayer)pLayer; ESRI....
3
votes
1answer
75 views

ESRI add-in not installed automatically after build (locked-down environment)

We are using Microsoft Visual Studio 2010 to compile ESRI ArcMap 10.0 add-ins. Generally it works without problems. But we have some PC with very high security policies. For example they have (beside ...
0
votes
0answers
109 views

How to add filter to mapguide layer definition in c#

I want to add a filter to a mapguide layer programmatically in c#.net. I verify if the layersDefinition of my layer contains or not a tag "Filter" and I do the job: //Get mapguide layer definition ...
0
votes
0answers
15 views

ArcGIS AddIn to load qgis symbology

I'm looking to make an add-in for Arc so that I can load symbology created in QGIS. I'm familiar with Arc and the way symbology works in it, but I'm unsure what the best way to tackle QGIS symbology ...
2
votes
0answers
100 views

Is there a Tiny Well-Known Binary (TWKB) implementation in C#?

I am aware of https://github.com/TWKB/twkb.js and I'm looking at evaluating Tiny Well-Known Binary (TWKB) in a c# application. I did some googling but came up empty. Are there any efforts underway ...
1
vote
2answers
144 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
2answers
97 views

How to get FeatureClass or FeatureLayer from FeatureClassID?

I did a network analysis with ITraceFlowSolverGEN and the method FindFlowElements(). Then I did a queryId's with INetElements which returns the FeatureClassId and OID. Now I want to get the ...
3
votes
2answers
170 views

GeoJson to Spatial Geography in sql server 2012, fix orientation of polygon

I've download from Mapzen many geoJson files related to countries with their respective administration level. Then I've parsed all the geoJson files and saved them to my sql server 2012 as geography ...
0
votes
1answer
50 views

Get CostDistance IGeoDataset as raster in C# ArcObjects

I have a CostDistanceCode that works correctly. I cannot cast the IGeoDataset result into a raster. The last line returns a null raster. How can I resolve this? // Declare the output ...
3
votes
0answers
55 views

LasDatasetToRaster does nothing to the Raster Layer

I have been trying to figure out how to clip and rasterize a LiDAR map file programmatically (Not through arcpy) I use C# but read many languages. So far I have been able to access and assign the LASD ...
0
votes
0answers
12 views

Converting RGB values from CSV to ArcMap Save As Layer File? [duplicate]

I would like to Convert RGB values from a CSV to a ArcMAP save as a layer file. I have a csv file with 4 columns. First column shows Depth in feet and second, third, Fourth column shows that RGB ...
1
vote
1answer
88 views

Applying a new colour scheme on GdalRasterLayer using SharpMap

I'm currently developing a surface water modelling system in C# (.NET) and am using the SharpMap control as my mapping component. It's all going well, but there's one thing I'm struggling with. I ...
1
vote
2answers
202 views

Getting all field names from feature class of file geoatabase using C#?

I want to get all fieldnames of feature class and then read data in each field. I have used table.fieldDef, table.fieldinformation but i am unable to get fieldnames if featureclass. My code which i ...
0
votes
1answer
296 views

Transforming from EPSG:2154 to EPSG:3857 using ProjNet4GeoApi/Proj.net, C#

I don't have much experience with GIS. Here's are my projections defintion: private Dictionary<CoordinateSystemStrings, string> CoordinateSystemStringDictionary = new Dictionary<...
0
votes
1answer
93 views

Converting from lat/long to EPSG:2154 using ProjNet4GeoAPI?

I'm not experienced with GIS. I received long/lat data and need to convert them to GIS. Here are code examples from the library ProjNet4GeoAPI : https://github.com/NetTopologySuite/ProjNet4GeoAPI/...
2
votes
1answer
176 views

Converting from lat/long to EPSG:2154, in C#?

I don't know much about GIS. I'm working in C#. I'm receiving latitude/longitude data and need to convert them to EPSG:2154. I've done some web search but I'm still not sure where to start. Is there ...
4
votes
0answers
156 views

Open ArcMap in Maximized State in C#?

I am running windows 7 enterprise with ArcMap 10.2 l have an application that processes data, when the data is finished processing I have a button that will show the results in a datagrid. From this ...
4
votes
1answer
55 views

Knowing Previous Command Item C# in ArcObjects?

I am creating a tool for ArcGIS Desktop that will execute a command when I click a place on the map. The Code looks like this: public class TileLasLoader_Tool : ESRI.ArcGIS.Desktop.AddIns.Tool { ...
0
votes
0answers
738 views

Add a heatmap as a layer to a map based on OpenStreetMap from C# WPF Visual Studio 2013

I need to show a map with some points (with lat/lon) of a heatmap on a map based on OpenStreetMap (OSM) . I have created a heatmap as a bitmap image by GHEAT.NET control lib http://www.codeproject....
2
votes
1answer
95 views

Attribute Table Window loses highlighted selection after Addin is Opened

I'm so new to GIS that this question might seem dumb to a lot of GIS Developers. I have taken over a project that is an AddIn for an ArcGIS Desktop app. C# VS 2010 project. I can get the Selected ...
1
vote
1answer
144 views

How to Dynamically Calculate Fields in ArcGIS Report?

I came across How to calculate custom fields in ArcGIS Reports? and it's very similar to what I'm trying to accomplish. I have two fields that are sums and would like to divide them in order to get a ...
1
vote
3answers
153 views

calculate bearing from one MapPoint to another MapPoint

I am using Esri.ArcGISRuntime package inside a C# program we are writing. I need to create specific shapes from a reference point and project them in different directions. This is easy to create a ...
0
votes
2answers
124 views

How to fill combo box of a form with the map layers name

While writing the code for adding all the layers in arcmap into combobox of a form, I am getting the error: 'Bestaurents.frmRestaurentviewer' does not contain a definition for cmblayer and no ...
1
vote
1answer
139 views

Button not appearing in ArcMap AddIn?

A fellow c# developer developed a ArcMap AddIn, but he has now left the business. I have acquired his laptop with the VS2010 and ArcMap 10.1. I can create the Esri Addin File. Import it into the '~/...
1
vote
0answers
331 views

show some data on a map by OpenStreetMap from C# VS2013 [closed]

I am very new to Open Street Map. I have some data that need to be shown on a map by Open Street Map from C# VS2013. It can be WPF or windows forms. The data is about some statistics results by ...
6
votes
1answer
211 views

How to add a new Parcel inside Parcel Fabric from existing parcel features (ArcObjects)

I want to create a new parcel in a parcel fabric layer. I have the x, y coordinates for the parcels to be created. I searched around a lot and found really nothing that actually "CREATES" a parcel. ...
1
vote
0answers
67 views

How do I read the attribute data associated with my SHP?

I'm using DotSpatial to aid in processing some geospatial data. I'm using the code below to determine if a point (lat/lon location) is within a polygon contained in the SHP. If the point is in a ...
1
vote
0answers
109 views

how to reproject an image programatically in c# using gdal

I have to reproject an image programmatically in c# using gdal library. For the moment i'm a little bit lost in gdal and i don't really now which methods i have to use. I think i will have to ...
2
votes
0answers
200 views

Handling ArcMap closing event in AddIn?

I'm trying to handle the closing event of ArcMap within an ESRI Addin Extension using C# and arcobjects. Furthermore I would like to handle 'a closing event', that is fired BEFORE ArcMap tries to stop ...
1
vote
0answers
51 views

Get spatialReference Domain, with XY Precision

I'm trying to get a spatialReference domain from prj file by using the function : private void ConstructCoordinateSystem(bool highPrecision) { // SpatialReferenceEnvironment is a singleton object ...
2
votes
1answer
107 views

Get the number of bends of a polyline

I am trying to get the number of curves/bends of a polyline. I know that I can accomplish this by getting the vertices of the polyline, and check the from and to and compare their angles, if they ...