C# is a .NET programming language.

learn more… | top users | synonyms

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
38 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
45 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
38 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
273 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
110 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
138 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 ...
-1
votes
0answers
14 views

Connecting PostgreSQL to Map Guide? [closed]

How to connect PostgreSQL to Map Guide? Please explain it step by Step
7
votes
1answer
570 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, ...
-3
votes
0answers
31 views

how to write first program in QGIS [closed]

I installed QGIS but I cant understand how to write and execute a simple hello world program. I am C# programmer and very beginner in QGIS.
2
votes
3answers
161 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
41 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
450 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
302 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
15 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
37 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
9k 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 ...
2
votes
1answer
207 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 ...
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
6 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
37 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", ...
2
votes
1answer
413 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 ...
1
vote
1answer
42 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
14 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
30 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
455 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
9 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
318 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
51 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
37 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
258 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 ...
4
votes
1answer
469 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 ...
0
votes
1answer
21 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
44 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 ...
0
votes
0answers
17 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
0answers
14 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 ...
0
votes
1answer
257 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
2answers
379 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
2answers
141 views

Getting all field names from feature class of file geoatabase using C#?

I want to get all fieldnames of feature class and then read data in each field. I have used table.fieldDef, table.fieldinformation but i am unable to get fieldnames if featureclass. My code which i ...
0
votes
1answer
379 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 ...
0
votes
1answer
3k views

offline map tiles in standalone desktop app

Which mapping API can be used (either in a C# desktop app or as a standalone mapping app) that accesses an offline tile collection and requires only a minimal amount of additional servers / other ...
0
votes
1answer
35 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
22 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
26 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 ...
7
votes
1answer
193 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
20 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 = ...
1
vote
1answer
887 views

Displaying scale on ArcGIS Engine map?

I embedded ArcGIS Engine into a c#/wpf application and use it to display a map. Now for print my client needs to display the scale of the map like it is used on street maps (the small bar which shows ...
0
votes
1answer
82 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
1answer
1k views

Safely replacing ArcSDE feature classes using transactions in ArcObjects?

I am using C#, ArcGIS Server 10, MS-SQL Server 2008, and I want to replace an ArcGIS SDE feature class inside of a transaction. After the deletion of the feature class, I have to create a new one with ...