Tagged Questions

C# is a .NET programming language.

learn more… | top users | synonyms

0
votes
1answer
109 views

Programmatically block Toolbar choosing in ArcMap 10.1

With an extension I can block ArcMap's Customize menu using following code line: ArcMap.Application.LockCustomization("password"); But, it makes no sense since by right-click on Toolbar docking ...
0
votes
1answer
147 views

Mysterious Data loss after compressing SDE database

I suffer sometimes from data loss in SDE database exactly after compressing database. i mean by data loss that some data remains in its prior state before edits, but this problem do not affect the ...
2
votes
4answers
373 views

How to take 2 points from One featureClass, create a line between those points, and add the line to a new featureClass (aka Shape File)?

I'm a total noob/beginner in ArcObjects. I'm coding in C#. I want to extract 2 points from a given featureClass, create a straight line between those 2 points, create a new feature class and add ...
0
votes
0answers
105 views

ArcMap throws NullReferenceException for OnClick event of Add-In

I have this below code which is a toolbar button to open a dock able window in ArcMap 10.2 Desktop application and what happens is that I am able to install the toolbar button but when I a click that ...
0
votes
0answers
53 views

How to access input parameters (layer name,field name) in rest SOE?

I want to access input parameters in my SOE(Server object extension) code which I am writing in arcobjects using C#. I have constructed the complete URL(including layername id and field name) for ...
0
votes
0answers
80 views

Feature To Polygon by Attribute

Hey everyone How are things? I am having a problem getting my head around an efficient way to create polygons from polylines using an attribute. I would like to get some pseudo code, suggestions as ...
0
votes
0answers
105 views

Display DEM in WPF application

In my application which is based on .net4/C#/wpf, I need to display a decent sized terrain file (eg. GeoTiff). It is an elevation file which should be viewed in 3D. The user should be able to draw ...
1
vote
1answer
236 views

Why is my OnChangeFeature event not firing in my parcel fabric editor extension?

