C# is a .NET programming language.

learn more… | top users | synonyms

0
votes
0answers
14 views

run shp2pgsql command in c# application

I worked for a month on this command but in vain ; really if someone already tried to help me find the error , because when I load the application displays the message to me as the shapefile was ...
1
vote
1answer
8 views

How to create a script using wgrib2 command

I have several model data with the following format postwrf_d01_YYYYMMDD_INIT_f00000.gr2 where INIT = 0000, 0600, 1200, 1800, each consisting of up to several hours of forecast (f00000 to let's say ...
2
votes
1answer
422 views

Can I update the service on ArcGIS for Server programmatically?

There is Windows Service. This service adds user raster data to the Raster Dataset in sde database. The Raster Dataset registred on the ArcGis Server. This Raster Dataset also was publishing on ...
2
votes
1answer
402 views

how to transform DB stored EPSG data to Geography data type in sql server

I have a 3 GB database in SQL Server, with certain points stored in float values. The points are stored in EPSG 3765. I would prefer to have them saved in the Geography datatype. I can not store them ...
1
vote
0answers
37 views

I want to cut polygons in a polygon layer.

I want to programmatically cut polygons already loaded in arcmap. For instance if originally I have 1 polygon feature and 1 row in attribute table. When I cut them, I should see 2 independent features ...
2
votes
1answer
33 views

ArcObjects 10.0 Add-Ins

I'm using 10.0 because that's what our customer that I'm attempting to build a custom add-in for is using. I am following the "Walkthrough: Building custom UI elements using add-ins" from the ...
1
vote
0answers
23 views

ArcObjects Custom Tool for a VB App

We have an old VB6 app that uses the map, toolbar and toc controls. On the toolbar, we've added the custom menu so users can add other built-in tools or tools they've created. One of our customers ...
1
vote
0answers
12 views

500 error when uploading shape file to Geoserver with C#

I receive a 500 internal server error when attempting to PUT a shape file using REST. I can manually import the file, publish and preview it. So the file is fine. Geoserver log: 2016-05-24 ...
4
votes
2answers
193 views

Lat/Long -> UK Easting/Northing?

I have a fairly accurate formula (implemented in C#), which allows me to convert UK Eastings/Northings to WGS84 Latitudes and Longitudes. Despite extensive Google searches, I could not find a formula ...
2
votes
1answer
228 views

Segment matching on a polyline

I have about 1000+ running routes which I can load into memory as polylines using latitude and longitude data captured from a running watch. From these polylines I would like to be able to identify ...
2
votes
0answers
27 views

Use SharpMap with WebGL Earth

I'm trying to display a layer on top of a WebGL Earth view inside an Asp.Net 5, MVC 6 website. I have no problem to do this in a desktop application, but I am totally unable to do it on the website. ...
0
votes
1answer
286 views

Converting CAD to map tiles

My team is working on an application that has a map feature, and we want to extend this feature greatly. Among other things, we want the user to be able to load a CAD drawing, and place it on the map. ...
2
votes
0answers
22 views

Get Z value from point in LAS Dataset using ArcObjects

Using ArcObjects (C#) I am trying to build a tool that will extract the Z value from a point in a LAS Dataset when the user clicks on it (then use that value elsewhere). My intention was to use the ...
15
votes
1answer
735 views

Understanding why ArcPy Cost Path Analysis tool faster than ArcObjects? [closed]

Although I use python to create geoprocessing scripts/services, I was under the impression that using ArcObjects to do the equivalent operation(s) will have better performance. I've posted ArcGIS ...
2
votes
2answers
412 views

Create FeatureClass in Personal Geodatabase and store data

I have to create a new featureClass in my existing personal GeoDatabase. And save some polylines into this featureClass. How can i do it? I need c# code to do this. Edit: I have a problem during ...
1
vote
0answers
18 views

GDAL compilation to .NET (C#) use

I want compile GDAL library for use in C# program. I use Microsoft Visual Studio 2013. First, I compiled GDAL C++. As a result I have DLLs and libraries (No problems) . Next, I tried to compile with ...
2
votes
0answers
33 views

Is it possible to create an ArcGIS library?

Can I create my own ArcGIS library that contains commonly used features inside my own functions/methods? I would like to make a dll that can be reference in my projects for using common features such ...
2
votes
1answer
24 views

The type 'ESRI.ArcGIS.Display.RgbColorClass' has no constructors defined

Trying to create a simple line symbol. But getting an error: "The type 'ESRI.ArcGIS.Display.RgbColorClass' has no constructors defined" public override void OnClick() { IDocument pdoc = ...
0
votes
1answer
469 views

Getting map using C# code in ArcMap?

I have been programming in C# a small code for:1) create a polyline Featureclass in a GDB, 2)put that in the map view (ArcMap 10.2) and finally 3) edit that feature using a button or tool... Well I ...
0
votes
1answer
406 views

Drawing a line and getting the length of the line C#?

I am trying to get the length of a drawn line to a textbox but its throwing an NullReferenceException at var length = f.ToShape().ToGeometry().Length;. what else should i use in the code to finish ...
4
votes
2answers
489 views

Read DGN file in java or c#

I'm looking solution to read DGN file in java or c# without any success. Gdal makes many problem and doesn't support all element eg. complex element. Does anyone know of a library that supports the ...
1
vote
1answer
15 views

Error in opening shapefile located on network

I have been able to successfully open a shapefile using Gdal when it is situated on my local machine. However, when I put the file on another machine on the network and try to open it, it fails. ...
2
votes
2answers
40 views

Diagram Ring Elements Locator (Tough Problem)

I asked http://stackoverflow.com/questions/35579843/get-only-ring-nodes-from-a-diagram on stack overflow but there was no help at all. So I hope I get help from someone on here :) I have a diagram ...
2
votes
1answer
53 views

Determine if Point is in feature class attribute table

I'm working with ArcObjects, C# and ArcMap. I have an attribute table that has several rows of data including a "shape" field that holds a point geometry. I also have a random point. How can I iterate ...
1
vote
2answers
43 views

Changing layout background from red to blue through button add-in with C# and ArcObjects?

I am working on Arc Objects using C# and I have to make a button add in, such that if I click button one time then layout background color changes to red and then if I click again then button add in ...
4
votes
1answer
277 views

Call ArcGIS Server Buffer command without using SOM

All, I wanted to see what the best way was of calling the geometry service to carry out a Buffer operation on ArcGIS Server 10, without using the SOM. Ideally I want to consume the REST API, using a ...
3
votes
3answers
123 views

How to get WKT for various Spatial Reference Systems?

I need to provide WKTs of spatial reference systems in the APIs provided by GDAL/OGR. Is there some specific place where I can look for WKTs of the spatial reference systems that I'm working with? Or ...
1
vote
2answers
170 views

C# / .NET library for converting GeoJson to KML

I'm pulling in data from ArcGIS using ArcGIS.PCL which provides the geometries as GeoJson. I'd like to convert this GeoJson to KML. Does anyone know of any .NET libraries that provides this ...
7
votes
1answer
575 views

GDAL.RasterizeLayer not ported to the C# bindings?

I am trying to use the OSGeo.GDAL.Gdal.RasterizeLayer(…) from GDAL 1.9.2 and it requires some SWIGTYPE parameters: OSGeo.GDAL.Gdal.RasterizeLayer( OSGeo.GDAL.Dataset dataset, int bands, ...
2
votes
3answers
170 views

Releasing features from a recycling feature cursor

I have a recycling feature cursor that is used to fetch a single row. Is it my responsibility to release that returned feature, or will it be cleaned up by the cursor as it would be if I consumed the ...
1
vote
1answer
52 views

Resampling a raster file with GDAL C#

Is it possible to resample the raster by using GDAL C# binaries, in a way that every other cell in a row and column is removed? Basically a replication of this GDAL command: gdal_translate -outsize ...
-3
votes
1answer
463 views

Sending Shapefile to SQL Server 2012?

How can I send a shapefile to an SQL Server table? I have searched and found a tool called ShapetoSQL but I am developing a c# Windows application so I am looking for an Open Source solution.
2
votes
0answers
312 views

Draw Polygons by Longitude/Latitude [closed]

I am getting sql spatial results from my database query that consists of long/lat of polygons. I am using these results in my c# windows form application. Now the problem I am facing is that how ...
1
vote
0answers
32 views

How to use offline MbTiles with Telerik's WPF map control?

Telerik's UI for WPF includes a map control: UI for WPF - RadMap. There's some discussion of how to configure it to use a local mapping service: Implement custom map provider, but it seems to be ...
1
vote
1answer
41 views

How do I select objects I click on in ArcGIS (.Net)

I have a MapView in my xaml code, which contains several GraphicsLayer. The first layer is the actual map, and the second is small SimpleMarkerSymbol representing locations. What do I do to be able ...
4
votes
4answers
10k views

Insert Geography data into SQL Server 2008

Can someone guide me to or give me an example on how would one go about insert/query Geography data in Sql Server 2008 ( Polygon with 4 points and Point in specific) using C# EF or Linq2Sql. I've ...
1
vote
3answers
2k views

Coordinate transformation/reprojection using DotSpatial

need some help. The following piece og code worked with an older version of DotSpatial. public static Geometry Project_EPSG25832_To_EPSG3857(byte[] wkb, int SRID) { ...
0
votes
0answers
10 views

C# selecting map tiles from user defined rectangle points?

I have a WPF user control with which the user can draw a rectangle on the map canvas to define an area for downloading background imagery tiles from a web service. The tiles are in Lat long 1x1 ...
3
votes
0answers
40 views

GDAL c# API returned different WKT from gdalinfo

I've found completely different results in WKT strings while using gdalinfo utility and method from c# API GetProjectionRef(). In the first case the result was: PROJCS["WGS 84 / Pseudo-Mercator", ...
1
vote
1answer
51 views

ExportToPDF creates blank PDF

I have a MapDocument that I am trying to export to PDF. I am using this example. However, it always says it is finished but when I open the pdf file there is nothing in it. I have tried exporting to a ...
1
vote
1answer
17 views

ArcGIS AddAsync .NET API Not working

I'm creating a web service that will be passed a list of objects that include the Lat/Long coordinates and some other data such as Speed. When I use the ArcGISRuntime library to add the features to ...
3
votes
0answers
31 views

ArcGIS Server Object Extensions: how do I deploy extra .dll's?

I am developing an ArcGIS Server Object Extensions in C# that makes calls into a C++ .dll. How do I add this .dll to deployment? By that I mean that I want it included in the .soe.
5
votes
1answer
456 views

Passing WorkspaceName to another thread for opening?

My winforms app gets an IWorkspaceName from an IDatasetName via the GxObject selected in a GxDialog. I want to pass it across to a worker thread for opening. I know how to write multithreaded ...
0
votes
0answers
11 views

ILayerFile.Open - The maximum record length has been exceeded

I have been able to use ILayerFile layerFile = new LayerFileClass(); layerFile.Open(layerFilePath); with out any problems until it just started giving me an error. Error: -2147220646 ...
3
votes
1answer
330 views

OGIS Ole Db provider sample with read/write capability

I'm trying to determine what level of effort would be required to develop an OGIS Ole db provider for ArcGIS. There is a sample that is read-only. I would like to be able to edit featureclasses in ...
0
votes
0answers
88 views

Drawing route on google map using gps device and calculating actual distance?

I Want to draw route on google map with the help of gps device and calculate the actual distance. Can anybody help with this? public GoogleAPIModel GetDistance(string origin, string destination) ...
2
votes
1answer
46 views

C# Arcobjects 10.3: Change the source version on a layer file

I'm using arcobjects (C#) to load my layers to the table of contents, and I need to update the data source to change the version. The layer file is set to the correct source at the DEFAULT version. ...
0
votes
1answer
397 views

Intersection failing because of vertices of polygons

I've written some code to intersect features of one layer with another's, but one layer has polygons (the squares in the image) and the other has circles (not filled). The problem is that I'm using ...
1
vote
1answer
259 views

Getting names of currently visible rasters from catalog?

I have a simple win form app with a map control on it. The map has a layer (MADtedLayer) that was initialized from a catalog in a personal database (Access). The files displayed are DTED. I need to ...
0
votes
1answer
25 views

ArcGIS Identity Tool Output Fields

I am using the Identity tool which takes 3 parameters: in_features, identity_features, and out_features. Does the output FeatureClass need to have fields that are a combination of the fields in ...