GIS by ESRI
®
Exploring ArcObjects
™
ArcObjects_titlepage.pmd 05/29/2003, 9:29 AM1
Copyright © 2001–2002 ESRI
All Rights Reserved.
Printed in the United States of America.
The information contained in this document is the exclusive property of
ESRI. This work is protected under United States copyright law and the
copyright laws of the given countries of origin and applicable international
laws, treaties, and/or conventions. No part of this work may be
reproduced or transmitted in any form or by any means, electronic or
mechanical, including photocopying or recording, or by any information
storage or retrieval system, except as expressly permitted in writing by
ESRI. All requests should be sent to Attention: Contracts Manager, ESRI,
380 New York Street, Redlands, California 92373-8100, USA.
The information contained in this document is subject to change without
notice.
Contributing Writers
Julio Andrade, Eleanor Blades, Patrick Brennan, Tom Brown,
Euan Cameron, Scott Campbell, Jillian Clark, Jim Clarke, Chris Davies,
Cory Eicher, Ryan Gatti, Shelly Gill, Erik Hoel, Melita Kennedy,
Allan Laframboise, Russell Louks, Keith Ludwig, Gary MacDougall,
Glenn Meister, Sud Menon, Jason Pardy, Bruce Payne, Ghislain Prince,
Sentha Shanmugam, Brad Taylor, Steve Van Esch, Aleta Vienneau,
Michael Waltuch, Steve Wheatley, Larry Young, Michael Zeiler
U.S. Government Restricted/Limited Rights
Any software, documentation, and/or data delivered hereunder is
subject to the terms of the License Agreement. In no event shall
the U.S. Government acquire greater than RESTRICTED/LIMITED
RIGHTS. At a minimum, use, duplication, or disclosure by the
U.S. Government is subject to restrictions as set forth in FAR
§52.227-14 Alternates I, II, and III (JUN 1987); FAR §52.227-19
(JUN 1987) and/or FAR §12.211/12.212 (Commercial Technical
Data/Computer Software); and DFARS §252.227-7015
(NOV 1995) (Technical Data) and/or DFARS §227.7202
(Computer Software), as applicable. Contractor/Manufacturer is ESRI,
380 New York Street, Redlands, California 92373-8100, USA.
PUBLISHED BY
ESRI
380 New York Street
Redlands, California 92373-8100
ESRI, ArcView, ArcIMS, SDE, and the ESRI globe logo are trademarks of
ESRI, registered in the United States and cer tain other countries;
registration is pending in the European Community. ArcObjects, ArcGIS,
ArcMap, ArcCatalog, ArcScene, ArcInfo, ArcEdit, ArcEditor,
ArcToolbox, 3D Analyst, ArcPress, ArcSDE, GIS by ESRI, and the
ArcGIS logo are trademarks and Geography Network, www.esri.com,
and @esri.com are service marks of ESRI.
Other companies and products mentioned herein are trademarks or
registered trademarks of their respective trademark owners.
ESRI
Exploring ArcObjects
Volume 1—Applications and cartography
ISBN: 1-58948-001-5 (Volume 1)
Volume 2—Geographic Data Management
ISBN: 1-58948-002-3 (Volume 2)
ISBN: 1-58948-000-7 (Set)
Untitled-2 7/24/02, 9:37 AM2
Contents
CHAPTER 1: INTRODUCING ARCOBJECTS ......................................................... 1
ArcObjects and the ArcGIS Desktop ............................................................................................ 2
Using this book ..................................................................................................................................... 3
ArcObjects Developer Help system ............................................................................................... 5
Reading object model diagrams ....................................................................................................... 6
Interpreting the object model diagrams ..................................................................................... 1 1
ESRI Object Browser ....................................................................................................................... 13
Getting started with VBA and ArcObjects............................................................................... 14
Top ArcObjects ........................................................................................................................................................24
ArcObjects problem-solving guide .............................................................................................. 56
CHAPTER 2: DEVELOPING WITH ARCOBJECTS .............................................. 7 5
The Microsoft Component Object Model ............................................................................... 76
Developing with ArcObjects and COM ................................................................................... 8 9
The Visual Basic environment ...................................................................................................... 100
Visual Basic for Applications ........................................................................................................ 114
The Visual Basic development environment ............................................................................ 120
Visual Basic developer add-ins .................................................................................................... 128
Visual C++ ......................................................................................................................................... 140
Active Template Library .................................................................................................................164
Packing and deploying customizations ..................................................................................... 176
Bibliography ...................................................................................................................................... 179
Java ...................................................................................................................................................... 1 81
CHAPTER 3: SYSTEM OBJECTS ................................................................................ 187
CHAPTER 4: SHAPING FEATURES WITH GEOMETRY .................................. 205
Introduction to geometry ............................................................................................................ 208
Geometry abstract class ............................................................................................................... 213
Geometry error constants ...........................................................................................................216
Curve abstract class....................................................................................................................... 217
Polycurve abstract class ................................................................................................................ 220
Polyline coclass ................................................................................................................................ 223
Polygon coclass ................................................................................................................................ 225
Path class ........................................................................................................................................... 228
Ring coclass ...................................................................................................................................... 230
Segment abstract class .................................................................................................................. 2 31
Line coclass .......................................................................................................................................235
CircularArc coclass .........................................................................................................................236
EllipticArc coclass ............................................................................................................................241
BezierCurve coclass ....................................................................................................................... 244
Multipoint coclass ...........................................................................................................................246
Point coclass ..................................................................................................................................... 248
Envelope coclass ............................................................................................................................. 252
GeometryEnvironment coclass ...................................................................................................255
GeometryBag coclass .....................................................................................................................258
Geometry collection interfaces ...................................................................................................260
Geometry attributes ...................................................................................................................... 268
TOC.pmd 6/22/2003, 3:28 PM3
iv • Exploring ArcObjects
Spatial operators ............................................................................................................................. 272
IRelationalOperator interface ..................................................................................................... 277
IProximityOperator interface ..................................................................................................... 2 78
ITransform2D interface................................................................................................................. 279
ITransform3D interface................................................................................................................. 280
AffineTransformation2D coclass ................................................................................................ 281
MultiPatch coclass ..........................................................................................................................285
TriangleFan coclass ......................................................................................................................... 289
TriangleStrip coclass ....................................................................................................................... 290
Vector3D coclass ............................................................................................................................ 291
Ray and Sphere coclasses ............................................................................................................. 293
Introduction to spatial reference...............................................................................................297
SpatialReferenceInfo abstract class ........................................................................................... 302
ESRISpatialReferenceInfo abstract class .................................................................................. 303
SpatialReferenceEnvironment coclass ...................................................................................... 305
Domain and coordinate precision .............................................................................................311
SpatialReference abstract class ................................................................................................... 313
GeographicCoordinateSystem coclass ..................................................................................... 315
Datum and Spheroid coclasses ...................................................................................................319
PrimeMeridian coclass.................................................................................................................... 321
AngularUnit and LinearUnit coclasses ......................................................................................322
ProjectedCoordinateSystem coclass ......................................................................................... 324
Parameter coclass ........................................................................................................................... 327
Projection coclass ........................................................................................................................... 329
UnknownCoordinateSystem coclass ........................................................................................ 331
Geographic Transformations using ArcObjects ..................................................................... 332
GeoTransformation abstract class .............................................................................................333
GeocentricTranslation coclass ....................................................................................................334
Molodensky transformation coclasses ...................................................................................... 336
Coordinate frame and position vector transformations..................................................... 337
LongitudeRotationTransformation coclass ............................................................................. 338
GridTransformation coclasses .....................................................................................................339
CompositeGeoTransformation coclass .................................................................................... 341
GeoTransformationOperationSet coclass ............................................................................... 343
Performing on-the-fly geotransformations ............................................................................. 345
The geometry model project method ...................................................................................... 349
spatial reference tips ...................................................................................................................... 351
CHAPTER 5: DISPLAYING GRAPHICS................................................................... 353
Feature renderer overview ........................................................................................................... 3 55
FeatureRenderer abstract class ..................................................................................................356
LegendGroup and LegendClass coclasses ...............................................................................358
SimpleRenderer coclass .................................................................................................................360
ClassBreaksRenderer coclass ....................................................................................................... 363
UniqueValueRenderer coclass ..................................................................................................... 367
ProportionalSymbolRenderer coclass ....................................................................................... 370
ChartRenderer coclass ................................................................................................................. 373
DotDensityRenderer coclass .......................................................................................................376
BiUniqueValueRenderer coclass ................................................................................................. 378
ScaleDependentRenderer coclass ..............................................................................................379
CalcRendererValues coclass ........................................................................................................380
Creating a custom renderer ........................................................................................................381
Creating a custom renderer property page ........................................................................... 383
Creating a custom symbol property page ............................................................................... 386
Color concepts................................................................................................................................ 388
TOC.pmd 6/22/2003, 3:28 PM4
Contents • v
Color abstract class .......................................................................................................................390
RGBColor and CMYKColor coclasses ..................................................................................... 392
HSVColor, HLSColor, and GrayColor coclasses ..................................................................... 393
ColorPalette coclass....................................................................................................................... 394
ColorBrowser coclass .................................................................................................................... 396
ColorSelector coclass .................................................................................................................... 397
MonitorSettings coclass ................................................................................................................ 398
CieLabConversion coclass ........................................................................................................... 399
ColorRamp abstract class ............................................................................................................ 400
AlgorithmicColorRamp coclass ...................................................................................................402
RandomColorRamp and PresetColorRamp coclasses ........................................................ 403
MultiPartColorRamp coclass .......................................................................................................405
GeometryDraw coclass ................................................................................................................. 410
SymbolSelector coclass .................................................................................................................. 411
SymbolEditor and SymbologyEnvironment coclasses .......................................................... 412
SimpleMarkerSymbol coclass ........................................................................................................415
ArrowMarkerSymbol coclass .......................................................................................................416
CharacterMarkerSymbol coclass ................................................................................................417
PictureMarkerSymbol coclass ......................................................................................................418
MultiLayerMarkerSymbol coclass ............................................................................................... 419
LineSymbol abstract class .............................................................................................................423
SimpleLineSymbol coclass .............................................................................................................. 424
CartographicLineSymbol coclass ................................................................................................ 425
Template coclass .............................................................................................................................. 4 27
LineDecoration coclass ................................................................................................................. 429
SimpleLineDecorationElement coclass ...................................................................................... 430
LineDecorationEditor coclass .....................................................................................................432
HashLineSymbol coclass ................................................................................................................ 433
MarkerLineSymbol coclass ............................................................................................................ 434
MultiLayerLineSymbol coclass .....................................................................................................435
PictureLineSymbol coclass ............................................................................................................ 436
FillSymbol abstract class ................................................................................................................438
SimpleFillSymbol coclass ................................................................................................................. 439
MarkerFillSymbol coclass ............................................................................................................... 440
PictureFillSymbol coclass ............................................................................................................... 4 41
LineFillSymbol coclass ..................................................................................................................... 442
GradientFillSymbol coclass ........................................................................................................... 443
MultiLayerFillSymbol coclass ........................................................................................................ 444
DotDensityFillSymbol coclass ...................................................................................................... 445
TextSymbol coclass .........................................................................................................................448
FontSize coclass ............................................................................................................................... 453
Text path coclasses ........................................................................................................................ 454
TextBackground abstract class ................................................................................................... 456
MarkerTextBackground coclass.................................................................................................. 457
Callout coclasses .............................................................................................................................458
TextSymbolEditor and TextBackGroundEditor .....................................................................461
3DChartSymbol abstract class ................................................................................................... 463
BarChartSymbol coclass ............................................................................................................... 465
PieChartSymbol coclass ................................................................................................................ 466
StackedChartSymbol coclass .......................................................................................................467
ChartSymbolEditor coclass ..........................................................................................................468
DisplayTransformation coclass ....................................................................................................476
Display application patterns ........................................................................................................ 478
Classify abstract class .................................................................................................................... 484
EqualInterval and DefinedInterval coclasses .......................................................................... 487
TOC.pmd 6/22/2003, 3:28 PM5
- 1
- 2
前往页