1 / 6

Arc: Getting Data

Arc: Getting Data. Dr Andy Evans. Getting Data/Features from Layers. Assign your Layer to an appropriate Interface. IGeoFeatureLayer : Treat as geographical data IFeatureLayer : Treat as a general Layer IAttributeTable : Treat as an attribute table

anaya
Télécharger la présentation

Arc: Getting Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Arc: Getting Data Dr Andy Evans

  2. Getting Data/Features from Layers Assign your Layer to an appropriate Interface. IGeoFeatureLayer: Treat as geographical data IFeatureLayer: Treat as a general Layer IAttributeTable: Treat as an attribute table Get the Attribute Table or search the Layer.

  3. Getting data Once we have our Layer, we want to get data from it. Map AttributeTable Layer Feature 234 Values

  4. Getting the Attribute Table Assuming we have a Layer Enumeration, we set the Layer to an IAttributeTable. import com.esri.arcgis.geodatabase.*; IAttributeTablepAttributeTable = (IAttributeTable) enumLayer.next(); ITable table = pAttributeTable.getAttributeTable(); IRowrow = null; for (int i = 1; i <= table.rowCount(null); i++) { row = table.getRow(i); int index = table.findField("School"); Object value = row.getValue(index); }

  5. Get Layer as AttributeTable Get actual Table Get each row Get a particular Field Getting the Attribute Table IAttributeTablepAttributeTable = (IAttributeTable) enumLayer.next(); ITable table = pAttributeTable.getAttributeTable(); IRowrow = null; for (int i = 1; i <= table.rowCount(null) ; i++) { row = table.getRow(i); int index = table.findField("School"); Object value = row.getValue(index); }

  6. Getting data Alternative is to get data from a Feature. Map AttributeTable Layer Feature 234 Values First though, we need to get only the features we are interested in. We can search for these.

More Related