Programování pro (Arc)GIS VI KMA/AGI Karel Jedlička [email protected] http://www.kma.zcu.cz/Jedlicka Vznik materiálu byl podpořen z projektu FRVŠ č. 584/2011 (Osnova) • • • • • • Geometrické AO Ukázka práce s geometrií Ukázka tříd pro atributy Zadání druhé seminární práce Tool DockableWindow ArcObjects a geometrie • Working with geometry – About geometry objects • The vector representations of geometries are used by the geodatabase and graphic element systems to define the shapes of features and graphics. The Geometry library provides operations that are used by the editor and map symbology systems to define and symbolize features. • The top level geometries supported by the Geometry library that have constraints on their shapes are Points, Multipoints, Polylines, Polygons, and MultiPatches. ArcObjects a geometrie • Geometry – Point • A Point object is a two-dimensional point, optionally with M, Z, and ID attributes. ArcObjects a geometrie • Geometry – Multipoint • A Multipoint object is an ordered collection of points that optionally has M, Z, and ID attributes. • The IPointCollection interface implemented by a Multipoint object provides direct access to its point elements. This is different than how IPointCollection behaves when that interface is used to provide access to the vertices of a polyline or polygon. In that case, you are working with copies of the points. • The following examples illustrate how to create a multipoint geometry: – How to create a multipoint – How to create a multipoint object from the vertices of a polyline ArcObjects a geometrie • Geometry – Polyline A Polyline object is an ordered collection of paths that optionally has M, Z, and ID attributes. The IPointCollection interface on Polyline manipulates copies of its vertices. – Use the IGeometryCollection interface to directly access its paths and the ISegmentCollection interface to directly access its segments. – The IPointCollection and ISegmentCollection interfaces are also available on Path objects and are characterized the same way. – The polyline structure is shown in the following diagram. ArcObjects a geometrie • Geometry – Polyline A Polyline object is an ordered collection of paths that optionally has M, Z, and ID attributes. The IPointCollection interface on Polyline manipulates copies of its vertices. – Use the IGeometryCollection interface to directly access its paths and the ISegmentCollection interface to directly access its segments. – The IPointCollection and ISegmentCollection interfaces are also available on Path objects and are characterized the same way. – The polyline structure is shown in the following diagram. ArcObjects a geometrie • Geometry – Polygon • A Polygon object is a collection of rings ordered by their containment relationship; optionally has M, Z, and ID attributes. Each ring is a collection of segments. The IPointCollection interface on Polygon and Ring manipulates copies of vertices. Use the IGeometryCollection and ISegmentCollection interfaces to access rings and segments directly. • The polygon structure is shown in the following diagram. ArcObjects a geometrie • Geometry – Polygon • A Polygon object is a collection of rings ordered by their containment relationship; optionally has M, Z, and ID attributes. Each ring is a collection of segments. The IPointCollection interface on Polygon and Ring manipulates copies of vertices. Use the IGeometryCollection and ISegmentCollection interfaces to access rings and segments directly. • The polygon structure is shown in the following diagram. ArcObjects a geometrie • Geometry – MultiPatch • The MultiPatch geometry type was initially developed to address the needs for a three-dimensional (3D) polygon geometry type— unconstrained by two-dimensional (2D) validity rules. Without eliminating the constraints that rule out vertical walls, for example, representing extruded 2D lines and footprint-polygons for 3D visualization would not be possible. In addition to eliminating 2D constraints, MultiPatches provide more control over polygon face orientations, and a better definition of polygon face interiors. • Since ArcGIS version 9.0, MultiPatches have also been extended to provide advanced geometric representations for 3D features. These complex 3D objects can be part of a Synthetic Landscape Model, stored in a geodatabase. The target of these extensions is improved visualization quality. ArcObjects a geometrie • Creating geometries – – – – – – How to create a multipoint How to create a multipoint using the ConstructIntersectionEx method How to create a multipoint object from the vertices of a polyline How to create a polyline How to create a multipart polyline How to create a polygon – – – – – – How to build a polygon using segments and points How to create a union of several polygons How to create a multipatch using a series of triangles Geodetic curve support in the ArcObjects Geometry API How to work with IExtrude Working with vertical polyline segments ArcObjects a geometrie • Modyfying geometries – – – – – – – How to add point IDs to a polyline How to modify a specific segment of a polyline How to modify a specific vertex of a polyline Calling the Simplify method Simplifying a geometry How to find the combined extent of two geometries How to use the IAffineTransformation2D project and MoveOrigin methods • Cvičení ArcObjects a geometrie • Ukázka práce s geometrií – Ask google „accessing feature geometry arcobjects sample “ – Výpis X, Y souřadnice bodů: • • • • • • • IMxDocument ILayer IFeatureLayer IFeatureClass IFeature IGeometry IPoint Zdroje • Všechny použité zdroje jsou k dispozici on-line a jsou dostupné přímo formou odkazů z jednotlivých snímků
© Copyright 2025 Paperzz