C# is a .NET programming language.

learn more… | top users | synonyms

2
votes
1answer
94 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 ...
1
vote
1answer
38 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 ...
6
votes
1answer
387 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; ...
0
votes
2answers
815 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 ...
0
votes
2answers
75 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? ...
2
votes
1answer
27 views

How do I use code (preferably c#) to clip all points within a shapefile that are not contained within a polygon?

So the task is simple: I want to take a point shapefile as input and remove all of the points that are not contained within a polygon. I'm using DotSpatial to do this, but the catch is that there are ...
0
votes
1answer
122 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 ...
0
votes
0answers
61 views

Converting VB code to C# for coverting Polyline to polygon

It is a while that I am stuck at converting polylines to polygon and I couldent find any solutions into it.I have tried some diffrent methods like using ...
0
votes
0answers
16 views

Offset WGS84 linestring based on pixel values

I would like to split up some roads based on their driving direction. For this, I need to offset the roads 2 pixels to the right, in the direction of the linestring. I have the coordinates in WGS84 ...
4
votes
1answer
175 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 ...
4
votes
1answer
415 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. ...
1
vote
1answer
40 views

How to get a Layer as ILayer (ArcObjects)

I had asked this question previously which I think will work. But as I am new to this, I can't figure out how to get a Layer as an ILayer object to pass to the method that's in my previous questions ...
0
votes
0answers
25 views

Georeferencing Tools in ArcGIS Engine 10.1

I'm new with ArcGIS or even GIS it self. My question might be a newbie question but I need help on building a Georeferencing tool set like the one in available ArcMap. I found that it is not available ...
2
votes
1answer
49 views

C# - Access content from ArcGIS Online

I have got an existing .NET C# desktop application which already reads various GIS formats. I would now like to add support to read data from ArcGIS Online. What options have I got to access ...
1
vote
1answer
47 views

Is Nearest not Near enough?

So we have factories, bridges, boat launches and stations that are on our map by latitude and longitude data fed to us from Homeland Security. In a good number of these situations an attack can come ...
0
votes
1answer
223 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. ...
2
votes
1answer
50 views

What are some GIS outlets for my open source MapBasic utility module and library?

I'm actively developing a MapBasic module that provides additional MBX programming functionality by wrapping .NET 4.0 and Win32 API calls in easy to use MapBasic functions and subs. MB_Utils acts as ...
0
votes
2answers
169 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. ...
5
votes
3answers
1k views

How to unproject WKT to WKT in .NET?

I have WKT in this format: GEOMETRYCOLLECTION(POLYGON((491990.250718 6212873.59755,491492.160493 6212904.94117,491265.64715 6212790.54445,491319.517251 6212550.36334,491579.624164 ...
1
vote
0answers
33 views

Performance issue with SQLite + Spatialite + C#

I am having a performance issue with SQLite database (.db) which extends to SPATIALITE I am trying to update Geometry of 1,00,000 records in database (.db) which taking around 50 minutes. Too much ...
0
votes
1answer
26 views

Trying to use Near to relocate points to the waterways

We are trying to relocate elements that are near the water but not quite on the water and relocation them to the nearest point. I'm trying to build the parameters to use the Near tool ...
0
votes
1answer
63 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
1answer
177 views

How to remove some features of a feature layer in the mobile cache

I have a Hand-Held (HH) device in which I have downloaded to the MobileCache a limited amount of Features from a FeatureLayer. Now I need to remove from the cache all features of a certain type. We ...
3
votes
2answers
601 views

Way to Ensure that the Image Centroid is Within Image Bounds

My application uses the ArcGIS Silverlight API to select polygons from a map layer. It uses the Geometry.Extent.GetCenter() method to get the centroid of the shape and add a thumbtack image at those ...
5
votes
1answer
327 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
1answer
124 views

Shp to featuredataset (GeoDB)

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
45 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 ...
0
votes
2answers
77 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 ...
0
votes
1answer
274 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 ...
2
votes
1answer
34 views

What is the correct way to pass a polygon to a geoprocessing service successfully

We have a geoprocessing service that has been in limbo for 6 months. Finally after a great decision to eliminate one element of the service, we got it working this week. I am now at the point where ...
1
vote
2answers
79 views

How to convert an IGeometryCollection into a Polyline

I am using the CostPathAsPolyline method which returns the Polyline as an IGeometryCollection. I now need to get this converted back into a polyline. But it seems to be more complex than just a ...
0
votes
0answers
22 views

Zoom to selected feature reducing MapFramesize using ArcGIS Engine and C#?

I am trying use the the following code for zooming to a selected feature using ArcEngine 10.2.1 and c#. It is performing, but it is reducing the Mapframe to the feature size. Which was not happening ...
0
votes
1answer
150 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
1answer
39 views

How do I debug a GP Service in ArcServer?

I have a geoprocessing service that was successfully published to our ArcServer instance. I'm using 10.1 which means we could not publish unless it actually worked run as a tool in ArcMap. But now ...
0
votes
0answers
14 views

How to tell “Publish Service Definition”-Task to publish into a folder?

I'm currently working on publishing a SD-File using C#. Through another Question (Is it possible to publish a map service from an SD File purely over REST (no arcpy)?) I had a look on the source code ...
1
vote
2answers
139 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
196 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 ...
1
vote
2answers
79 views

Ring to Polygon

I want to get an exterior ring from a polygon. I need to itopologicaloperator.intersect a line with the polygon (exterior ring) to read attributes from the line. I have the original Polygon I can get ...
12
votes
6answers
3k views

ArcObjects Resources

What are the best books/web sites for C# development with ArcObjects? The ArcGIS Resource Center is very helpful, but I am trying to find sources with more examples. Thanks
0
votes
1answer
475 views

Coordinate conversion - Lat Long to State Plane, ArcServer-Silverlight

I am trying to project a Lat/Long value I get from a table to a x/y value that I can use to plot a graphic. I have seen one way to do this may be to use something like this: feature.Geometry = ...
0
votes
1answer
29 views

Query WMS GetFeatureInfo with known latitude and longitude

My issue is that normally, when you want to query a WMS layer, you need to pass width & height of a map, and x,y (in pixels) which describe a point on the map where user clicked. I want to do ...
5
votes
2answers
3k views

No constructor defined?

In my C# Console Application, Visual Studio 2010 highlights new FeatureClassNameClass() in my below line of code and states "ESRI.ArcGIS.Geodatabase.FeatureClassNameClass has No constructors defined" ...
3
votes
2answers
332 views

How to add point to a polyline?

I have a polyline, and i want to add point (vertex) on a specific distance, like two meters for example. How can i do that?
1
vote
2answers
62 views

Add to geoprocessing environments when creating ArcGIS .net Add-in

I would like to add a new environment to the Geoprocessor Environments from an ArcMap.net Add in. I try adding the env to the GPEnvironmentManager with the following code but when ArcMap opens and I ...
0
votes
0answers
30 views

Convert from gps coordinates to EPSG:32640

I need to convert latitude and longitude witch i get from gps to EPSG:32640 (in C#). What is best and fastest method for that? Thanx
0
votes
1answer
13 views

How can one get the value of the point where the AxMapControl is centered at?

I am using the AxMapControl to display a map and I want to record a point where I am and want to be able to return to the same point later on using the CenterAt() method.
0
votes
1answer
264 views

Using the ArcGIS Runtime SDK for C# is there a method to Hit Test for a polygon on the graphics layer?

I am very new to using ArcGIS runtime SDK for C#. I have loaded a polygon from a shapefile. I wish to query if a lat/long point is inside or outside the polygon? How can I do this? Thanks in ...
0
votes
0answers
19 views

Its possible to use a c# webmethod with a openLayers.Protocol.HTTP?

Hi Im trying to use c# as a backend of a layer: var layerVehicles = new OpenLayers.Layer.Vector("Dispositivos", { strategies: [new OpenLayers.Strategy.Fixed(), new ...
0
votes
1answer
36 views

ITableWindow2 does not show all records

I have to develop an extension in C# for ArcMap 10.2 and I need to show information from a datatable in an a table window. I can show the table without problems, but I have a problem I can´t resolve. ...