C# is a .NET programming language.

learn more… | top users | synonyms

1
vote
0answers
149 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
116 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
69 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
136 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
118 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
69 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
211 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
68 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
110 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
72 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
95 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
92 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
130 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
91 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
163 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
81 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
178 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
271 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
86 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
167 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
152 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
53 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
671 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
91 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
133 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
145 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
117 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
129 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
295 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
206 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
66 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
105 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
193 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
49 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
104 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 ...
1
vote
2answers
95 views

I need to draw Rectangle with Simple Fill Symbol

I need to draw this rectangle on layoutview : I try this but it doesn't work. How can I draw this rectangle ? IPoint p1 = new PointClass(); p1.X = 9.9936; p1.Y = 5.8777; ...
1
vote
2answers
70 views

Return Information from Feature Class Fields by XY Point

I am trying to get information from fields within specific feature classes based on an XY point. The user will click on the add-in tool, click on a location in ArcMap, and the tool will find the ...
2
votes
2answers
88 views

Is it possible to lock records or attributes indefintely if a field is populated?

I am creating a c# ArcGIS addin where I have a feature class stored in Oracle, when a feature is created some of the fields within the table will be populated. If field X is populated, then certain ...
0
votes
0answers
66 views

ArcObjects 10.3: Add image to .mxd

I'm new to ArcObjects (C#) and I'm having trouble finding an example of how to add an image (raster layer) to an MXD. I'm looking to open the MXD, and edit it as a file, without having a workspace ...
2
votes
1answer
49 views

Release IFeature Object Efficiently

I have the following code: //qf is a query filter var fCursor = FC.Search(qf, true); var feat = fCursor.NextFeature(); int selCount = FC.FeatureCount(qf); var userId = new int[selCount]; if (...
0
votes
1answer
107 views

Reconcile and post with c#

I am trying to understand Esri example of reconciling and post with C#. Could someone give me some hints or point me in the right direction. The reconcile and post in Arcmap toolbox has edit version ...
1
vote
1answer
307 views

How to create a polygon with four coordiates

I need to draw polygon shape with the following coordiantes private List<IGeometry> geos2 = new List<IGeometry>(); var gf = new GeometryFactory(new PrecisionModel(), 3857); ...
2
votes
1answer
101 views

Create geometry from a result of intersection [closed]

Split a polygon in half with an extended line public Ipolygon CreatePolyFromIntersection(Ipolgon polygonA, Ipolygon bounradyThatcontainsPolylgonA, IFeature lmark){ ...
2
votes
1answer
70 views

Create New point

creating new point with different coordinates not changing the position. First point The bellow code create a point on the map VectorLayer pushPinLayer = new VectorLayer("PushPins"); ...
0
votes
2answers
328 views

How two add line from point A to B

I am trying to draw a line between two lines. I could create points by using the createPoint Method using System; using System.Collections.Generic; using System.ComponentModel; using System....
0
votes
1answer
676 views

How to make a point from real latitude and longitude values

My program has a center point and one moving object . At this moment this point is somewhere in Europe.But Now i have to change that point from the latitude and longitude values(of Australia) . Please ...