Questions tagged [c#]

C# is a .NET programming language.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

ESRI ArcMap ArcObjects C#: Project geometry with user defined transformation

I have routines which project geometries from the projectedCS DHDN_GK_3 to projectedCS ETRS89_32N using the available predefined ESRI Transformation esriSRGeoTransformationType....
1
vote
0answers
10 views

Write geo information to TIFF by LibGeoTiff.NET

Currently I am writing a crop function for georeferenced TIFF files. I use Free.Ports.LibGeoTiff which seems to work quite well to read the TIFF, also the geo references. It is also possible to write ...
0
votes
1answer
21 views

Startup() confused while converting class:IExtension into class:BaseToolbar

I developed an extension with ArcGIS 10.4.1 that I can use through the extension menu and now I need it as a toolbar. The problem is that ArcGIS launches only the startup() event from the extension ...
0
votes
0answers
13 views

GDAL NULL Path Value On Production Server

I am using c# and visual studio. I have an app using GDAL that works perfectly on the Dev Server. When I transfer it to Production the app fails. I receive the following error message: An error ...
0
votes
1answer
24 views

Error when creating projected coordinate system

I have written a function to get a Transverse-Mercator IProjectedCoordinateSystem. However when calling the Define function I get an RPC_E_SERVERFAULT (HRESULT: 0x80010105) and no additional ...
1
vote
0answers
14 views

Similarity between two sets of lat/long points

I am trying to measure the similarity between two trajectories (two sets of lat/long points) which are the outputs from two APIs. I am trying to measure the difference between the routes given by ...
1
vote
0answers
47 views

qgis gdaltransform versus OSGeo.OSR.CoordinateTransformation

I have implemented a simple coordinate transformation test in c# using GDAL 2.4.1 downloaded from https://www.nuget.org/packages/GDAL/. When comparing the result with gdaltransform (QGIS 3.4) and EPSG....
3
votes
1answer
31 views

Display selected feature next to winform window

I'm trying to achieve a scenario like below image when a row selected in Grid, the selected row's feature should be visible next to winform window But in my case, I'm stuck with a selected feature is ...
3
votes
1answer
76 views

Georeferencing RasterLayer using ArcObjects?

I have a raster derived from a .png which has been drawn into a geodatabase. I also have the spatial reference and extent coordinates where I want to georeference the raster. Is there a way to ...
0
votes
1answer
26 views

Draw RasterLayer to map

I request a .PNG from a rest API, store it and create a IRasterLayer. My problem is I'm trying to draw it to the focus map with the RasterLayer.Draw() method, but does not look like I'm doing it ...
0
votes
1answer
24 views

How do I implement a thematic category theme for Mapsui?

I want to implement a theme based on category values for a field within an Arcview shapefile. There is a something similar in SharpMap but not in Mapsui. Any ideas?
1
vote
0answers
9 views

Programmatically open Viewer/Magnifier window in ArcMap 10.2+

Is there a way to programmatically open Viewer/Magnifier etc. windows of ArcMap from Add-In? I am using 10.2, but anything 10.2+ will be fine.
2
votes
0answers
38 views

WGS84 to local coordinate system [closed]

I have a point cloud and would like to move this to the local coordinate system for example from Revit facing toward the first quadrant. We have a file with 3 ground reference points and on-site ...
1
vote
0answers
25 views

Create red Polyline around point symbol

I am using the Esri.ArcGISRuntime 100.5.0 NuGet package with C#. I want to add something like a border around a point symbol. So I get the geometry of the symbol (this can be a circle, square, etc.) ...
0
votes
0answers
16 views

Reloading raster file using GDAL in C#?

I'm trying to build an application to read in and display raster files using GDAL and C#. The opening and reading is fine. But, if I delete the file and reopen the file again, I encounter this ...
1
vote
2answers
18 views

ArcPy error handling within a C# wrapper

I'm running arcPy commands from a C# script i.e. RunPythonScript("arcpy.Delete_management(\"C:\\\\Temp\\\\NW\\\\land.gdb\", \"Table\")"); private static void RunPythonScript(string script) { ...
1
vote
0answers
28 views

Implementing new Snapping in ArcGIS Engine C# Application?

As I can find, there are two kinds of snapping in ArcGIS 10.2.2: 1- Classic snapping. 2- New ArcGIS Snapping, which doesn't have any specific name as I know. I can't implement the New ArcGIS ...
0
votes
0answers
22 views

dotspatial Load in the map from large shapefile with query

Can I load only a little set of data from a large shapefile with a query in dotspatial c#? I think something like "Definition query" of arcmap.
0
votes
1answer
44 views

ArcObjects Error HRESULT E_FAIL has been returned from a call to a COM component

When you run a Python script from ArcObject .net, an error occurs, all parameters are correct. ArcMap 10.6 import arcpy from arcpy import env arcpy.env.overwriteOutput = True env.workspace = arcpy....
0
votes
0answers
20 views

Export Mapview to an image based on user drawn sketch ArcGIS Pro SDK 2.3

I am learning ArcGIS pro sdk with no prior experience in c#. Here is my code that exports the mapview to jpg, but I want it to export only the area that the user's rectangle covers. protected ...
0
votes
1answer
44 views

Sending a WFS-T request

I have a geoserver which I want to edit using c-sharp, I managed to retrieve information from it, but I haven't found a way to make any changes - I know that there is WFS-T but I haven't found a way ...
1
vote
1answer
38 views

GDAL C# Bindings for VRT don't write a VRT file

I have previously asked this question on stack overflow, and am now asking this more specialized audience. I'm wondering why the GDAL C# library (v2.3.3) call to Gdal.wrapper_GDALBuildVRT_names(...) ...
1
vote
0answers
32 views

Serializing and Deserializing Elements using ArcObjects C#

I am using the XMLSerializerClass of the Arcobjects SDK to serialize graphic elements of page layout into XML then saving the XML string to the database. My issue is that when serializing graphics ...
1
vote
0answers
20 views

To identify overlapping lines between 2 shape file using GDAL

I have 2 shape files in and I have to identify the overlapping lines between 2 shape lines. I have tried below code using overlap, It provided me non-overlapping lines as well. while ((jsonFeature = ...
0
votes
0answers
16 views

Skip locked rows for editing using ArcObjects?

Can I lock a row so that the cursor does not bring it because it is in use by another cursor ? ITable table=GetTable(); ICursor crntCrsr=null; ICursor secondCrsr=null; crntCrsr=table.Search(filter,...
0
votes
1answer
40 views

Get raster coordinates after warping with C# GDAL

I'm currently trying to read a raster file with GDAL and C#. The reading part is fine, but I have troubles with reading the correct bounding box of the raster to map it correctly to the screen. If the ...
0
votes
0answers
86 views

Why does opening SDE Workspace Factory ask for credentials again? ArcObjects C#

I'm trying to open SDE Workspace Factory using IWorkspaceFactory.Open I give the complete Property set in the code to open. ESRI.ArcGIS.esriSystem.IPropertySet propertySet = new ESRI.ArcGIS....
1
vote
1answer
56 views

Select by Location (Between two layers) - ArcObjects C#

I have two Point Feature Classes - Say FC1 and FC2 - added in the current map I want to Select Features from FC1 that intersect with Features of FC2 This can be easily done with ArcMap's Select By ...
2
votes
0answers
148 views

Load support data set from NetCDF file (Tropomi Sentinel 5P) with GDAL.NET

Been trying to load two data sets from a Tropomi NetCDF file (N2O measurements). I can manage to load some data sets, which are right under PRODUCT, but not others which are under PRODUCT/SUPPORT_DATA/...
1
vote
1answer
52 views

Getting Field by name from feature using GDAL?

I have recently started using GDAL in C#, I want to get a value from a field of a feature using the name of that field. In the docs here it says that the operator [char*] is supported, however it's ...
0
votes
0answers
18 views

Coordinate system transformation deviation [duplicate]

I'm having the same problem as described in this Question from September 2018. Has it ever been answered satisfactorily? I'm attempting to transform from EPSG 3785 to 4326. The X coordinate output is ...
0
votes
2answers
304 views

Calculate the target point by using initial coordinate, bearing angle and distance

I need to calculate the target coordinate by using the initial coordinate, bearing angle and distance. I came across this on how to calculate it. Then I construct the code in C#, but it seems I can't ...
1
vote
1answer
112 views

gdal_translate Bilinear Interpolation

I am working with the v2.3.3 NuGet of GDAL by Tamas Szekeres for the .NET environment, and can successfully open the etopo1_ice_g_f4.flt raster to cut basic tiles. The problem I am having is that ...
1
vote
1answer
68 views

Open Traverse Method for the map survey

I need to use traverse method in my program on visual studio(WPF) so that the user can get their target point coordinate by using their initial data. In my knowledge there is two type of traverse that ...
2
votes
1answer
45 views

Getting line segment object from points

I am fairly new to Arc Programming and am currently using .net to build my tool. There is not much back ground information as I am starting from a Blank Map. The goal of my tool is just to create a ...
3
votes
0answers
119 views

Proj.NET transform wkt to lat lon coordinate list

I am looking to transform from a WKT in 27700 into lat lon list of coordinates, but cannot quite work out how to do it using this library: https://archive.codeplex.com/?p=projnet I can easily do a ...
0
votes
0answers
111 views

Seeking library that reads/writes shapefiles to use with .net core 2.2?

Previously I used to use Easy Gis .net. Now we have a .netcore 2.2 project and I need to read/write Shapefiles. I have googled for 2 hours and I didn't find anything. I also tried to use dotspatial ...
2
votes
0answers
18 views

Pan viewer window changes scale first time

I have written a simple tool to pan a viewer window (if present) to the centre of the map view, which reduces the number of clicks required and mouse travel to Pan Viewer to Map Location, it works ...
0
votes
0answers
28 views

Xamarin Online Routing with Carto Mobile SDK does not work

I’m currently trying to calculate a route with the RoutingService in Xamarin (Mobile SDK). I initialized the CartoOnlineRoutingService like this: _routingService = new CartoOnlineRoutingService("...
0
votes
0answers
140 views

Merge two shapefiles into one new shapefile with OGR/GDAL library in C#?

I am currently coding a C#/WPF application that lets you choose two shapefiles and create a new merged one, with the content of both shapefiles. My problem is that I am quite new (1 month with gis) ...
1
vote
0answers
25 views

What type of object is required for IViewRefresh.RefreshItem “Data” parameter?

Esri's help for this method specifies this as LPUNKNOWN, which is rather unhelpful since I don't speak COM. I've tried an envelope, a geometry, and a graphicsContainer; each time receiving "System....
0
votes
0answers
92 views

Sharpmap GeoTIFF placement/scale Issues

I am trying to place GeoTIFFs onto a SharpMap Mapbox. Some GeoTIFFs work just fine and are placed where expected. For example, .tiff files from this website work fine and are placed/scaled ...
0
votes
1answer
135 views

Merge feature data rows of a shapefile

I'm using NetTopologySuite to read a shapefile like below code: private FeatureDataTable GetFeatureTableFromShapefile(string shapeFilePath) { GeoAPI.GeometryServiceProvider....
1
vote
0answers
154 views

Band 1: Access window out of range in RasterIO()

I'm trying to implement a mouse_move event handler to display the elevation based on the mouse location. I'm using the ThinkGeo API to display the raster map (.tif) and gdal C# to get the elevation ...
0
votes
1answer
148 views

Constructing polygons from GDAL Polygonize?

I have a geotiff file, which, for each cell ( pixel), it contains a discrete value ( you can think of this value as the "fitness" value of the cell). For the neighboring cells, they can consist of the ...
1
vote
1answer
264 views

c# - Using GDAL to read raster is producing array of incorect values

I am using c# GDAL bindings in attempts to read raster values and preform fairly simple calculations. In summary, I would like to get the mean of the values and then get the sum of values below the ...
0
votes
1answer
29 views

Error when using IFeatureCursor to inquire feature

As you can see the other attributes are doing well, but the shape of the feature throw an exception "Shape = "(pFeature).Shape" raises an exception of type "System.Runtime.InteropServices....
2
votes
1answer
86 views

Seeking ArcGIS Pro SDK equivalent to geometry.measureOnLine(point) of ArcPy?

I am looking for a method in the ArcGIS Pro SDK 2.2 that will return the measure distance along a given polyline geometry. Here is the python method measure = polylineGeometry.measureOnLine(...
1
vote
0answers
85 views

Not Able to Add MPK to Map in ArcGIS .Net Runtime and MVVM

I am trying to add an MPK to ArcGIS Runtim 10.27 using MVVM pattern and WPF I am able to see the MPK running on the localhost after running the application but the MPKMap = localMapService....
3
votes
1answer
1k views

Integrating Leaflet with ASP .NET MVC?

I am trying to use Leaflet (https://leafletjs.com/) javascript library in a project built on ASP .NET MVC5. For the sake of simplicity, let's just say I am trying to run the following code (provided ...