C# is a .NET programming language.

learn more… | top users | synonyms

-2
votes
1answer
52 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.
0
votes
2answers
123 views

How to Create shapefile using Geometry field

I am working on ArcObject. I want to create shape file using arcObject. I am very close to it. but need some better alternative as i feel my solution may fall short in time when there are lakhs of ...
3
votes
0answers
26 views

Temporary File GDB-based scratch workspace is not deleted after it is released

I have created a temporary File GDB-based scratch workspace as follows: var factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.FileGDBScratchWorkspaceFactory"); var factory = ...
0
votes
1answer
23 views

How to set max map scale for a layer?

How can I set the maximum scale for a layer? Sometimes the layer is not visible (it disappear), when the map scale is >= 1:250000. I'd like to set it on max 1:125000. This code does not work: ...
0
votes
2answers
109 views

Reading file geodatabases without using ArcObjects or any other licenses

I am interested in writing C# class libraries that can read/modify file geodatabases. The issue I have with the File Geodatabase API from ESRI is that this is for commercial use, and I don't want to ...
1
vote
1answer
15 views

How to zoom to a specific point?

How is it possible to make the map zoom to a specific point like an address that the user wants to find? Codebehind: private void btnSearch_Click(object sender, RoutedEventArgs e){ var queryTask ...
1
vote
0answers
9 views

Utility Network Analyst

I want to write C# code for utility network analyst (downstream trace task). My code is: IUtilityNetworkAnalysisExt m_utilNetExt = new UtilityNetworkAnalysisExtClass(); ITraceFlowSolverGEN tfs = ...
1
vote
1answer
30 views

Problem with Converting XY Coordinates to LatLon

Here is the function that I use to convert from pixel x,y to lat,lon coordinate: public static Coordinate imageToWorld(Dataset gds, int x, int y) { double[] adfGeoTransform = new ...
0
votes
0answers
25 views

Shapefile to Rectangle Overlay/Intersect Test?

I have a shapefile and a repository of images that have corner Lat/Long points. I want to search that images who overlaps/intersects to shapefile. Here is the scenario that I am doing, creating a ...
2
votes
2answers
151 views

display GeoReferencing image through MapServer

I have a tiff image and got the world file which contains the needed information for GeoReferenceing, how to start add this image on Mapserver ? if I use C# and use GMAP API to call the google server ...
-2
votes
1answer
41 views

Tutorial for c# and ArcObjects?

I am new to the ArcGIS. Can any one please refer a beginners tutorial for this tool. Referred the help, but couldn't able to get the basics to kick start.
3
votes
2answers
37 views

Selecting features by location based on selected feature using ArcObjects?

I am very new to ArcGIS and ArcObjects. I am writing a code for a button that will detect a selected feature and then select other features based on the feature that I had selected please take a look ...
0
votes
1answer
91 views

How to update/delete data from a datagridview?

I wanna be able to update/delete data from a datagridview, and when I do that of course the data in my PostgreSQL database should be edited too. So I've thought about giving the user the ability to ...
1
vote
0answers
9 views

How to open an output set that is a list of double values in a geoprocessing service

we are trying to reduce the amount of data we are returning from the server by eliminating returning a polyline and instead returning a collection of values of type GPDouble. When the transaction is ...
2
votes
1answer
223 views

IBufferConstruction create buffer with different geometry types (C# ArcObjects)

I am using the following method in C# public void ConstructBuffers ( IEnumGeometry pInputGeometries, double distance, IGeometry CollectionpOutputBuffers); to create buffers. In the ...
6
votes
1answer
393 views

Display Feedback “Stutters” When Moving Features

I have a custom tool for moving features that implements IDisplayFeedback and geometry-specific CoClasses to show the user where they are moving the feature. IMovePolygonFeedback polygonFeedback; ...
1
vote
1answer
31 views

A library to edit geometry in C#

For my windows application, I am looking for a method to edit vertexes and geometry of features that are stored in a SQL Server database. I just want a simple function for dividing polygons into 3 ...
1
vote
0answers
31 views

Converting MDB File With Unicode Characters

I'm using C# wrapper of GDAL and I'm having a problem converting MDB file that contains unicode characters. Lets take for example conversion to KML file, non-English characters are replaced by '?' ...
0
votes
2answers
922 views

How to use Sharpmap to display spatial data from MS SQL Server 2008

Can anyone show me a step by step example on how to use Sharpmap to display MS SQL server spatial data using C# as the programming language? Please note I have exploit some of the example online but ...
1
vote
1answer
33 views

How to add an IFeature to the Map and zoom to it ?

I have an ITable i cast it to an IFeatureLayerDefinition after casting it to an ILayer then to an IFeatureLayer, then i used my IFeatureLayerDefinition to get only one IFeature using the ...
1
vote
1answer
20 views

Placing a cost raster in Arcmap Table of Contents in 10.2.2

We have a set of routines that have been used for writing rasters to the ArcMap table of contents from our tools. The code that always worked is this: /// <summary> /// Used for ...
0
votes
3answers
38 views

Adding Field To feature class using ArcObjects and C#?

I want to add a new field to my featureclass.My code for that is: public IMxDocument mxDoc; public IMap map; IFieldEdit2 field = new FieldClass() as IFieldEdit2; ...
0
votes
1answer
125 views

Is snapping working when changing from NAD83(decimal degree) to NAD83 Zone UTM 11N(meters)?

I've used the following ESRI snippet to Convert the display extents in Pixels (at the current map scale) and then return out the map units. public System.Double ...
2
votes
1answer
92 views

Accessing File Geodatabase to convert to shapefiles using ArcObjects?

The end result of what I'm trying to do is convert a FGDB into a folder of shapefiles. To do this, I need access to all the data I'd expect to see in a shapefile. Once I get all the information I need ...
0
votes
0answers
16 views

unique value rendering in C# code behind

I have the following code in my xml file where i specify the uniquevalue rendering as shown below: ` <FeatureLayerExtension> <WhereString> (ZONE ='A)' or (ZONE ='V') ...
4
votes
2answers
170 views

get map tiles for a polygon

Based on this tutorial, I can easily find out a tile for a point. But is there an algorithm to find all tiles that are covered by a rectangle or lineString or by any other feature? I would greatly ...
5
votes
1answer
344 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, ...
0
votes
1answer
303 views

Geoserver with Openlayer map showing problem

I have a Geoserver runnning at 8888 port and url is http://localhost:8888/geoserver. I can browse any layer created by my custom data. ...
1
vote
2answers
35 views

Is there any efficient way to create a raster with pixel value representing a unique id calculated based on pixel lat/lon?

I have 10m raster for each state in US. Current pixel value represents something. I want to have 'same' raster but pixel size representing a unique id calculated based on pixel lat and lon. I am ...
0
votes
1answer
101 views

Get points along a polyline at defined distance c#

I need to store into my array the points along the polyline at each defined distance. Example: The Polyline length is 50m, I set the interval to 5m. I have to store in the array all the points along ...
0
votes
2answers
183 views

How to add a Data Frame to mxd in a c# stand-alone application?

I am writing a stand-alone application in c# (using vs2010). I have ArcGis Desktop license. I only need to insert a new data frame in an mxd file and save this mxd. So: I create MxDocument coclass. ...
4
votes
1answer
178 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 ...
1
vote
1answer
25 views

C#/.Net Library that can draw a line across the date line

I want to be have an embedded map in my application that can handle drawing lines across the date line. I have tried out dotspatial and sharpmap and neither have been able to handle this. Edit: Here ...
4
votes
1answer
451 views

Can custom map tiles be properly rendered via ArcObjects within my ArcGIS 10.1 Desktop AddIn?

Within ArcObjects for ArcGIS 10.1, we are attempting to render pre-generated map tiles as a basemap (group) layer. The tiles themselves are of the typical web mercator aux. spherical tiling scheme. ...
0
votes
0answers
126 views

Do any geodatabase schema and data migration libraries for .NET exist?

I'm performing code refactoring and database normalization in my project and looking for any .NET library for geodatabase schema and data migrations. Does any solution exist for ArcObjects? During ...
0
votes
0answers
40 views

C# geometry hex decoder

When i am storing in the database things like: Point(90 90). I get back 010100000000000000008056400000000000805640 which is a hex encoding of the geometric type. Does anyone know a library for c# ...
3
votes
1answer
22 views

extract vertices from dbgeometry value

Who knows the elegant way to extract coordinates of polygon vertices from well known text representation of DbGeometry value? Here's my polygon for example: {POLYGON ((52.808019 -1.345367, ...
1
vote
0answers
29 views

ZoomTo is not working

I have a graphics layer. When the user selects an address from our software I want the map to ZoomTo that address. This works, but the user has to have an interaction for the map first. I thought this ...
2
votes
1answer
69 views

Is there any way to fast read pixel value using gdal in C#

I create with C# a series of lat/lon value pair in the code(using i, j loop) and I want to extract the pixel value based on either lat/lon pair or pixel location (i, j). I know there is one gdal ...
0
votes
1answer
283 views

ArcGIS 10 IGPFunction2 and IGPFunctionFactory Implementation

I'm creating a custom ArcToolbox tool in C# .NET in ArcGIS 10 SP2. Though I seem to be having two issues which maybe related: Firstly, my tool is run as a background task i.e. the GP dialog does not ...
3
votes
1answer
148 views

Importing shapefile to file geodatabase feature dataset using ArcObjects and C#?

I'm trying to import a shapefile into a featuredataset under a geodatabase using FeatureDataConverter.ConvertFeatureClass. All the examples that I found are not concerning the import under an existing ...
0
votes
1answer
183 views

How to add features to geometry collection using .ShapeCopy

I'm having an issue with trying to complete the loop of adding the selected geometry to my geometry collection. The goal is finding streets that intersect the given streetname (then locating the ...
0
votes
2answers
87 views

Reading a raster map cells values in C#?

Suppose I have a raster map file (TIFF, TGA, JNG... etc) loaded with geo-info manifested by the cells values. I need to read the values of the raster map cells "programatically" in a C# program. P.S: ...
2
votes
1answer
28 views

Access CommandItems programmatically with ArcObjects in ArcGIS Engine application

I'd like to programmatically execute a command in my ArcGIS Engine application with ArcObjects. I know in Desktop I would do it like this: ESRI.ArcGIS.Framework.ICommandBars commandBars = ...
0
votes
0answers
36 views

How connect C# to Postgresql in host j.layershift.co.uk

I have installed postgresql database in http://postgres-project-1241043.j.layershift.co.uk/ host. I want to connect to the database using C#. I use Npgsql with following connection string. ...
2
votes
0answers
75 views

Editing Feature Class using ArcObjects

I have a problem with editing feature class using arc Objects.Indeed I am working on it for a while and cant find any solution into doing it..I asked a question before about how to connect to database ...
2
votes
1answer
106 views

How to close the current mxd document through arcmap add-in

First, I open a mxd document named A in arcmap, then i use my add-in to generate another mxd document named B, then I use ArcMap.Application.OpenDocument(arcmapMapFileName); to open the ...
2
votes
1answer
1k views

IFeatureWorkspace.CreateFeatureClass() error

I am trying to read a csv file straight into a set of new feature classes within a new file geodatabase, but I am getting the following stack trace when it fails: Attempted to read or write ...
2
votes
1answer
94 views

Image classification using google satellite images

Currently our expert user classifies locations by viewing the Google earth satellite image of a location. They consider circular areas of a 5km radius at a set zoom level. They evaluate the image for ...
0
votes
2answers
125 views

Convert polyline to polygon Using ArcObjects

I have a polyline and I want to convert it to a single polygon feature,I used this code but I get error while I can convert the same shape file using feature to polygon on ArcGIS Where is my mistake? ...