Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [c#]

C# is a .NET programming language.

1
vote
0answers
16 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
14 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
0answers
9 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
21 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
11 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.
1
vote
0answers
16 views

Postgis to GML in python or c# [closed]

I know that there is great tool called ogr2ogr. It is a command line to and using it I can get some data from postgres and write it down to GML. Looks great but I would like to have some more ...
0
votes
1answer
29 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
17 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
23 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 ...
0
votes
0answers
54 views

Calling Python script from .net form?

I am trying to create a form/Python script that actives when a button is clicked. what are the steps you need to take? I tried the example callscriptfromnet from https://github.com/Esri/arcgis-pro-...
1
vote
0answers
17 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
23 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
19 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
13 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
29 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
55 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
43 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 ...
1
vote
0answers
112 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
38 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
127 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
68 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
58 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
42 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
92 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
68 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
16 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
22 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
84 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
22 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
68 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
108 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
92 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
116 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
176 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
77 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
78 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....
2
votes
1answer
811 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 ...
1
vote
1answer
81 views

Coding or converting grib files

I want to convert my text file to grib file. But it seems not possible. How can I code grib files in Fortran or C#.
1
vote
1answer
178 views

Alternative to MapTiler for tiling a GeoTIFF

I'm currently using MapTiler Pro console version, called from C# code as process with the following parameters: -geodetic -nodata 0 0 0 -f png32 -o result/ -tms -resampling bilinear -srs "+proj=...
3
votes
2answers
61 views

How am I supposed to use IWkb.ExportToWkb in C#?

ArcObjects provides an interface named IWkb for obtaining a WKB representation of a geometry. Generally, you can cast a geometry object to it: // WKB representation of POLYGON((0 0,1 0,1 1,0 1,0 0)) ...
2
votes
1answer
46 views

Combine multiple adjacent polygons into 1 polygon

I have a third party tool that is creating a color filled area by placing many polygons side by side. I need to combine these polygons into 1 polygon. Unfortunately changing the 3rd party tool is not ...
2
votes
1answer
1k views

Setting Embed Interop Types in ArcObjects to True or False?

I took over a new project with some legacy ArcObjects code and the original developer set the ArcObjects references "Embed Interop Types" property in Visual Studio to a mixture of "True" and "False". ...
3
votes
1answer
40 views

Is there a built in way to reduce the amount of points in an IElement

I have a polyline element and I want to reduce the number of points (vertices?) that make up the line. I know it will make the curved sections jagged and that is fine. I just want to control (perhaps ...
1
vote
1answer
284 views

Using gdalwarp with c# bindings?

I want to change projections for images using gdal bindings for c#. Gdal_translate seems like just renaming of projection (using a_srs parameter), but not reprojecting, so I used gdalwarp with s_srs ...
2
votes
1answer
55 views

Convert an IFeature to an IElement to display on the graphics layer

I have read some posts and looked at a few different examples but I am still having a problem. My problem seems to lay with the location of the IFeature's shape, they are coming back as x= 590241....
6
votes
2answers
104 views

Custom ArcObjects Toolbar Unavailable for Some Users

I'm responsible for maintaining an extension to ArcMap that consists of a toolbar with a bunch of menus & commands & tools. It uses the old-style COM registration for all of its UI. Recent ...
4
votes
1answer
85 views

Reshape ILineElement with ISelectionTracker in graphics container

End goal: Allow user to move points on a ILineElement using the selection handles from ISelectionTracker. Issue: Using my code below I am able to get the handles to appear on the line element, but it ...
1
vote
0answers
180 views

Get the distance from line to given geo point at given degrees [closed]

I have added another picture for better understanding. I haven't written any code as of now. My requirement is to calculate the distance from given point (pinned location in above map) to given ...