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
1answer
28 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 ...
0
votes
1answer
32 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
0answers
49 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=...
0
votes
0answers
19 views

CompositionException when trying to use GDAL extension in DotSpatial

I downloaded the source, built the project, and now I am trying to add GDAL extension to DotSpatial app using this answer: https://stackoverflow.com/a/29803545/1993024 But when running the app, I get ...
2
votes
2answers
38 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
31 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
24 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
88 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". ...
2
votes
1answer
25 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
72 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
33 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....
0
votes
0answers
17 views

CARTO Mobile SDK.UWP (C#) — How can I Get Map Center?

I m using the Carto Map Mobile SDK (UWP) to implement the customized carto map on a UWP app. Here is my code: //Eventlistener: Map is being moved or zoomed. public override async void ...
5
votes
2answers
87 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
65 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
70 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
31 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
19 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
70 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
20 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
26 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
20 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
21 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
56 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
24 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
47 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
87 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
40 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
26 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
36 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
57 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
43 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
39 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
160 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
118 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
78 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 ...
1
vote
1answer
28 views

Hiding or disabling Database Connections in Catalog window using ArcObjects?

I am working on a project that I must limit some functionality of ArcMap based on user permissions. Is there any way to do that ? for example I want to disable the Database Connections in Catalog ...
0
votes
1answer
555 views

GMAP.net markers are not shown in the correct position

I have to show on a gmap control in c # more markers to make use of the code below. The strange thing is that if I display only one marker is displayed correctly, while if I have more than one marker ...
0
votes
0answers
116 views

Create read MapInfo using C#

I've Mapinfo .tab files (including .dat .id .map) I'd like to read the attributes of the files then may store in a DB or write to a csv (not yet decided). As far as I can tell, using MapInfo Pro ...
0
votes
1answer
53 views

Fetching query from query layer using ArcObjects and C#?

As shown in the image below, I need to fetch query mentioned within query section of a layer using ArcObjects in C#. IDocument doc = ArcMap.Application.Document; IMxDocument ...
2
votes
2answers
37 views

Specify units when buffering arcobjects geometries

I have a point geometry that I'm trying to create geodesic buffers on. The input geometries are in a geographic coordinate system and I would like to specify linear units to buffer on. However I ...
0
votes
1answer
45 views

Add-In button Click open ArcCatalog window with list of .sde files

I want code to open ArcCatalog window with list of .sde files.The below code always opens an ArcCatalog window with home location. I have to go to database connections from the window which finally ...
1
vote
0answers
36 views

Setting ID in query as IQueryDescriptions OIDFields throwing error?

I have a layer and the query for layer is a select query consisting of ID field in it. This query is being executed on top of Oracle and its throwing an exception for field "ID" when "ID" field is ...
0
votes
0answers
59 views

Attribute Table is empty

I am trying to point all layers in MXD files to a different database server. Databse server is Oracle type. Most of the layers consist of views. After changing the datasource programatically for all ...
1
vote
0answers
31 views

Adding to group layers in loop is slow in ArcGIS Engine?

I am using ArcGIS Engine 10.5.1. I wanted to ask and see if anyone else has encountered this and or found a work around. I have a loop in c# where I am taking a large set of layer files and adding ...
1
vote
0answers
22 views

Error messages are not getting logged. I have created an Add-In button. I am using log4Net library for logging.

When i run Add-In button project on my machine, logging is being done successfully but as soon as i take the Add-In button and install it into different machine , no logging of messages occurs. Is it ...
0
votes
1answer
46 views

How to select features that are outside the boundary of a polygon

I have a polygon that there are some partitions inside its boundary and some partitions outside its boundary. My question is how to select the partitions that are outside the boundary of the polygon? ...
2
votes
0answers
59 views

Use PyQGIS With IronPython : No module named qgis.core

I need to create a Qgis python script called by IronPython for application purpose. I've already read Using PyQGIS in standalone scripts & Running application of Qgis Cookbook (https://docs.qgis....
1
vote
1answer
317 views

Convert WGS84 to ED50 (non-UTM)

I'm trying to convert between WSG84 and ED50 (non-UTM) using C# and DotSpatial.Projections: using DotSpatial.Projections; using System; using System.Linq; namespace ConvertWGS84ToEd50 { class ...
0
votes
1answer
93 views

How to find major and minor axis of a polygon for polygon subdivision

I want to divide a polygon into smaller polygons. For this purpose my procedure was to first convert the polygon into minimum bounding geometry and divide it into smaller polygons using major and ...