Stack Exchange Network

Stack Exchange network consists of 174 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.

2
votes
0answers
12 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
17 views

Where state borders cross roads and calculate distance traveled between state borders? [on hold]

For example, I start in somewhere in Washington state and go to somewhere in New York I want to know the total distance in miles I would like to know the distance between the state borders ...
0
votes
0answers
18 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
11 views

Developing tool like Vertices Edit in ArcMap with ArcGIS Engine & C#? [closed]

I want to realize the tool like "Vertices Edit" in ArcMap with ArcGIS Engine ,Edit(move,delete,Add),view or reshape the verties of the geometry. Can anyone give me some example code or the interface ...
0
votes
0answers
21 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
16 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
30 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
0answers
10 views

ArgumentOutOfRange Exception was unhandled

I came across this error. It show below error when i try to play around the map. ArgumentOutOfRange Exception was unhandled with message: The input double value is out of range. I already ...
0
votes
1answer
41 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
31 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
51 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
43 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
22 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
38 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(...
0
votes
0answers
15 views

ArcGIS Pro Add-in development using C# Winforms [duplicate]

This question is more of a general rather than technical. I am new to this Add-in development. I already have worked on Winform application development on C#. Now I am assigned a task to build an Add-...
1
vote
0answers
54 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
212 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
63 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
89 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
48 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
38 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
29 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
230 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
33 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
129 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
39 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
91 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
69 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
113 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
56 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
22 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.
0
votes
1answer
177 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 ...
0
votes
0answers
39 views

How can I use the MapEventlistener and VectorElementEventlistener via Carto Map Mobile SDK. UWP?

I m using the Carto Map Mobile SDK (UWP) to implement the customized carto map on a UWP app. However, I do not know how can I use the MapEventListener and VectorElementEventListener on my app (using ...
1
vote
0answers
27 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
35 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
28 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
88 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
35 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
58 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
151 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
92 views

Give field a value in a Featureset Dotspatial

I am creating a shapefile using DotSpatial library in Microsoft Visual Studio and C# programming language. The shapefile consists of a Polygon layer. Each polygon in the layer needs to have a specific ...
0
votes
0answers
34 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
43 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 ...
0
votes
1answer
131 views

Find coordinates of extended line segment intersects with given longitude

I have a line between C1 and C2; My Coordinates are; C1: 36.454N - 21.785E C2: 41.725N - 38.475E I want to find C3 latitude value based on given longitude when I extend my C1-C2 line segment. IE ...
2
votes
1answer
39 views

How to find the original vertex location from the OnVertexMoved event

So I am creating a fairly small, and hopefully simple, editor extension. This is in Arc 10.4. What I would like to do is this. If a user is editing a feature and is manipulating the edit sketch, ...
0
votes
0answers
69 views

MongoDB Loc element name duplicate in C#

I have Polygon coordinates inserted into the MongoDB and the code looks like public class PItem { [BsonIgnoreIfDefault] public ObjectId ID { get; set; } [BsonElement("loc")] public ...
2
votes
1answer
54 views

Setting field visibility in ArcMap using C#?

I want to set certain fields of a featurelayer to be visible on startup. how would I go about changing the field visibility of certain fields? if (featureLayer.Name == "LayerName") { // Code to ...
1
vote
1answer
233 views

Inserting GeoJson Polygon Coordinates with MongoDB and C#?

I'm using GDAL\ogrinfo.exe to read the tab file which includes polygon/LineString/Point coordinates as a stream using the process. I'll store the coordinates in the MongoDB. My attempt at inserting ...
1
vote
1answer
165 views

Loading WMS Layer with MapWinGIS from GeoServer

I'm working on a C# project using MapWinGIS 4.9 and Geoserver 2.13 Previously I've stored Shapefiles in Geoserver and I want to load in a C# project using MapWinGIS control. I'm using WmsLayer Class ...
1
vote
0answers
112 views

NearestNeighbour with NetTopologySuite with wgs84

I've got a list of polygons in wgs84 WKB, I read them into NetTopologySuite Igeometries put them into an STRtree and then use the NearestNeighbour function to get the closest polygon to a point (also ...