Tagged Questions
0
votes
1answer
36 views
How do I initialize the ArcGIS proxy via server side .NET code (C#)?
I know how to do this via JavaScript code:
esri.config.defaults.io.proxyUrl = "../proxy.ashx";
But, how do I do this in .NET? I am very new to the GIS space.
1
vote
0answers
14 views
xy tolerance from c#.net
For some graph work, I need the value of X,y tolerance. I found ISpatialReferenceTolerance.XYTolerance Property. But I couldn't find any option that how can I get ISpatialReferenceTolerance interface ...
0
votes
2answers
45 views
Zoom and Pan using scroll wheel in Arcobjects
is there any way to zoom using scroll wheel ? i have tried AutoMouseWheel of map control, it works well for the first used custom tool, but once i change the tool, it stops working , i would like to ...
2
votes
2answers
73 views
How to use shortcuts in dockable windows?
I have developed a custom dockable window with textboxes, comboboxes and buttons for use in ArcMap. After the user clicks on a button in the dockable window a function is invoked.
How can I invoke the ...
4
votes
1answer
104 views
How to set focus on ArcMap map window using arcobjects and c#.net
I have developed a custom dockable window with textboxes, comboboxes and a button for use in ArcMap. After the user clicks on the button in the dockable window a function is invoked. After the ...
3
votes
0answers
98 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
0answers
80 views
What is the correct way to handle assembly resolution in .NET ArcGIS add-ins?
This has been a thorn in my side for some time now -- in .NET ArcGIS add-ins, assembly dependencies packaged with the add-in are often not resolved correctly. I am still not sure why and under which ...
3
votes
2answers
212 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?
1
vote
1answer
130 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 ...
2
votes
1answer
75 views
IGeometryBridge.GetPoints throws NotImplementedException. Am I doing something wrong?
I am working on some .NET code that processes lots of polygon geometries at the vertex level. In order to reduce COM interop overhead, I want to call IGeometryBridge2.GetPoints once instead of calling ...
0
votes
0answers
62 views
coordinate transform from one srid to another in nettopology suite, c#
In a program using c#, .Net, I read a geometry field from a spatialite database into a variable of type GeoAPI.Geometries.IGeometry, in SRID 4326 (WGS 84). I want to transform this, in code, to a ...
2
votes
1answer
111 views
How to create multiple dockable windows?
I am building an add-in and I have several different windows, which I open with the code below. This works fine. However, how can I create the same window n times?
UID dockWinID = new UIDClass();
...
4
votes
1answer
187 views
Using log4net in ArcMap addin solution
I would like to use log4net as the logging framework for my addin. However, now I'm having trouble in enabling logging in debug mode and in the released esriAddin file. It works in either one, not ...
2
votes
1answer
158 views
Get Type of Arcobjects objects
Trying to check the type of some Elements if they are (ITextElement , MarkerElement), when i try .getType() function it returns always "System._COM_object".
How i could get the type of an object if i ...
1
vote
1answer
115 views
How to programmatically create ArcGIS Image Service and add it to map using C# / .NET?
How can I programmatically create ArcGIS Image Service and add that service to my MXD file programmatically?
I am using C# .Net.
0
votes
0answers
119 views
Geoprocessing COMException when running custom script
I have searched a lot of forums looking for answers but none have helped so far.
I am trying to run my own script ( a dummy empty one for now) with geoprocessing in Visual studio 2010 using c# and ...
0
votes
0answers
28 views
ESRI ArcGIS Engine with C# .Net Tutorial/Book [duplicate]
Possible Duplicate:
Getting started with Arcobjects
I am working on ArcGIS Engine with C# .NET.
What is the best way to learn the basics.
I want to study different objects basics like
...
1
vote
1answer
155 views
How to print semi-transparent elements?
I highlight some features with a semi transparent color via an ILayerExtensionDraw. When I print the ActiveView of the PageLayoutControl with IPrintAndExport the highlightning is not on the printout.
...
13
votes
1answer
649 views
How to get selected Features/Geometry from Windows Clipboard in ArcMap/C#?
I have a custom tool in ArcMap 10. The Workflow is the following:
Select Features in a Layer with the "Select Features by Rectangle" tool
Copy the Features to the Clipboard using STRG+c
Select the ...
7
votes
3answers
2k views
ArcObjects (ArcGIS for Desktop and C#): How to cast between the ArcMap COM UI and my custom .Net UserControl objects?
I'm creating a utility to run in ArcGIS for Desktop using ArcObjects (9.3.1 SDK) and C#.Net. My prototype involves a toolbar with two comboboxes and a tool. The first combo selects a layer in the TOC, ...
1
vote
2answers
1k views
Georeferencing an image in C# with GDAL
I want to upload a jpeg or some raster image into a C# form and then on entering the latitude and longitudes I need to be able to create an GEOTIFF file of the same image. How can this be done in ...
8
votes
2answers
701 views
C# version for ArcObjects 9.3
Can I use C# 4.0 with the target framework set to .NET 3.5 to develop an extension for ArcMap 9.3? Or does it have to be C# 3.0 or earlier?
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) ?
5
votes
2answers
704 views
How can I write a GEOTIFF in C#?
I want to upload a jpeg or some raster image into a C# form and then on entering the latitude and longitudes I need to be able to create an GEOTIFF file of the same image.
How can this be done in ...
4
votes
3answers
2k views
Visual Studio 2010 templates for ArcGIS missing
It seems that I do not have ArcGIS templates in VS 2010 templates folder -
\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\ProjectTemplates\CSharp\
and as a result ArcGIS ...
1
vote
3answers
706 views
C# library for bounds based geometry search
I am searching for C# library which has code that builds spatial index in memory based on geometry bounds and enables fast searching for all geometry inside given bounds.
I prefer free library.
5
votes
1answer
2k views
.NET Entity Framework with PostGIS?
Is it possible to use the .NET Entity Framework with PostGIS?
I've reviewed a few options, including hookup it up with Npgsql using ...
0
votes
0answers
191 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 ...
4
votes
1answer
285 views
How to use ICalculator with a pre-expression in C#
Another wonderful predicament. I am trying to use an instance of ICalculator to update a field based on another field. Textbook stuff. Unfortunately, the example in the SDK for C# is a bit lacking.
...
2
votes
1answer
416 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
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 ...
4
votes
1answer
223 views
Directory.GetFiles vs. ListDatasets - Which is the tool for the job?
I'm currently writing an arcobjects app that performs an arbitrary set of geoprocessing tasks on a group of shapefiles and/or dbf tables. My current implementation uses Directory.GetFiles to build an ...
3
votes
2answers
266 views
uniquely identify feature classes & compare them for equality
I want to implement EqualityComparer<T> for feature classes so that I can stuff them into a Dictionary or HashSet.
For motivation, say that I am looping over many IFeature objects which belong ...
2
votes
3answers
265 views
List layers in directory .Net ArcObjects or plain .Net — C# preferably
Any code samples to list arcgis layer files from a directory so they can be looped over?
0
votes
2answers
3k views
How to convert lat long to meters using Mercator projection in C#
I have set of lat long values and I want their equivalent in meters using Mercator projection in C#. Can you please post some sample code or api example of some library that does exactly this?
1
vote
1answer
1k views
How to determine if a mouse click falls within a polygon
I have a polygon drawn on top of a layer using the graphicsContainer of the current activeView, then I want to be able to show a custom context menu if the user right clicks INSIDE the polygon. So I ...
4
votes
2answers
754 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 ...
4
votes
0answers
346 views
ArcGIS - find layer ID and name from a Identify query
I need to retrieve the layer ID of every layer returned by the IQueryFunctionality.Identify function (I am using ADF with .NET)
Identify function spits out a DataTable array for layers which have ...
10
votes
2answers
570 views
ArcGIS 10 add-in: Top-level exception handling
The ArcGIS 10 add-in I'm working on is pretty simple -- just a tool control and a dockable window. I'm handling the specific exceptions I anticipate occuring at the source and throwing everything ...
2
votes
1answer
380 views
Read .DEM (USGS) FIles with C#
I have a huge number of .DEMs and have been investigating how to process them into something useful.
Does anyone know how, or even if it is possible to read coordinates and elevation data from ...
3
votes
1answer
376 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 ...
1
vote
1answer
1k views
Programmatically adding custom GP tool to a toolbox
I'm having issues add a custom GP tool to my toolbox programmatically using c#. The tool gets added to my toolbox OK but then when I try to open it it fails adding a red cross to the tool and ...
3
votes
1answer
239 views
ArcGIS10: Publishing GPtools etc. in AddIns
I'm creating an ArcGIS 10 add-in in .NET C# which contains some tool commands and an extension class. This extension is being launched on application start-up.
If I create any custom GP Tools, ...
3
votes
1answer
431 views
How can I programmatically project the Z value of a z-aware feature point, using ArcObjects in .NET/C#?
I discovered the following code leaves the Z coordinate of featurePt untouched:
// if not WGS84 project it
if (!SpatialRefsEqual(featureSpatialRef, srWgs84))
{
// featurePt here is a Z-Aware ...
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;
...
3
votes
0answers
204 views
Alternative to IMapServer2.ExportScaleBar
Does anyone know a good alternative to the IMapServer2.ExportScaleBar function? I want to do essentialy the same task, but outside the ArcGIS Server environment. For a given map scale, predefined ...
2
votes
0answers
261 views
How to Create Custom ZoomIn Button that is Windows Tools Button with Custom Cursor?
I want to create large zoomin Button without toolbarbutton. I created a 'Zoomin Script' on axMapContorol. It worked is fine but I can't set cursor.
My code is as follows:
IMapControl3 mapControl = ...
2
votes
2answers
578 views
Problems closing dbf-table edited with ArcObjects
To change values and add new values to a dbf-file, I connect to the dbf and use the ITable interface to make the edits. At the end I release the COM-objects of the table and the workspace. But when I ...
2
votes
1answer
1k views
With Geographic Coordinate systems, why does my spatial query select all features from a feature layer?
Background:
Add-In for ArcGIS 10 Desktop via ArcObjects for .NET
The below code returns ALL features for the layer when the map is specified with any Geographic Coordinate System.
However, the below ...
8
votes
2answers
946 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 ...
