C# is a .NET programming language.

learn more… | top users | synonyms

1
vote
1answer
97 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
112 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
81 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
110 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
216 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
199 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
61 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
80 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
159 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
39 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
96 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
81 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
59 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
77 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
60 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
44 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
86 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
225 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
96 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
60 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
236 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 ...
0
votes
1answer
445 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 ...
0
votes
0answers
67 views

How to convert real altitude and longitude values to GeometryTransform.TransformBox values

I have a running program which has a point but its values are not dynamic . Current code for the point is var mathTransform = LayerTools.Wgs84toGoogleMercator.MathTransform; ...
1
vote
1answer
53 views

How can i get the center point for victoria

I am following this tutorial. But as per this tutorial the the center point is located in Netherlands. Now I need to change this for Victoria, Australia. Could you please tell me how can i change it. ...
2
votes
2answers
91 views

Query Features in Certain Direction

I have a polyline that I would like to query features that are on it's left, right, top, bottom. I am not looking for the features surrounding it but for features that are on a certain location from ...
1
vote
1answer
68 views

Comparison between using VB.net or C# in ArcObjects or ArcGIS Server [closed]

Is there any differences between using VB.net or C# in ArcObjects or ArcGIS Server based projects, in functionalities, samples, Q&A community? Is there any comparison which covers these aspects to ...
2
votes
0answers
46 views

Programmatically fetching current Add-In version using ArcGIS Pro SDK

The version of a custom ArcGIS Pro SDK Add-In is held in the config.daml of the Add-In project: <AddInInfo id="{some guid}" version="1.0" desktopVersion="1.1.3068"> How do I programmatically ...
0
votes
0answers
34 views

How to check if lat long overlaps geometry in STRTree

I am using NTS in C#. I have loaded the created STRTree and loaded the Geometry data in in.Now i am trying to search if a given lat, long is contained in which matching geometry and return its id. ...
2
votes
2answers
103 views

Proper way to check if a Factory Code is Projected or Geographic

I would like to create a SpatialReference with ArcObjects, but I won't know whether it is Projected or Geographic, I'll only have the SRID. Is it fine practice to use ...
0
votes
0answers
20 views

How to create points on for Stations?

I have a set of coordinates for 6 stations. I will need to place a image on the specific coordinate and change the image based on my own data in real time. How can I create a layer to geoexplorer ...
1
vote
2answers
120 views

How do I generate an image of each polygon in a shape file? [closed]

I have shapefiles containing areas (states, counties, bodies of water, etc.) and need to generate an image (png / jpg) of each area. How can I do this? In my mind, the manual workflow would be: ...
2
votes
1answer
153 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 ...
1
vote
0answers
55 views

Writing and reading arcs using File Geodatabase API .NET library?

It looks like the File Geodatabase API has supported arcs since 1.2. But no samples have been included for the C or .NET library. Does anyone have any code that shows how to do this using the .NET ...
0
votes
1answer
28 views

C# ogrinfo with virtual vector source doesn't work GDAL 1.10

I am trying to use GDAL 1.10 with a vector virtual source which is nothing more than the example union of two shapefile layers. from the commandline, ogrinfo works fine on the source. But the C# ...
-1
votes
1answer
77 views

Spatial checking for 2 polygons intersect in ArcObjects? [closed]

I want to check source building intersect with target building (source buildings 150000 & target buildings 150000) this is very heavy data. i have use(Spatial ...
0
votes
0answers
137 views

Buffering a polyline

I'm attemping to buffer a polyline that the user has drawn on a map (Google maps and OSM map). The user specifies a distance in metres and a polygon should be drawn around the polyline representing ...
0
votes
0answers
42 views

Upload Map to ArcGIS Online and convert to KML

Looking to upload any number of map types from a web application and then have ArcGIS online convert them to KML and then send them back the application. If the map can't be converted, give the user ...
1
vote
1answer
97 views

Using AddDataDialog in standalone ArcObjects/C# application?

I need some help with showing an "AddDataDialog" in a C# standalone application to select some feature classes from inside a file-geodatabase. Whatever I try, it ends up with an Exception which makes ...
1
vote
1answer
180 views

Map matching a stream of GPS points to possible bus routes & C# map matcher

I have streams of GPS points that are transmitted from a device aboard a bus in real time. I would like to use these points to infer which route the bus is following. I have routes stored as GPS point ...
0
votes
1answer
123 views

ArcGIS Runtime SDK for .NET (Windows Phone) - ArcGISLocalTiledLayer Issue

I'm developing Windows Phone 8.1 client for our company ArcGIS maps. Online layers works fine, but I need to deliver offline maps (Map Tile Package - .tpk file) to users with bad connectivity. My ...
6
votes
0answers
153 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
53 views

How to select object on the map in pan mode?

The user moves on the map (pan mode). The he clicks right mouse button. I want to select the element and then display context menu. What is the way to select element on the map in pan mode? I use ...
2
votes
3answers
1k views

Executing async method inside relaycommand using ArcGIS Pro SDK and MVVM?

I'm developing a "search tool" dockpane in the ArcGIS Pro SDK using MVVM. I have a button on my dockpane hooked up to a relaycommand in my viewmodel, which trys to call an async method in my model to ...
0
votes
0answers
83 views

Unable to get property 'parse' of undefined or null reference error in building Windows Forum Application in C# by Visual Studio 2010

I am trying to build a Windows Forum Application that will uses to download and display some layer in the Geoserver. But every time that I run the app I will see an error(image). Can anybody help me ...
0
votes
1answer
106 views

Failed to run Local Geoprocessing tool in ESRI runtime sdk

I have created a gpk using the below python script in ArcGIS 10.3.When trying to consume as Local geoprocessing service in 10.2.5,I get below errors. The application is running using developer ...
0
votes
1answer
107 views

Mouse Double Click Events

I would like to display a Message Box Dialog when the user activates the -esri selection tool- and double clicks anywhere on the map. or when they doubleclick any feature on the map please note that ...
0
votes
0answers
46 views

Find line where the beginning or end of line touches a polygon with minimal radius

I need to check, If a point from a beginning or an end of a line is nearby a polygon. The target is to check, whether the line is nearly connected to a polygon. The data are coming from a shapefile. ...
3
votes
1answer
405 views

DotSpatial problems with reprojecting shape files

I have a shape file with this projection: ...
0
votes
0answers
40 views

Running ModelBuilder through .NET does not always created expected geodatabase?

This code is the run a ModelBuilder through C# .NET this ModelBuilder works to convert a (.dwg) autocad file to a geodatabase but the problem is sometimes it works perfect but other times it doesn't ...
0
votes
0answers
72 views

Referencing ESRI feature class in C#

I would like to reference an existing feature in C# web app. I have a web app written in C# that front-ends a SQL Server database. The app uses non-spatial data in general but some of the objects ...