C# is a programming language.
2
votes
3answers
912 views
SQL Server Geometry to geography conversion
I have imported a number of Shape files from the ordnance survey using shape2SQL
these have been imported as geometry however i would like to convert them to Geography and specifically to srid 4326
...
3
votes
2answers
456 views
Flash more than one feature in arcmap using C#
How to flash many features at same time in ArcMap using C# coding?
Currently I call this function in a loop,
private void FlashFeature(IActiveView _activeView, IFeature _feature)
{
IActiveView ...
2
votes
1answer
415 views
Building a Polygon from an array of points in Arcobjects and C#
I have seen this code in Arcpy which is used to create a Polygon from a string of Points(X , Y).Can you please let me know how I can us something like this which can generate polygon from an array of ...
1
vote
1answer
518 views
How to use default identify tool in ArcMap from C#?
I made a custom "Find" tool(winform) which is called after specific button presed in ArcMap toolbar. In this new "Find" form I need to use identify for one or more selected items in DataGridRow. So ...
2
votes
2answers
352 views
How to get all OIDs from a table?
I have table which i need to get all the OID's from it.
I tried this code :
List<int> OIDList = new List<int>();
IQueryFilter queryFilter = new QueryFilterClass();
queryFilter.SubFields = ...
0
votes
1answer
150 views
Shapefile Arribute Table to Datagridview
Can you please let me know how to display a shapefile attribute table in C# DataGridView?
Thanks
1
vote
1answer
408 views
Using GeoServer REST API and C# to create Layer Group
Following information at this link in the section on creation of layer groups, I've created the method(C#):
public bool AddToLayerGroup(string layerGroupName, string layerName)
{
...
5
votes
2answers
610 views
How to insert data to a table?
I have Table in ArcCatalog, table name: (WorkOrderAss) .
This table contains 3 columns : (OBJECTID , FeatureName , Name) .
I want to insert data to this table from the code behind in C#.
Any help ...
0
votes
1answer
68 views
How can I read the geospatial properties of ArcGIS web services using C#?
I need to display the Geospatial properties of ArcGIS web-services (like service name, service type, description, copyright, etc.) which are available in the "ArcGIS Services Directory", in my C# ...
0
votes
0answers
180 views
How To List Fields of a Shapefile and Add a New Field using C# and ArcObjects?
Can someone please help me to figure out how to get list of attribute fields name from a shapefile? For example , let's say I have a shapefile called "NewDH.shp" stored at "D://GIS". How I can list ...
1
vote
0answers
152 views
error in gp.execute intersect
i generate a tool to return values using area of polygons. but when i execute the tool, visual studio show an error :"Error HRESULT E_FAIL has been returned from a call to a COM component" in ...
0
votes
1answer
253 views
how to list table rows of a layer in a listbox?
I'm new in using c# and Arcengine .
i would like to list table rows of a feature in a Listbox like select by attribute in ArcGIS
such that when i click a button, table rows list in a listbox . i use ...
1
vote
1answer
568 views
How do I add TIFF files to one layer/raster catalog?
We have several TIFF images (already tagged with position information) we want to load as a single layer into the map. It's the first time I dig into this raster/topology thing, but at least I managed ...
3
votes
2answers
464 views
C# Library for consuming Geoserver REST?
I am currently experimenting with Geoserver and it's capabilities within C#. One thing I would like to do is query the server for basic information (existing workspaces, layers, layer attributes, ...
3
votes
2answers
371 views
A bug in ESRI Line Geometry WKB that adds needless, trailing 0's behind otherwise valid WKB?
[Update 7.13.2012]
My coworker noticed the the ESRI Line WKB is malformed contains unspecified trailing data, and since he's not active on GIS.SE, I posted his remarks as an answer. I'll wait a few ...
2
votes
1answer
347 views
ArcGIS: How to programmatically refresh selected features
Background: I have C#, ArcGIS command that 1. lists selected features, and 2. allows you to delete selected features from this list out of a geodatabase.
My problem: After I delete features, ArcGIS ...
1
vote
1answer
148 views
Obtaining friendly names for ArcMap layer data types
Using ArcObjects, is there a way to programmatically obtain the "friendly name" for a layer's data type as seen in the ArcMap Source tab for layers in a map document?
e.g.:
File System Raster
...
2
votes
1answer
1k views
Insert Geography data into SQL Server 2008
Can someone guide me to or give me an example on how would one go about insert/query Geography data in Sql Server 2008 ( Polygon with 4 points and Point in specific) using C# EF or Linq2Sql.
I've ...
1
vote
1answer
180 views
BaseCommand never show up in “Customize Toolbar Items”
I am developing in c# using ArcGIS Engine 10.
I created a BaseCommand class ZoomCommandTest using BaseCommand template in Visual Studio 2010 using .Net Framework 3.5
Following is the ZoomCommandTest ...
3
votes
1answer
691 views
How to make a WPF Window be a well-behaved child window of ArcMap?
I am pretty familiar with Windows Forms in ArcGIS but WPF, which I'm just starting to tinker with, seems to be a different animal. I've created an ArcMap add-in with a button that displays a Window ...
1
vote
0answers
152 views
C# ArcObjects RubberBand Tracking Cancel
I've written a function to create a polygon based on geometry collected from the IRubberBand interface as follows:
ITrackCancel esc = new CancelTrackerClass();
esc.CancelOnKeyPress = true;
...
3
votes
1answer
260 views
Polygon with the same points over and over
I am in the process of reading shape files (provided to us by the vendor dealing with GIS products) using a C# program and loading them into a SQL database. I first read the text for the shape and ...
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 ...
4
votes
2answers
217 views
Why isn't valid geometry not valid in NetTopologySuite when close to poles?
I have a Polygon which crosses the south pole:
Polygon in WKT:
POLYGON((5.86826073458095 75.6638564054071,-16.5436836399021 63.2220742891438,-19.3664667294083 59.846221066959,-21.7009816876343 ...
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
...
3
votes
2answers
576 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 ...
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 ...
1
vote
0answers
53 views
Why are the special fonts in a .mxd-project not used/found?
I have a .mxd-project file from a customer which uses special fonts (TrueType). I installed these fonts in Windows but my application (mostly a MapControl) doesn't use these fonts for displaying. I ...
2
votes
2answers
985 views
Geoprocessor Select By Location Using Features Instead of Layers
I have a simple spatial feature selection function that includes:
public static void SelectByLocation(IFeatureClass sourceFC, ILayer selectLayer)
{
Geoprocessor GP = new ...
0
votes
0answers
55 views
How to make billboard Marker Symbole in GlobeControl
I'm using a 2D symbol style library for elements' symbols in a draped graphics layer in GlobeControl and it succeeded.
Now I'm trying to make the symbols billboarded, how to do this by ArcObjects ?
1
vote
1answer
179 views
ArcGIS custom addin icon
I'm working on a custom addin with C# + VS2010 + Arc10.1 Pre Release and I don't seem to find the way to make custom icons work for a button that the extension holds and for the extension itself. I ...
4
votes
1answer
473 views
I need help with saving Graphics to the a map
I have everything working just like I need it to, but when I add a new graphic to the map it does not save it. So I will add it, close the application, and when I reopen it the graphic is gone. I have ...
4
votes
1answer
150 views
Retrieve data from FeatureClass
I have :
FeatureClass (Structure)
column (Type)
column (OID)
I am trying to get the (Type) for specific OID.
I tried to use this code but it dose not work.
IFeatureWorkspace featureWorkspace = ...
6
votes
2answers
99 views
What event is fired when a feature is edited?
When the user draws a new feature (line, point, etc.) in ArcMap, there are null attributes.
If the user enters values in these null fields what is the event that is fired?
I want to control the ...
2
votes
2answers
230 views
How to transform Lambert coordinates in C#?
I want to transform Lambert (EPSG:3035) coordinates to EPSG:4326 in C#.
I have tried this:
var lambert = cf.CreateFromWkt("PROJCS[\"ETRS89 / ETRS-LAEA\",GEOGCS[\"ETRS89
...
3
votes
1answer
103 views
OID for the last added feature
How can i get the Object ID for the last feature created ?
i use m_editEvents_OnSketchFinished() event to run some code, but i can't get the OID
of the most recent added feature.
2
votes
1answer
115 views
Ghosting and Map Functionality Loss in Map View C# Arcobjects
I'm writing a C# add-in and trying to implement a piece where a user can add points to a graphics layer on the map view. The points are drawing, however the map pane has serious ghosting issues and I ...
2
votes
1answer
970 views
Upload Shape File using GeoServer REST API and C#
I'd like to upload shape files using GeoServer REST API and C#. So far, I can create workspaces using the REST API and C#. From GeoServer documentation (specific to cURL), the difference between ...
1
vote
1answer
139 views
Dealing with tables in ArcMap
I had create a table and line feature class in ArcCatalog.
i want to deal with those tables in ArcMap.
Read
Add
Delete
Update
how could i do that?
6
votes
1answer
537 views
How to start using the SharpMap library?
I am a very newbie on GIS and also programming especially c#. I am trying to develop a program to:
display map from geotiff, dted (level 2 i guess), shapfiles and jpeg type of files.
display ...
3
votes
4answers
237 views
How to get exact ISymbol image size in pixels
I found the next code to convert ISymbol into bitmap image,
but how to know the suitable image size? (suppose we have a ITextSymbol)
private static Image PointSymbolToImage(ISymbol symbol, Size ...
1
vote
1answer
154 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.
...
2
votes
1answer
140 views
How to change the raster NoData value with ArcObjects?
I am trying to change the a raster's NoData value with ArcObjects and keep coming up short.
Here is the code that I thought would work:
IRasterDataset _dataset = ...get the dataset...
object[] ...
0
votes
0answers
19 views
Problem with ObjectClassEvents_OnChange
I currently using ObjectClassEvents_OnChange event to prevent the user from make any changes on the features in ArcMap, i want to prevent the user from moving and edit the shape of the features.
The ...
3
votes
0answers
78 views
Modify feature: moving or change the shape
When the user make some edit on features on ArcMap, the user can make some changes like moving the feature ,edit the attribute or change the shape.
how could i know if the user move the feature or ...
3
votes
2answers
287 views
GeoServer/GeoWebCache with C#
I'm starting a project in which I intend to use GeoServer/GeoWebCache as a provider of WFS, WMS, WCS, and WPS services. I've configured the GeoServer to use PostGIS for storage. The frontend is using ...
2
votes
1answer
229 views
get style item name of one marker symbol
i used next code to load a symbol with specific style..
now i need to do the opposite operation..
i mean, i have one symbol and i want to know it's style.
is it possible?
private ISymbol ...
2
votes
1answer
81 views
How to use IObjectClassEvents?
I need to use IObjectClassEvents in my project. I don't know how to start, can any one give me a simple explanation, or an example in C#.
4
votes
1answer
956 views
Best way to get Convex Hull/Boundary of millions of points
I've been trying to do some point analysis on some xyz data, I'm at the point where I've decided it is best to produce a boundary of my xyz files and put this with the metadata for each survey.
Now ...
1
vote
1answer
891 views
How to create an ArcObjects point with latitude and longitude?
I need to add a point in an existing feature class using .NET API of ArcGIS Server 10 in C# (Visual Studio 2008). I'm using a sample from ESRI Resource Center (ArcGIS_SimpleEdit_CSharp). The following ...