C# is a .NET programming language.

learn more… | top users | synonyms

1
vote
0answers
5 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 ...
1
vote
0answers
33 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 ...
1
vote
0answers
22 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 ...
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
11 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
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. ...
2
votes
0answers
21 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 ...
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 = ...
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. ...
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
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 ...
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
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 ...
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 ...
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
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 ...
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
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 ...
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 ...
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
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 ...
0
votes
1answer
56 views

How to iterate through each vertex in a line?

I am working with ArcObjects in building functionality for a toolbar inside of ArcMap. Once I start an edit session, I use the tools to manually draw a line. I am trying to loop through this line get ...
1
vote
0answers
21 views

Asp.net or MsSql Create bbox of a point proportional to image height and width

Short question is how do I create bbox dimensions that is proportional to image height and width? I'm working on a asp.net webservice to generate a map using geoserver. The parameters I have are ...
0
votes
1answer
41 views

How can I delete an ITable?

I have created an ITable but I need to be able to delete it if it already exists. How can I delete an ITable? This is the code that I have so far which checks for an existing ITable. public static ...
0
votes
1answer
24 views

How can I convert a DataTable to a GeoDatabaseTable

I have a DataTable full of "stops" and I want to convert it into a table that can be GeoCoded. However, I am getting an error when I try to execute it. The Message: Error HRESULT E_FAIL has been ...
1
vote
1answer
27 views

Get the fill stipple of a predefined PictureFillSymbol in ArcMap

In ArcMap in symbol-dialog you can choose a predefined symbol for your polygon-features, i.e. agricultural area. This is a 1 bit picture with foreground- and background color. I grab this symbol as ...
0
votes
0answers
30 views

Does intersect result in non-simple geometry?

I have some features retrieved from SDE where I perform an Intersect on. Both feature-classes from which the features come from are polygon-featureclasses. IFeatureCursor cur = ...
0
votes
1answer
99 views

run command line shp2pgsql in c# function?

i'm developing an application web with asp.net/c# and i would in a button importing the shapefiles into postgis, and i'm trying with this code, this code i'm using it in cmd.exe in windows it imported ...
0
votes
0answers
50 views

Read 3D polygon from Oracle SDO_GEOMETRY and convert to triangles

History I have written a c# service that consumes a list of x,y,z points from a csv file. These points form a valid 3D polygon which I am able to verify using ...
2
votes
1answer
52 views

How to symbolize multiple layers with different EMF's in ArcObjects C#

I'm trying to symbolize multiple layers with an emf logo. When debugging, it gets through the first layer then crashes. I'm thinking it might have something to do with the variable "emf1" not ...
1
vote
0answers
59 views

Generating C# classes for gml.xsd using MS Visual studio xsd tool

With Microsoft Visual Studio 2010 comes a tool called xsd which can automatically generate C# source code to easily deal with XML files corresponding to a given schema. I have a very complex XSD ...
1
vote
0answers
63 views

ArcObjects OnChangeFeature event not firing unless you move feature

I am displaying points, lines and polygons on ArcMap as features with an addin. I want my end users to be able to change features (move geometries, add vertex, delete vertex etc) and get the updated ...
7
votes
1answer
209 views

Convert longitude/latitude to pixels on the map

I have a map from here. I want to be able to simply convert arbitrary lon/lat pair to pixels on the map (also the ability to do reverse conversion). The maps come with .tfw file and projection info, ...
0
votes
0answers
22 views

hold some data at layer object

Is there in arcobjects the ability to store some data at the layer in table of content sth. like ILayer.Tag or an Interface which I can misuse for this?
2
votes
1answer
44 views

Create Feature Class from another Feature Class

I have a Feature Class and I want to create another Feature Class that is basically a subset of the first Feature Class. For example, I have a Feature Class containing public parks which I want to use ...
0
votes
0answers
20 views

ORA-13356 How to remove redundant points from 3D Polygon

I've created a sdo_geometry column in an Oracle 11.2 database and I've managed to import a list of co-ordinates from a csv file with a c# service that creates a flat Polygon in 3D and inserts into the ...
1
vote
1answer
132 views

Spatial reference does not match data frame for Bing Maps

In ArcObjects I am loading Bing Maps as a base layer. It's coordinate system is esriSRProjCS3Type.esriSRProjCS_WGS1984WebMercatorMajorAuxSphere. On top of the base layer, I am trying to load points, ...
0
votes
0answers
12 views

Editor/EditTemplate: Creates empty feature and Delete's graphic after draw

ClassModels Contain Samples which represent our Feature. The user clicks add on a classmodel to add features (or samples to it). The editor loads the tool and the correct template but when the user ...
0
votes
0answers
37 views

ArcGIS Runtime SDK for .NET API method to convert shapefile to ArcGIS feature set?

Could anyone please let me know is there any ArcGIS Runtime SDK for .NET API method to convert a shapefile to ArcGIS feature set object?
1
vote
1answer
37 views

Arcmap Addin 10.3.1: Cancel/control loading of addins, based on a condition

I'm creating Add-in for arcmpa in C# , for 10.3.1. These add-in are to help with client workflows for the business needs. I need to be able to control whether an add-in can load or not. (control of ...
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
0answers
24 views

Mock geometry for spatial filtering

Does anyone know how to mock IGeometry (e.g. using NSubstitute)? I want to use it within an ISpatialFilter, however I always get an exception on the last line of the code beyond. COMException: The ...
0
votes
0answers
72 views

How to change Raster Layer drawing shape using DotSpatial

I am using DotSpatial and geostatisticaltool in a application. I want to change Raster Layer drawing type after kriging. Here the example. This is a kriging result. It creates new layer and draws ...
2
votes
0answers
63 views

Show a datagrid in a dockable window

I am trying to show a list as a datagrid full of strings in a dockable window. I can bind the list to the datagrid but I can't for the life of me get the datagrid to show in the dockable window. I ...
2
votes
1answer
44 views

Having trouble overwriting raster layers default property sheet

I need to Override the Property Sheet Dialog to display a custom property sheet that has a custom GUI built to analyse raster data based on transformed values. Alternatively, if I can access the ...