Tagged Questions

C# is a .NET programming language.

learn more… | top users | synonyms

0
votes
0answers
8 views

How to read Spatial Data File (.SDF) in C#

Using the Mapguide .NET C# API (with FDO API) i would like to reads sdf and creates a shapefile out of it. So basically take sdf as input source and create a shapefile out of. please suggest me ...
0
votes
0answers
7 views

Can't find assembly ref for Mapguide.schema.FeatureSource

Error in missing Asembly reference for using OSGeo.MapGuide.Schema.FeatureSource; // Build the feature source object model FeatureSourceType fsType = new FeatureSourceType();
0
votes
0answers
11 views

Create a shapefile from any FDO feature input

Using the Mapguide .NET C# API (with FDO API) i would like to create a class that reads from one data source and creates a shape file out of it. it will provide the feature ID, source and destination ...
0
votes
0answers
8 views

Can't save image to website images folder [on hold]

I've been able to save a bitmap image as a .jpg to a file system path but can't figure out how to save it to my website (MS VS Express 2013 for Web/c#) images folder: // Works ...
1
vote
3answers
78 views

ArcMap get coordinate system

How can I get current coordinate system type from opened file? I tried var coord = ESRI.ArcGIS.Geometry.esriSRProjCSType.... ???; Can you tell me, what should I do? UPD: I need to save current map ...
0
votes
0answers
22 views

What's the best way to break closed polyline using ArcObjects?

I have a polyline feature class with several closed lines (the start point = the end point). I need to break these lines in two features, using ArcObjects (doesn't matter Java, VB or C#). I have ...
0
votes
0answers
19 views

How to convert points shapefile with a designed attribute containing Z values to a 3D shapefile

I need to write C# program which would convert points shapefile with a designed attribute containing Z values to a 3D shapefile. Any suggestions how to do it?
0
votes
0answers
22 views

Cast, Convert Esri.ArcGIS.Geo.IRecordset TO system.Data.Dataset solutions?

I have a bunch of tools that are still running on Arcmap 9.2 drive and I am updating my tools so they can run on 10.1. I came across this problem in one of my functions, where I needed to cast an ...
3
votes
1answer
43 views

Setting Up Snapping Environment Snapping Type

I try to setup snapping environment snapping type by referring to this source (http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000001s1000000) but I can't combine ...
0
votes
0answers
24 views

Adding Field using C# winform and ArcObjects?

How to add a field in featureclass by using C# winform,arcobjects? It means when we click on command winform should open and afetr field entries it should be add in to table.
0
votes
1answer
28 views

Selecting a Graphic Element on button click using IGraphicContainerSelect

I am having trouble type casting and using the right interfaces. I have a function that loops through all text elements with a specific property set. Once a match is found, I want to be able to select ...
0
votes
1answer
22 views

HRESULT 0x80010202 exception in ArcMap closest feature searching by ArcObjects?

My method must return closest feature attribute. But there's a problem, it finds closest feature but returns COM exception HRESULT 0x80010202 void selectStreet(IPoint point, IActiveView activeView) ...
1
vote
1answer
29 views

Parallel Computing error using GP tool in C#

I have been using ArcGIS Geoprocessor(GP) tool whenever possible even though it is like a black box in my ArcObject development. Most of my operations are involved with data processing, such as ...
1
vote
1answer
30 views

error 0x80040239 : Using the intersect method of ItopologicalOperator

I would like to intersect a polygon and a polyline to know if the polyline is in the polygon. The code work but when i do it on more than 100 000 times in a for, there is this error : ...
4
votes
1answer
76 views

Getting feature at point in C#

I want to get the feature at where mouse was clicked in map. So I was wondering how to get features which intersects with that point. Plus I was wondering how can I check what type of object it is ...
0
votes
0answers
21 views

Finding What version a PGDB is programtically

So i have a list of 681 personal geodatabases. I want to figure out what version (9.x, 8.x, 10.x) these things are. So i want to write a program that will read the filepath from a database table and ...
1
vote
1answer
60 views

ArcMap tool for deleting polygon with C#

I need to create custom tool for ArcMap, which would let the user delete polygons by mouse clicks. I am pretty new in this thing, so how can I retrieve a selected polygon so I could delete it? Plus do ...
1
vote
0answers
76 views

Why ArcMap.Application.Document is null on run?

Why ArcMap.Application.Document is null on run? There is my addin. It consist of tool and docWindow. DocWindow opens when tool is selected. When I run ArcMap with selected myTool and opened window, ...
0
votes
1answer
55 views

How to query all layers in ArcMap and get access to them by name or index?

I have next issue: I have ArcMap with tons of layers. Some of these layers may contain another layers with data (aka Composite layers) or they don't. The depth of composite layers in unknown. I need ...
0
votes
0answers
43 views

Converting *.asc to *.shp without using ArcGIS for Desktop or QGIS?

I am trying to perform file conversion programmatically, using C#. I have read the ESRI Shapefile Technical Description (An ESRI White Paper—July 1998). I cannot calculate records for *.shp file ...
0
votes
0answers
27 views

Error Esri.FileGDB.FileGDBException Message=General function failure

Whats wrong? Code: Geodatabase geodatabase = Geodatabase.Open("C:/tmp/tmp.gdb"); Table table = geodatabase.CreateTable("StreetInfo", "C:/tmp/Table.xml"); xml: ...
0
votes
0answers
36 views

How to work with gdb from c#?

I have installed PostgreSql 9.3, PostGIS(last version) and Npgsql. I have geodatabase(tmp.gdb) how to make conection for this DB from c#? And how to connect this DB to PostgreSql? It possible to ...
0
votes
1answer
20 views

how to use IUniqueValueRenderer for empty geodatabase point file with ArcObjects

I have empty geodatabase file with point geometry created programatically. I have style file with several symbols. I basically want to add all these symbols to my shape file before creating ...
0
votes
1answer
49 views

Change layer properties

How can I edit name of lines of layer in ArcMap from Visual Studio C#? E.g., change STR_NAME = "Pushkin street" to STREET = "Pushkin street"?
1
vote
0answers
24 views

How to emulate OpenLayers button click in C#

I'm trying to call a click of a user using C # with the following code ( " C # : GeckoWebBrowser.Navigate ( javascript : void ( Document.getElementById ( ' idOfElement ' ) .click ( ) ) " ) ; ...
2
votes
1answer
31 views

Check if tool is selected in ArcMap

How to check, if ArcMap custom tool is active? I have MyCustomTool and docWindow. docWindow opens when MyCustomTool is created. When I close docWindow and select another tool (hand - for example), ...
1
vote
1answer
55 views

Using QGIS libraries to write standalone program in C#?

I have investigate some liberaries which can help me to write stand alone applications. Is there any way to use qgis liberaries in an standalone application which is written by C#?
1
vote
0answers
24 views

Checking Annotation overlap with other features using ArcObjects?

I want to check annotation features overlap with any other feature and also have to give other overlapped feature list....please tell any method for this? Now i am using buffer around selected ...
0
votes
1answer
53 views

Layer cannot be found

public Int32 GetIndexNumberFromLayerName(String layerName) { IMxDocument doc = ArcMap.Application.Document as IMxDocument; IActiveView activeView = doc.ActiveView; ...
3
votes
1answer
26 views

Call attribute window with ArcObjects C#

I want to programatically call AttributeWindow using C# ARCGIS SDK. UID uidDockWin = new UIDClass(); uidDockWin.Value = "esriEditor.CreateFeatureDockWin"; dockWindow = ...
0
votes
0answers
36 views

Using ListTransformations function in ArcObjects, C# and ArcGIS Engine?

I need to call arcpy.ListTransformations function in C#. I have to pass 2 spatial References (ISpatialReference objects, I guess) and an envelope(IEnvelope object) to this function. This function ...
0
votes
3answers
63 views

Arcmap Refresh Button

I am working with ArcMap and C#. In the bottom left hand corner, there is a menu where you can toggle between Data view and Layout View, a Pause button, and a refresh button. I have created an Add-in ...
1
vote
1answer
33 views

gdalwarp '-tps' equilvalent in C# wrapper?

I am attempting to do the following from code: gdal_translate.exe --config GDAL_DATA "D:\gdal\bin\gdal-data" -of GTiff -a_srs EPSG:4326 -gcp 0 0 -108.724530873811 40.1376029956585 ...
2
votes
2answers
53 views

ArcGIS Rest performing query on feature service layers using within and intercepts

I am creating an application that needs to query a bunch of layers over REST to see which layers a point or line is within. At the moment I have a local ArcGIS server set up with some feature ...
0
votes
0answers
41 views

Common custom toolbar for several different arcgis desktop addins using C#

Suppose, I have two arcgis desktop add ins C1Addin and C2Addin developed in c# with the following components: C1Addin: Button_1 C2Addin: Button_2 When the 1st addin which may be any of the two ...
3
votes
2answers
38 views

How to save .mxd programatically?

How do I save a .mxd programatically? The project is never saved and on button-click, I want to save the project. I use SaveFileDialog to get the filepath and then use the following: IMapDocument ...
3
votes
0answers
68 views

ArcObjects Memory Leak with IWorkspaceEdit?

I have ArcGIS 10.1 installed. I have created a function for copying all of the features from one shapefile to another using IFeatureBuffer, now every time the function when it is called, it takes ...
2
votes
1answer
57 views

Create a custom Identify dialog

How can I check if a point belongs to a polygon? I want to create a custom identify tool with edit option. I am using C# and ArcMap 10. My idea is to click on the polygon (building/park/etc) in ...
1
vote
1answer
33 views

How to use IWorkspaceName2

I'm trying to make a little utility to generate encrypted passwords for MSD files (change the XML inside the zip). I found this example online, but I'm not familiar with esri's API, so I'm not sure ...
2
votes
1answer
55 views

How to calculate which zip code is closer to which in USA using C#?

I'm not living in USA, and I'm doing a small project for a company based in USA. The point is that, there are businesses and each of them have their address and zip code. Then, I have a form where ...
3
votes
2answers
146 views

Convert Lat/Lon Pair to Cartesian

I'm lost on how to correctly and accurately translate Lat/Lon coordinates to XY coordinates to draw them using OpenGL. The coordinate information I have is the following: Start Lon, Start Lat, End ...
2
votes
0answers
65 views

Draw Polygons by Longitude/Latitude

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 can I ...
2
votes
1answer
68 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
0answers
43 views

how to create map package programatically using C#?

I'm using .NET SDK to create ArcMap toolbar with arcgis 10.1. how do i create map package .mpk programatically? http://resources.arcgis.com/en/help/main/10.1/index.html#//006600000403000000
0
votes
0answers
48 views

ComboBox Addin to populate Layers .NET C#

I am using Arcgis 10.1 and created following class derived from ComboBox. class LayersComboBox : ESRI.ArcGIS.Desktop.AddIns.ComboBox I want Combo box Add-in to populate added layers(in table of ...
2
votes
0answers
29 views

split polyline at specific distance

I am working on a project that uses sql server for geometry datatype and arcgis server and asp.net website and entity framework for data access and arcgis javascript api for map viewer. I want to ...
0
votes
0answers
17 views

Feature Graphic will not Delete

I am trying to do the simple task of removing a graphic from my feature layer that is stored on arcgis online. I am using basically the same process to add a graphic as I am to delete a graphic. ...
1
vote
0answers
43 views

Create Polygon with inner polygons from KML or Shapefiles?

I am creating a windows forms application and I want to create a polygon from a KML or Shapefile as a layer on top of a Google Satellite map. Today I am using GMap.NET that got an polygon object but ...
0
votes
0answers
76 views

How to convert multipolygons to a single polygon

I have converted a set of gps points to polygon and then using .makevalid() I saved them in sql server.But It converted them to multypolygons.Is there any way to fix this problem and convert them to ...
1
vote
0answers
69 views

Can't get ESRI.ArcGIS.ADF.Connection.Local to work for 10.2.1

Not sure what I'm missing. I'm trying to use the ESRI.ArcGIS.ADF.ComReleaser and I can't get C# to recognize the ADF namespace. I can add the reference by going to Reference->Add ArcGIS Reference, but ...