C# is a programming language.
1
vote
1answer
637 views
How do I calculate ECEF X,Y,Z velocities for GPS if I have no satellites
I'm attempting to simulate a GPS message where know variables are starting location, ending location, speed (m/s), and a bearing (0 - 359 degrees). How can I calculate the ECEF X, Y, Z velocities ...
12
votes
5answers
705 views
How can I programmatically get the path of “Python.exe” used by ArcMap
I am working with an add-in of ArcMap in c#. From c# code, i have executed some python scripts. Now, to run those script, I have hard-coded python path. But this is not portable. So, I want to get the ...
3
votes
1answer
531 views
ESRI Flash Command in custom code
I would like to implement the same flash feature command that ESRI uses when accessing the context menu on a table row.
I have used the following successfully to flash a selected feature:
...
2
votes
2answers
455 views
ArcObjects: Alternative workflow to using a SQL query with over 1000 values in IN statement
I have a ListBox listing the unique values of a column in a feature class; the user can select any number of values and click a button to then zoom to the set of features matching those values. A ...
9
votes
5answers
2k 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
13
votes
3answers
2k views
ArcObjects: Memory leak in IFeatureClass.Search (only on SDE with direct connect)
UPDATE 6/30/11: ESRI Support say they have reproduced the issue and have opened a bug report (NIM070156).
I have determined that there is a memory leak (in unmanaged heap memory) that occurs when a ...
4
votes
4answers
927 views
Exploring ArcObjects through C# or VB from Python background
While I understand that this may be off topic to an extent, I am in a bit of a bind and could use some help directing my thought process and research.
I have little programming background aside ...
5
votes
4answers
1k views
Programmatically edit/update metadata in ArcGIS 10
Has anyone succeeded in programmatically updating metadata in ArcGIS 10? Considering using Python/arcpy but ArcObjects (C# or Python/comtypes) is also a possibility.
I need to update both the FGDC ...
6
votes
1answer
754 views
ArcGIS 10 add-in: ComboBox add-in component focus issue
Update 9/9/11: Here is a minimal example project that will reproduce the issue for me (VS 2008 solution): http://wfurl.com/09061bf
I have an ArcMap 10 add-in with a ComboBox class that I place on a ...
4
votes
4answers
1k views
Determine overlapping points using a spatial filter in ArcObject
I have a point layer with thousands of points. Using a spatial filter, I have to find out those points which are intersecting each other. Then the objectid's of the intersecting points should be ...
4
votes
2answers
712 views
Translating grid to USGS .dem in C# via GDAL
I am attempting to translate ArcInfo binary grids to USGS DEM format (.dem). I have installed the GDAL .NET bindings thru this build installer. I can get to GDAL in my C# add-in I am working on. ...
3
votes
2answers
360 views
Using ArcObjects, how to convert an Access table into a proper geodatabase table?
I have inherited an ArcGIS application that creates a number of access database tables. I'd like to use ArcObjects to convert them to proper geodatabase tables, which I understand to mean simply ...
3
votes
1answer
783 views
C# Library for converting Shapefile Projection
Is there any C# library which can take a shapefile as an input with projection information defined (e.g, EPSG 3011) and return a new shapefile with user specified projection (e.g, EPSG 4326) ?
2
votes
1answer
385 views
How to control which Fields are exported in ArcObjects? (via Field Mapping)
In ArcMap 10.x, if you use the Export Data command on a layer that has hidden/disabled fields, those fields will not be present in the created feature class/table. My question is simple: how do you ...
1
vote
4answers
867 views
How to Read a Shapefile using C#?
I am new to ArcGIS and trying a few things..
I'm trying to read shape file(which is supply as an input) using c# and
I want to generate a .pdf file which contains underlying metadata information ...
0
votes
2answers
149 views
How to add command developed with C# to ArcToolbox
I have a command that develop with c# . I want to add this command to the arctoolbox . is there any way to add command to arctoolbox in arcgis programmatically ?
6
votes
3answers
312 views
How to generate geodesic linestring from two points in C#
I'm looking for a FREE C# class, library or set of functions that will allow me to generate a geodesic linestring (or array of vertices, whatever) from two decimal degree points.
I've found ...
5
votes
2answers
396 views
Is it permissible to update features after the feature cursor has been released?
In ArcObjects, is it permissible to modify and update a feature after the feature cursor (which was used to retrieve the feature) has been released?
That is, do features in any way retain a link to ...
7
votes
2answers
611 views
Why do these annotations appear stacked/overlapping?
I've encountered a strange problem while trying to populate an annotation feature class programmatically (ArcObjects, C#). As you can see in the image below, the characters in each text string seem to ...
6
votes
5answers
779 views
Troubleshooting ArcObjects performance problems
We have developed a relatively complex geoprocessing routine using a C# / ArcObjects (COM) / ArcGIS Server 9.3.1 / ArcSDE 9.3.1 / Oracle 11g stack. Running the routine on a complete dataset takes ...
7
votes
1answer
226 views
Find the nearest point on a line
I have a line that exists between two latlon positions, and a point on a certain latlon position. What I want to know is what the nearest point on that line is (in respect to the other point). So a ...
7
votes
2answers
632 views
How do I implement outbound arcobjects interfaces in C#?
I would like to write a class in C# that implements one or more outbound interfaces, for example ILayerEvents and IActiveViewEvents.
Does anyone know how to do this with C#?
Update
Following @Chaz's ...
7
votes
4answers
757 views
Why doesn't US One Address locator style have city, state or zip code fields?
I am using the file:
C:\Program Files\ArcGIS\Desktop10.0\Locators\US One Address.lot
To do address resolution on a parcel / polygon layer. I'm trying to understand why the file doesn't contain ...
5
votes
1answer
306 views
How can I pass a 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 ...
4
votes
2answers
289 views
ArcObjects: How to measure the draw time of a layer in ArcMap?
I'd like to quantitatively measure the display performance of mosaic datasets, image service layers, raster layers, feature layers, etc. in ArcMap 10.
How can I measure the draw time of a particular ...
3
votes
2answers
213 views
Split a Polyline into small segments
I am writing an addin, which needs to split a polyline into a number of segments taking the number of segments as an input from user.
How can I accomplish this?
3
votes
1answer
377 views
Choice approaches for passing a selected feature to a method in ArcObjects? (C#)
It pains me to ask such a basic question, but after several hours (not exaggerating) of trying to figure this out and failing, I come to GIS.se
What I am trying to do is pass a selected feature ...
2
votes
1answer
417 views
Schema Lock issue when using ITable.AddField via ArcObjects
During a process I am running, I sometimes need to create a field that is missing in an attribute table. Unfortunately, the program is complaining that the table I am adding the field to has a schema ...
2
votes
3answers
339 views
Select “interior” lines of a polygon-to-line layer
I have a polygon featureclass that has adjacent features. Using Arc10, I am turning those polygons into lines using the "Featureclass to Lines" tool.
Now I would like to select ONLY THE INTERIOR ...
2
votes
1answer
236 views
CodeDom.Compiler fails in Arcmap add-in, but works from console app
The Test method in the code below succeeds in a console test app, but fails when I call it from within an Arcmap add-in, throwing a ReflectionTypeLoadException with a loader exception saying:
...
1
vote
2answers
174 views
How to save and load elements to/from a layer in correct z-order?
I copy elements from one layer to another like this:
IGraphicsContainer container = _mapControl.Map as IGraphicsContainer;
IGraphicsContainerSelect containerSelect = container as ...
0
votes
1answer
302 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 ...
8
votes
2answers
948 views
Can custom map tiles be consumed via ArcObjects within my ArcGIS 10 Desktop AddIn?
Can I programmatically consume and render custom map tiles in ArcMap via our ArcGIS 10 Desktop AddIn?
The AddIn is built using the ArcObjects SDK for C#/.NET and ArcGIS 10. Pulling and rendering map ...
6
votes
6answers
3k views
How do I activate a custom ITool from a form without having to add it to a toolbar? (ArcGIS 10 add-in development)
I'm working on an add-in for ArcMap 10.0 that adds a toolbar to ArcMap. One command (OpenModelessDialogCommand) button on that toolbar opens a modeless WinForms dialog, from which a tool (MyTool) can ...
5
votes
1answer
304 views
What is an IFeatureClassName?
I'm currently attempting to export a selected set of data from a feature class in a database to another database as a new feature class. I understand everything perfectly right up to the ...
3
votes
1answer
73 views
Getting “Failed to open tool” message when trying to run geoprocessing tool from C# code
I've been experimenting with the Military Aspects of Terrain Template, which has a toolbox associated with it. I've been using the following WPF Runtime code, which should open a tool in the ...
3
votes
2answers
578 views
Perform a spatial join in C# with ArcObjects
I feel like this has to be on the internet somewhere, but I haven't been able to find it.
I'm attempting to perform a spatial join on a polygon and point layer. My goal is to push the polygon's ID ...
3
votes
2answers
443 views
ArcObjects: IMapEvents.FeatureClassChanged doesn't fire if the layer's previous data source was invalid
Is there any other event besides IMapEvents.FeatureClassChanged that will be fired when a layer's data source changes? FeatureClassChanged doesn't seem to fire if the layer's previous data source was ...
3
votes
2answers
595 views
MapScale not being persisted properly in mxd when programmatically changed outside of ArcMap environment
I am trying to change the scale of a map in an mxd OUTSIDE of ArcMap in a standalone Windows application. The problem is the scale is never persisted - the best code I have come up with is the ...
3
votes
1answer
394 views
save IGeometry to disk as a Layer file
How can I save an IGeometry to disk as a Layer file?
ArcEngine 10, C#, VS2010
Edit 1: With Jason Scheirer 's suggestion I managed to convert a point into a shapefile - and I'll post the code here ...
3
votes
1answer
369 views
Null values in plugin data source
How do you appropriately setup a plugin data source to allow for null values (in .NET - C# preferred)?
I'm currently setting up a field using:
field.Type_2 = esriFieldType.esriFieldTypeSingle;
...
2
votes
2answers
132 views
How to cancel SaveEdits/StopEdits button press (ArcObjects)?
I have an interesting situation.Suppose a user creates 10 features in ArcMap in an edit session. Now the user tries to save this edits by clicking save edits or stop edits button. I would be ...
2
votes
1answer
167 views
How to draw a rectangle a the map using C#?
I have two points, Ipoint upperRight; and Ipoint lowerLeft; points.
from the previous points i can get the height and the width for the rectangle.
How can i draw a rectangle on the map?.
I think i ...
2
votes
0answers
245 views
Rendering raster layer from DTED based on height color map
I have a raster layer that was create from DTED file (dt1 specifically), created by the following code:
var rasterLayer = new RasterLayer();
rasterLayer.CreateFromFilePath(dtedFilePath);
The dted ...
2
votes
2answers
992 views
Create Polylines from arrays of points
Let me describe the data setup. A line has been provided as an array of coordinate pairs, one for each vertex. This array is variable in size, anywhere from 2 to 200 coordinate pairs per line. What I ...
2
votes
1answer
957 views
sharpmap overlay mapinfo on bing/google
I want to use sharpmap to overlay a mapinfo tab file onto google or bing.
I have it working pretty much at the moment however the co-ordinates that bing/google show are in correct so my mapinfo file ...
1
vote
1answer
131 views
ArcObjects 10.1 .NET Convert Point from WGS1984 to OSGB1936
Please can someone help me convert a point in WGS1984 to OSGB1936, I have followed all the documentation (or so i think...) and yet have not made any headway into this problem. This is my code :
Type ...
1
vote
1answer
160 views
How to change the view from layout view to data view using c# code in ArcMap?
How to change the view from layout view to data view using c# code?
1
vote
1answer
60 views
How to serialize IStyleGallery Object? [duplicate]
Possible Duplicate:
Can I store an ArcObject inside a BLOB or XML field?
I am saving shape file in database and now i want the symbology selected for the feature layer also get stored in ...
1
vote
1answer
423 views
WGS point to WGS line segment (great circle) distance
How would I go about resolving this in C#?
I have a line segment (great circle distance) defined by two Lon-Lat pairs (call them points A and B).
A third point somewhere on the Earth sphere.
The ...

