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.

0
votes
1answer
14 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
35 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....
0
votes
0answers
18 views

Linear Referencing and Dynamic Segmentation in arcobjects(c#) [closed]

I want to create a line segment along a linear feature(e.g roadway) by using from and to measure value from event table in ArcObjects (C#). I've created route feature class based on reference. Also, I'...
1
vote
1answer
27 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
75 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
22 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
48 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
38 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
46 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
38 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
40 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
45 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
49 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
21 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
46 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
72 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
55 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
79 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
96 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
24 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
62 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
68 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
520 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
70 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#.
0
votes
1answer
133 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
57 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
42 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 ...
0
votes
0answers
36 views

Converting x, y, srid to latitude / longitude

I have positions in JSON as x, y and srid ({"x":740370,"y":1045712,"srid":5514}). What would be the way to convert them to simple Latitude / Longitude ones (srid is different on other positions)? (...
2
votes
1answer
677 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
36 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
190 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
47 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
99 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
75 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
164 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 ...
1
vote
0answers
100 views

How to use Material Design in XAML Resources for an ArcGIS Pro SDK Add-In? [closed]

I am in the process of creating a .NET add-in for ArcGIS Pro using the Material Design in XAML packages. I created a new UI within a wpf application project during testing and am now implementing it ...
0
votes
1answer
23 views

CARTO Mobile SDK.UWP (C#) Get always get current map's south-west MapPos and north-east MapPos

How can I always get the current map's south-west MapPos and north-east MapPos when I zoom in/zoom out the map or drag the map? I want to create a dynamic bounding box for Carto Map.
1
vote
1answer
257 views

ProjNet. Coordinate reference system transformation deviation

I have a project with C# that contains a CEFSharp viewer showing a webpage with a map that I've created.I'm trying to add a marker in the map sending the parameters from C# to a function in the ...
1
vote
0answers
32 views

How to find all connected edges from gas device feature using C# API call to ArcGIS Pro SDK?

I am currently using connected trace to trace all the specified gas devices (using its Asset Group and Asset Type) to get output from the trace. I want to find all the connected edge features from ...
0
votes
1answer
55 views

How can I add a customised Carto Map Marker via Carto Map Moblie SDK.UWP?

I'm implementing a Universal Windows Platform (UWP) app, and I m using the Carto Map Mobile SDK (UWP). However, I don't know how to add a .png image as a Map Marker programmatically. Here is my code: ...
1
vote
0answers
36 views

ArcGIS C# RubberPoint.TrackExisting not working

I have a simple marker symbol I have drawn on the map. I am trying to use a rubber band to drag-move it to a new location. I think I am close because when I use .TrackNew instead of .TrackExisting the ...
0
votes
0answers
134 views

Displaying Georeferenced JPEG Image in MapWinGIS Map Control?

I have made a windows application in C# for creating a repository of satellite imagery and creating a database which have all the images metadata. I am using MapWinGIS map control to display the ...
1
vote
1answer
47 views

ArcGIS Pro SDK OpenRelationshipClass does not return results

I have been struggling with this issue for hours now and am wondering if anyone else has encountered this. I have a feature class (ADDRESS_MANAGER.GIS_INF_ADDRESS_P) and a table (ADDRESS_MANAGER....
1
vote
2answers
64 views

Playing with Events of BaseTool to draw Geometries.in ArcGis using ArcObjects C#

I have been trying to create a tool that creates a line using points. The idea in my mind is to get the points from a onmousedown Event and putting them in generic list and draw the line geometries ...
1
vote
1answer
227 views

Get all points from multiline in shapefile using C# and GDAL

I'm trying to read a shapefile and draw it using DirectX and GDAL library. So first I will read the shapefile and get a list of all the points in the shapefile. It works with linestring using GetPoint(...
0
votes
0answers
39 views

Openlayers 2 Vector Layer with BBox strategy too large

Currently, i'm building a REST service which will receive the bbox from front-end and then using that bbox to looking for appropriate Geometry Shape in MSSQL database. My Openlayer are setting up ...
2
votes
1answer
61 views

Change Layer's Label Property “Display coded value description”

I created labels for layer in according with this example They display coded value description from domain, but I need value itself. I can resolve it manually by unchecking this option "Layer's ...