Tag Info

Hot answers tagged

2

I use this code and it works......... private void OUT(string line) { IMap Map; IMxDocument mxDocument; IApplication App = ArcMap.Application; mxDocument = (IMxDocument)(App.Document); Map = mxDocument.FocusMap; var pDelLayerLine = (IFeatureLayer)Map.get_Layer(0); ...


2

It's hard to tell from your code sample what you're up to. What you're searching for is the enum esriFieldType which can be tested against each field to determine its type: MyComboBox.items.clear(); // empty first IFeatureLayer pFtLayer = (IFeatureLayer)gMap.get_Layer(0); IFeatureClass pFtClass = pFtLayer.FeatureClass; for (int Cnt = 0; Cnt < ...


2

I think this blog post on the Esri site is still applicable: ArcObjects or the ArcGIS Runtime SDKs for Java and WPF—which is right for you? Though this question discusses the Java flavors, it may help as well.


1

I don't think you can access symbology from a single feature . The symbology renderer is defined at the level of the layer. You can set the renderer from the IGeoFeatureLayer, you access this by casting from IFeaturelayer. More info see: ...


1

Based on this Very old help you want to use your IStandaloneTableCollection IStandaloneTableCollection pColl = ArcMap.Document.FocusMap as IStandaloneTableCollection; IStandaloneTable pThisTable = pColl.StandaloneTable[0]; // the first table pColl.RemoveStandaloneTable(pThisTable); ArcMap.Document.UpdateContents(); //update ...


1

There is a better way to iterate through layers, look at Map.Layers(UID,True) as IEnumLayers... this limits your layer types (IFeatureLayer, IRasterLayer..) and looks in your group layers. UID pUID = new UIDClass(); pUID.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}"; // IFeatureLayers IEnumLayer pMapLayers = ArcMap.Document.FocusMap.get_Layers(pUID, ...


1

With a little modification, I got this to work. Thank you very much for your help. This is important to note that this is for feature layers only, not tables. IMap map; IMxDocument mxDocument; mxDocument = (IMxDocument)ArcMap.Application.Document; map = mxDocument.FocusMap; mxDocument.ActiveView.Refresh(); ...


1

Here's something I put together to show how to create a shapefile (just the basics) and iterate through a feature class writing to an output as you go: void NewShapefile(string FullName, ISpatialReference SR, ILayer FromLayer ) { System.IO.FileInfo pFInfo = new System.IO.FileInfo(FullName); IWorkspaceFactory pWSfact = new ...


1

Andrew, I think you're thinking wrong and it may get you into trouble. You need to stop thinking in terms of your dataset and start thinking in terms of GDAL and GIS. Your dataset data is in some projection, in this case State Plane. That means you use state plane (ft here) coordinates to access the data. The transform (GetGeoTransform) converts between ...


1

Source of problem found. It turns out the GEOTIFF_CSV environmental variable was not set. In c#, the following code: OSGeo.GDAL.Gdal.SetConfigOption("GEOTIFF_CSV", Path.GetDirectoryName(Application.ExecutablePath) + @"\gdal-data"); makes a very big difference. Now the geoTransform contains the actual lat/long.



Only top voted, non community-wiki answers of a minimum length are eligible