Tag Info

Hot answers tagged

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

For C# NetTopologySuite is a great option. It's one of the children of the JavaTopologySuite, father of GEOS, Shapely, JSTS, ffi-geos... and maybe Thorin too. I haven't tested on a real SQL Server database, but you could use it like this: MsSql2008GeometryReader geometryReader = new MsSql2008GeometryReader(); MsSql2008GeometryWriter geometryWriter = new ...


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); ...


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.


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(); ...



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