C# is a .NET programming language.

learn more… | top users | synonyms

7
votes
1answer
547 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, ...
2
votes
1answer
20 views

Having trouble overwriting raster layers default property sheet

I need to Override the Property Sheet Dialog to display a custom property sheet that has a custom GUI built to analyse raster data based on transformed values. Alternatively, if I can access the ...
-2
votes
0answers
23 views

how can i add tiled layer on Sharpmap using postgresql? [on hold]

map = new Map(); try { //VectorLayer v = new VectorLayer("Point", new PostGIS("server=localhost;port=5433;user=postgres;pwd=9839757437;database=OSM3", ...
0
votes
0answers
14 views

Compare Street File to Annotation [on hold]

I am creating a mapbook using data driven pages. In the mapbook I have a street shapefile with a field for streetnames. I also have an annotation file with the street name labels. I want to make ...
4
votes
1answer
304 views

Get the value/description from a domain or subtype for a given field's value?

I need to get a value from an IObject.Fields.Field using ArcObjects 10.x using the criteria listed below: If the field has a subtype associated with it, I need to get the subtype name/description ...
0
votes
1answer
31 views

arcobjects 10.3.1 c#: Loading Addins programmatically

I am writing addins in C#, and am trying to load an addin. I thought i had the solution, but it seems like the full code is not loaded. The button is added to my toolbar, and code seems to run, too ...
2
votes
0answers
32 views

ArcMap Polyline Renders Incorrectly Unless Project Reloaded

I am trying to get a graphic polyline to render over top of an imported shape file. I'm using C# with ArcMap 10.2.2. The issue I'm having is that the first time the polyline is created, it merely ...
1
vote
2answers
2k views

Offline Maps API for C# Desktop Application?

I have a C# WPF application which has browser control to display a Google Map. Google Maps API v3 is being used in the application. I use data received from a service to plot users current location ...
5
votes
2answers
4k views

No constructor defined?

In my C# Console Application, Visual Studio 2010 highlights new FeatureClassNameClass() in my below line of code and states "ESRI.ArcGIS.Geodatabase.FeatureClassNameClass has No constructors defined" ...
0
votes
1answer
355 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 ...
2
votes
1answer
19 views

Spatial relationships that do not match

All, I have 2 layers as shown below What I want to do is go through each feature (in pink) and do a spatial filter against the green layer. My current code is inMemFeatCur = ...
1
vote
2answers
1k views

ArcObjects - accessing layer data table from C#

I've spent all day yesterday trying to trace all errors but I'm just completely stuck now. Google isn't helpful either. I'm trying to create a small C# tool which opens a MXD file in background and ...
3
votes
1answer
595 views

Is it possible to figure out which “Path”(PointCollection) is clicked on within a PolyLine?

I am using ArcGIS WPF's Polyline to plot several lines (PointCollections). Adding a Path(PointCollection) looks something like this. PointCollection collection = new PointCollection(); PolyLine ...
0
votes
0answers
258 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 ...
4
votes
1answer
231 views

How do you convert a SOAP PolylineN from one namespace to another?

I'm doing a proof-of-concept to try to speed up a data service that accesses DB2 databases and a GeometryService on an ArcGIS server using the ADF and the SOAP API. I'm trying to speed up data access ...
2
votes
1answer
164 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 ...
2
votes
1answer
57 views

NHibernate spatial geometry type become NULL - PostGis

I am using postgres/postgis as db and Nhibernate as ORM on a C# project. This is the first time I try to map postgis to a .Net application. My setup uses NHibernate version 4.0.4.4000 and ...
3
votes
1answer
450 views

Draw text in PageLayoutControl in OnAfterDraw?

I have a PagyLayoutControl in a print preview dialog. It shows the same extent and layers as the master MapControl. Both controls are not syncronised, because changes made in the PageLayoutControl ...
4
votes
2answers
527 views

Uniquely identify feature classes & compare them for equality using ArcObjects?

I want to implement EqualityComparer<T> for feature classes so that I can stuff them into a Dictionary or HashSet. For motivation, say that I am looping over many IFeature objects which belong ...
1
vote
1answer
27 views

Remove feature class from group layer in C#

I have a large program that pulls in various group layers and feature classes. What I am trying to do is check each feature class within a specific group layer that is empty. The count part is easy ...
3
votes
1answer
410 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 ...
2
votes
1answer
380 views

Can I update the service on ArcGis 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 ...
3
votes
2answers
2k views

Opening geodatabase files using Browse Dialog Command (VB.NET/C#) of ArcObjects?

I am currently using the following method with ArcGIS 10 to open raster files from a form: Public Function BrowseRaster(ByVal sTitle As String, ByRef sFolder As String, ByRef sName As String) As ...
3
votes
1answer
4k views

How to convert lines to polygons using NetTopologySuite?

I am trying to convert lines to polygons using NetTopologySuite(a C# port of Java Topology Suite JTS). I ran the sample console code succesfully and it generated two polylines. I then tried to run ...
0
votes
0answers
38 views

GeoServer C# error no such workspace

I am trying to create a program which allows the user to upload their own shapefile into geoserver via the rest api using C#. I used the code from okello in here. However there was a missing function ...
0
votes
0answers
26 views

What happened to MapGuide?

I want to use a free or at least a cheap alternative to ArcGIS Server that I can develop for in .NET. MapGuide used to be such. Is it still maintained?
2
votes
2answers
323 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 ...
2
votes
1answer
45 views

Putting features (IFeature) into ifeatureclass with ArcGIS Engine?

I am trying to get the selected features from axMapControl and put them in a new feature class. I can get the selected features but when i'm trying to put them in a IFeatureClass and then cast it as ...
1
vote
1answer
354 views

Problem with Converting XY Coordinates to LatLon

Here is the function that I use to convert from pixel x,y to lat,lon coordinate: public static Coordinate imageToWorld(Dataset gds, int x, int y) { double[] adfGeoTransform = new ...
0
votes
0answers
17 views

Querying/getting EID ( Edge id's of network ) in ArcGIS API for JavaScript?

I did a server-side(c#) network analysis and the output is the EID's(NetEid's) which needs a INETelements to query for features and Object Id's. It takes long time especially when you found many ...
3
votes
2answers
2k views

Zooming & panning to selected objects using ArcGIS Engine?

I'm writing a program using ArcGIS Engine, and need to zoom & pan into the map to show the selected content. Loading and displaying the map does work using something like this: AxMapControl ...
1
vote
1answer
400 views

Hosting Geodatabase on ArcGIS Server?

I have a simple Geodatabase in access format. I'd really like to host this database on an ArcGIS Server through one of their services. The idea is that my users would be able to connect to this ...
3
votes
1answer
454 views

ITopologicalOperator and Z Values

I have 2 polygon featureclasses with Polygon ZM features. I am trying to do a ITopologicalOperator.Difference() on these feature classes but it errors saying that: Geometry cannot have Z values ...
1
vote
1answer
836 views

How to query all layers in ArcMap and get access to them by name or index?

I have ArcMap with tons of layers. Some of these layers may contain another layers with data (aka Composite layers) or they don't. The depth of composite layers in unknown. I need to query all layer ...
1
vote
0answers
42 views

How to convert csv file into geo database file?

I have a csv file that i want to export to a file geodatabase (*.gdb) in C#. I am currently looking into GDAL ogr2ogr commands. They have a way to convert gdb file into csv file but not the ...
3
votes
1answer
294 views

Can't cast from IFeatureClass to IFeatureClassLoad [duplicate]

I'm attempting to load a large number of features (up to 310k) into a feature class. It is functional at the moment, but speed is a major issue. It takes about .42 seconds per 1000 features. I've ...
2
votes
0answers
32 views

Single button click to bind three javascript functions

I have created cascading dropdownlist for district taluk and villages when i click search button it must zoomed to all the three layers.but i assigned the filter value for village so that it will zoom ...
1
vote
3answers
297 views

Arcmap Refresh Button

I am working with ArcMap and C#. In the bottom left hand corner, there is a menu where you can toggle between Data view and Layout View, a Pause button, and a refresh button. I have created an Add-in ...
1
vote
0answers
35 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 ...
2
votes
2answers
1k views

How to get all OIDs from a table?

I have table which I need to get all the OID's from it. I tried this code : List<int> OIDList = new List<int>(); IQueryFilter queryFilter = new QueryFilterClass(); queryFilter.SubFields ...
1
vote
1answer
2k views

Calculating driving distance between 2 lat/long points using .NET application? [closed]

I want to build a .NET application that can get an input of 2 lat/long points and return an output that specified the driving distance between the points. What APIs or methods could be used to ...
0
votes
1answer
208 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. ...
5
votes
1answer
249 views

Reading an Existing Join

Confused again. I was finally able to run ArcCatalog and create a join in my map document (I will do the deed programmatically eventually) but I was interested in how a join looked once it was ...
0
votes
1answer
295 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 ...
3
votes
0answers
37 views

How to create a Polygon around a Linestring as a GeoFence in C# .NET

I'm looking for a .net library that will help to create a polygon that I can use as a Geo-fence around a route on a map. The following image demonstrates the result I'm after. Imagine that this ...
13
votes
2answers
7k views

API documentation for Gdal/Ogr with C#

I want to assign projection to shapefile in my web C# application, for this i am using Gdal/OGR/OSR C# bindings and add osr_csharp.dll and ogr_csharp.dll references. But i am facing some difficulty ...
2
votes
1answer
52 views

Using ArcObjects to stop items from being deleted from Table of Contents?

I am using ArcObjects in a C# addin with ArcGIS 10.3.1 for Desktop. I'm trying to stop a user from removing certain layers from the Table of contents. I have my listeners setup for ...
4
votes
1answer
304 views

Closing MeasureTool Window

I'm activating the built in ArcGIS measure tool using the following code: ControlsMapMeasureTool measureTool = new ControlsMapMeasureToolClass(); measureTool.OnCreate(_axMapControl.Object); // set ...
0
votes
1answer
19 views

QGIS write polyline coordinates

I want to use QGIS to write polyline coordinates in a file. I did already successfully created .shp file. But It is hard to code(in C#) to fetch the coordinates. I need to fetch the coordinates in my ...
4
votes
1answer
258 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 ...