I have an edit extension that listens to events that happen during an editor session. I have wired it like so: void Events_OnStartEditing() { //Since features of shapefiles, ...
1
vote
1answer
132 views

How to Plot Every Other Address on Street?

I have no idea if this is even possible. We run a Utility software company and need to know where to put the leak sensors. The sensors are put at either every other house or every two houses depending ...
-1
votes
1answer
50 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
1answer
74 views

How do I create an IFeature object from an IPolyline or ILine object

I am having some problems with some code i am trying to write. The application i am creating allows the user to click on the map and a point will be createD, when they click again to create another ...
0
votes
0answers
60 views

Error: already exists.(stg_e_filealreadyexists) when using IMapDocument.Open method?

I got the errror: already exists.(stg_e_filealreadyexists) when using the method IMapDocument.Open() as below codes: if (File.Exists (strDirectory + "\\temp.mxd")) File.Delete(strDirectory + ...
1
vote
2answers
114 views

Conversion of raster to polygon

Using C# and ArcObjects, what is the recommended way to convert a raster file into a polygon. I need this for calling the Near tool so that I can move a station which may be inland to the nearest ...
2
votes
1answer
286 views

How to get cell size of raster shown in ArcMap using ArcGIS Engine and C#?

As the figure shows above, after classifying the raster, we can get the cell size by opening the raster Properties to its Source tab, and we can calculate the area by mutiplying the cell count and ...
1
vote
2answers
286 views

C# code to display result of spatial query on arcmap

the problem is i have to display those points on arcmap that lies inside the envelope.I am explaining what i have done so far. I have one point feature class say featureclass ,open it and used one ...
0
votes
0answers
30 views

Button Driven Switch Version

Using ArcMap 10 & C#, I'm trying to switch the map to display a certain version of our SDE database when a custom button is selected and I'm having a heck of a time finding what I thought would be ...
-1
votes
1answer
46 views

Can I convert raster to shape by specify class?

I use the method "IMultivariateOp.MLClassify",so I get many class such as the figure below, can you give some code in C# to convert each of them to shape?Thank you. one more question, why I just ...
0
votes
0answers
59 views

How to convert raster to polygon that I classify in C# ArcGIS engine?

by " IMultivariateOp.MLClassify" method,I just can classify the raster into many classes,but how to convert each of them to polygons,and give them properties like names? I need some code in C# in ...
0
votes
1answer
20 views

Create Cost Array ignores NoData!

After a great deal of research here is what is happening: We select two points on a hydrography map with an island inbetween. It is expected that the CostDistanceWithPolyline would return a line that ...
1
vote
1answer
84 views

How do I perform a raster overlay analysis in ArcObjects?

Using the "IMultivariateOp.MLClassify" Method, it will create a field call "Count",which can be used for calculating area, as shown in the figure below: But now I want to calculate the increase ...
1
vote
1answer
219 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
947 views

offline map tiles in standalone desktop app

Which mapping API can be used (either in a C# desktop app or as a standalone mapping app) that accesses an offline tile collection and requires only a minimal amount of additional servers / other ...
0
votes
0answers
19 views

Adding a layer to ArcMap

I have create "Draw polylines tool", but not know how to create spacial layer to store polylines only in this layer. It's possible locate polylines in own layer, I mean that this layer will be ...
1
vote
2answers
22 views

working with hydrography raster the cost array ignores the end of water

We have our maps laid out using hydrography maps from NOAA. We had to run the graphics through several steps to create the water feature raster. I have a process that pulls in that raster, sets a ...
-1
votes
1answer
197 views

ArcGIS Engine--load mxd file to map control or pagelayout control?

When load a mxd file using ArcGis engine,how to automatically detect whether it's saved in mapcontrol or pagelayout control?Thanks!
1
vote
0answers
54 views

Whats wrong with my code? Any reference missing?

I have been trying to add the navigation tool that will simply zoom in and zoom out. Push left and right using the click of the mouse. I'm using in the Silverlight, Visual Studio 2010. The XAML ...
0
votes
0answers
175 views

Create a buffer area for a point c#

I am wondering to create a point/line based buffer zones in order to enhance my understanding for buffer concept in the GIS. The buffer zones can be any circle or region around a point, particularly, ...
1
vote
0answers
119 views

How to select and highlight feature by attribute

I have the below code which does a select by shape on my arc map how do I achieve this with attributes 1.The map has only one layer 2.There is a filter for the attributes on features Below is the ...
1
vote
3answers
2k views

Zoom to selected features with ArcObjects

I am trying to figure out what is the best way to set the active view extent to be able to view all the selected features on the Arc Map. 1.The Map has only one layer. 2.The features are filtered ...
2
votes
2answers
81 views

Is it possible to create an addin for a specifc MXD?

I am currently in the process of creating Addin's and also converting our VBA projects to .NET addins. With the VBA applications, they would only work with specific MXD's. Is this possible to do with ...
0
votes
0answers
48 views

Suggestions on how to find street intersections

I'm running AGS 10.2 with AGS Desktop 10.1 and SQL 2012. I have a REST SOE which is currently providing custom services to a JSAPI app. I'm working with a basic streets layer with only street names ...
1
vote
1answer
189 views

Get Polygon or IGeometry from Envelope in ArcObjects

I would like to create a Polygon Feature from the geometry of an IEnvelope in C# ArcObjects SDK 10. Is there an easy way how to do it?
6
votes
2answers
814 views

C# Abstraction for Web Feature Service (WFS) Call

I'm currently working on a WFS client-side implementation in C# for a thick client application (Windows desktop application). The goal is to be able to choose some "layer" combinations to be shown ...
0
votes
1answer
686 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 = ...
2
votes
1answer
63 views

How to get a collection of georeferencing control points in an ArcMap document?

I have created control points (i.e. links) using ArcMap's Georeferencing toolbar. How can I programmatically retrieve a list of these points? I'm looking for something like an enum of the links you ...
1
vote
0answers
58 views

Issue on IFeatureDataConverter.ConvertFeatureClass

Does anyone know if it's possible to reuse this method with a "feature dataset" already present ? I'm trying to import multiple shapefiles under a featuredataset inside a fgeodb. Everything it's ...
0
votes
0answers
122 views

Geoserver WFS Point Coordinates

I'm using SharpMap's desktop client within a C# WinForms application and GeoServer/PostGis as datasource. When i add a WFS layer that contains Multi-Line it works like charm. But if i add a point ...
3
votes
1answer
172 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 ...
2
votes
0answers
252 views

Calculate Width and Height of a Google Static Maps Image

Do you know how to calculate the width and height (in degrees minutes) of a Google Static Maps image? I’ve found it extremely difficult. The only information you have is: - The centre of the image ...
2
votes
0answers
78 views

How to refresh a IDockableWindow with a DGV

I am having a IDockableWindow which will display a row of data which is a DATATABLE on DGV. below is my code. Page1.cs: private void toolStripMenuItem_Open_detail_page_Click(object sender, ...
0
votes
0answers
59 views

Command doesn't show up on ICommandBar

I'm trying to put a custom command into the Help menu on startup if it isn't already there. This is my code to do so: private void OnCreate() { // other stuff in OnCreate()... // registering ...
0
votes
0answers
133 views

How to show an infowindow on click of an Image symbol marked at specific coordinates in ArcGIS map.

markers(Pushpins) are loaded with values from XML and is displayed on the map.How to enable click events on the markers to display InfoWindow. <esri:Map x:Name="MyMap" ...
0
votes
1answer
46 views

Handle string or int in server object extension

How would you also check to see if the value you are passing into into an SOE is an integer as well? This checks for string, but returns 0 when passing number: string searchValStr; int ...
5
votes
2answers
2k views

ArcObjects - find nearest feature to a point - has to be FAST

I've seen lots of discussion on this, especially using IIndexQuery.NearestFeature() on a FeatureIndex instance. Something like this: private IdDistancePair FindNearest(IGeometry g, IFeatureClass fc, ...
1
vote
1answer
115 views

What is the correct approach to handle mouse events for a tool that is called by a button?

I have a dockable window with a 2 buttons that call 2 different tools (Draw Marker and Select Features), What i want to happen is when the user clicks on the relevant button on the dockable window and ...
2
votes
2answers
173 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 ...
0
votes
0answers
75 views

Point Shapefile Spatial reference

I am trying to get real coordinate reference to the set of points I have created and it has no spatial reference in it. I am trying to do this using C#. I did some readings and I think I can use ...
1
vote
0answers
42 views

Is it possible to add dynamic controls to a dockable window?

I am writing a small application that uses the dockable window. What will happen is that for each layer in the TOC a label and checkboxes will appear within the dockable window. However what do i need ...
3
votes
1answer
336 views

How do I draw transparent polygons with ArcObjects?

How do I draw transparent polygons in ArcObjects? I mean is it possible to set alpha channel?
3
votes
0answers
164 views

converting a distance to a map distance

I have a point and a polyline. I need to find the perpendicular distance between each segment of the polyline and the point. By each segemnt of the polyline I mean that, each polyline may contain more ...