Arc: Getting Data - PowerPoint PPT Presentation

About This Presentation
Title:

Arc: Getting Data

Description:

Title: 1. Intriduction to Java Programming for Beginners, Novices, Geographers and Complete Idiots Author: Stan Openshaw Last modified by: Linus Created Date – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 7
Provided by: StanO153
Category:
Tags: arc | data | features | getting | linus

less

Transcript and Presenter's Notes

Title: Arc: Getting Data


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
FID Data
1 234
2 875
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.
  • IAttributeTable pAttributeTable
  • (IAttributeTable) enumLayer.next()
  • ITable table pAttributeTable.getAttributeTable()
  • IRow row null
  • for (int i 1 i lt table.rowCount(null) i)
  • row table.getRow(i)
  • int index table.findField("School")
  • Object value row.getValue(index)

5
Getting the Attribute Table
IAttributeTable pAttributeTable
(IAttributeTable) enumLayer.next()
ITable table pAttributeTable.getAttributeTable
() IRow row null for (int i
1 i lt 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
FID Data
1 234
2 875
Layer
Feature
234
Values
First though, we need to get only the features we
are interested in. We can search for these.
Write a Comment
User Comments (0)
About PowerShow.com