// // ogis-simple.idl // // Taken from the PDF document _OpenGIS(R) Simple Features // Specification For CORBA_, Revision 1.1, dated June 2, 1999. // // Minor modifications made to restore readability after extraction // from the PDF document and to satisfy the TAO 1.4.6 IDL compiler. // // The aforementioned specification contains the following copyright // claims: // // Copyright 1997, 1998, 1999 Bentley Systems, Inc. // Copyright 1997, 1998, 1999 Environmental Systems Research Institute // Copyright 1997, 1998, 1999 Genasys II, Inc. // Copyright 1997, 1998, 1999 Oracle Corporation // Copyright 1997, 1998, 1999 University of California, Los Angeles. // Copyright 1997, 1998, 1999 Sun Microsystems, Inc. // // See the aforementioned specification for disclaimers and more // information. // // // Chuck Taylor, September 20, 2005. // // #ifndef _OGIS_SIMPLE_IDL_ #define _OGIS_SIMPLE_IDL_ #include module OGIS { //---------------------------------------------------------------------- // Forward declarations of interfaces //---------------------------------------------------------------------- interface Geometry; // forward declarations interface FeaturePropertySetIterator; interface FeatureType; interface PropertyDefIterator; interface FeatureIterator; interface QueryResultSetIterator; //---------------------------------------------------------------------- // Common structures //---------------------------------------------------------------------- typedef sequence FeatureTypeSeq; typedef string Istring; typedef sequence IStringSeq; typedef sequence OctetSeq; struct Decimal { long precision; long scale; OctetSeq value; }; // Structure to describe name-value pairs struct NVPair { Istring name; // name is a string any value; // value is an ’any’ type }; typedef sequence NVPairSeq; struct PropertyDef { Istring name; CORBA::TypeCode type; boolean required; }; typedef sequence PropertyDefSeq; struct FeatureData { FeatureType type; NVPairSeq props; }; typedef sequence FeatureDataSeq; //---------------------------------------------------------------------- // Well-known Structures //---------------------------------------------------------------------- struct WKSPoint { double x; double y; }; typedef sequence WKSPointSeq; typedef sequence WKSLineString; typedef sequence WKSLineStringSeq; typedef sequence WKSLinearRing; typedef sequence WKSLinearRingSeq; struct WKSLinearPolygon { WKSLinearRing externalBoundary; WKSLinearRingSeq internalBoundaries; }; typedef sequence WKSLinearPolygonSeq; enum WKSType { WKSPointType,WKSMultiPointType, WKSLineStringType, WKSMultiLineStringType, WKSLinearRingType, WKSLinearPolygonType, WKSMultiLinearPolygonType, WKSCollectionType }; union WKSGeometry // near-equivalent to the ’CoordinateGeometry of the // spec’ switch (WKSType) { case WKSPointType: WKSPoint point; case WKSMultiPointType: WKSPointSeq multi_point; case WKSLineStringType: WKSLineString line_string; case WKSMultiLineStringType: WKSLineStringSeq multi_line_string; case WKSLinearRingType: WKSLinearRing linear_ring; case WKSLinearPolygonType: WKSLinearPolygon linear_polygon; case WKSMultiLinearPolygonType: WKSLinearPolygonSeq multi_linear_polygon; case WKSCollectionType: sequence collection; }; struct Envelope { WKSPoint minm; WKSPoint maxm; }; //---------------------------------------------------------------------- // Feature Interface //---------------------------------------------------------------------- interface Feature { exception InvalidParams {string why;}; exception PropertyNotSet {}; // Property does not exist. exception InvalidProperty {}; // Not a valid property for the given // feature. exception InvalidValue {}; // value is not valid for property exception InvalidConversion {}; exception RequiredProperty {}; // property is required for the given // feature // feature type readonly attribute FeatureType feature_type; // geometry Geometry get_geometry (in NVPairSeq geometry_context) raises (InvalidParams); // generic property methods to get/set property values boolean property_exists(in Istring name) raises(InvalidProperty); any get_property(in Istring name) raises (PropertyNotSet,InvalidProperty); void set_property(in Istring name, in any value) raises(InvalidProperty, InvalidValue); void delete_property(in Istring name) raises (PropertyNotSet, InvalidProperty, RequiredProperty); // accessing property values by property names string get_string_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); float get_float_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); double get_double_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); long get_long_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); short get_short_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); boolean get_boolean_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); Decimal get_decimal_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); OctetSeq get_byte_stream_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); Geometry get_geometry_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); WKSGeometry get_wksgeometry_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); OctetSeq get_wkbgeometry_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); NVPairSeq get_property_sequence(in unsigned long n); FeaturePropertySetIterator get_property_iterator(); void destroy(); }; typedef sequence FeatureSeq; //---------------------------------------------------------------------- // FeaturePrepertySetIterator Interface //---------------------------------------------------------------------- interface FeaturePropertySetIterator { exception IteratorInvalid {}; // Get next NVPair structure boolean next(out NVPair the_pair) raises (IteratorInvalid); // Get next "n" NVPair structures. boolean next_n(in unsigned long n, out NVPairSeq n_pairs) raises (IteratorInvalid); // Discard the iterator void destroy(); // reset the iterator void reset() raises (IteratorInvalid); }; //---------------------------------------------------------------------- // FeatureFactory Interface //---------------------------------------------------------------------- interface FeatureFactory { exception FeatureTypeInvalid {string why;}; exception PropertiesInvalid {string why;}; Feature create_feature(in FeatureType type, in NVPairSeq properties) raises (FeatureTypeInvalid, PropertiesInvalid); FeatureSeq create_features(in FeatureDataSeq features) raises (FeatureTypeInvalid, PropertiesInvalid); }; //---------------------------------------------------------------------- // FeatureType Interface //---------------------------------------------------------------------- interface FeatureType { exception InheritanceUnsupported {}; exception PropertyDefInvalid {}; // feature type name readonly attribute Istring name; // feature type parents FeatureTypeSeq get_parents() raises (InheritanceUnsupported); // feature type children FeatureTypeSeq get_children() raises (InheritanceUnsupported); // definition of properties for this feature type boolean property_def_exists(in Istring name); PropertyDef get_property_def(in Istring name) raises(PropertyDefInvalid); PropertyDefSeq get_property_def_sequence(in long levels, in unsigned long n); PropertyDefIterator get_property_def_iterator (in long levels); void destroy(); }; // (Already defined above) // typedef sequence FeatureTypeSeq; //---------------------------------------------------------------------- // FeatureTypeFactory Interface //---------------------------------------------------------------------- interface FeatureTypeFactory { exception InvalidParams {string why;}; FeatureType create(in string name, in PropertyDefSeq schema, in FeatureTypeSeq parents) raises(InvalidParams); }; //---------------------------------------------------------------------- // PropertyDefIterator Interface //---------------------------------------------------------------------- interface PropertyDefIterator { exception IteratorInvalid {}; // Get next PropertyDef structure boolean next(out PropertyDef schema_property) raises (IteratorInvalid); // Get next "n" PropertyDef structures boolean next_n(in unsigned long n, out PropertyDefSeq schema_properties) raises (IteratorInvalid); // Discard the iterator void destroy(); // reset the iterator void reset() raises (IteratorInvalid); }; //---------------------------------------------------------------------- // FeatureCollection Interface //---------------------------------------------------------------------- interface FeatureCollection : Feature { exception IteratorInvalid {}; exception PositionInvalid {}; exception FeatureInvalid {string why;}; exception PropertiesInvalid {string why;}; readonly attribute long number_features; FeatureTypeSeq supported_feature_types(); void add_element (in Feature element) raises (FeatureInvalid); void merge (in FeatureCollection elements) raises (FeatureInvalid); void insert_element_at (in Feature element, in FeatureIterator where) raises (FeatureInvalid, IteratorInvalid); void replace_element_at (in Feature element, in FeatureIterator where) raises (FeatureInvalid, IteratorInvalid, PositionInvalid); void remove_element_at (in FeatureIterator where) raises (IteratorInvalid, PositionInvalid); void remove_all_elements (); Feature retrieve_element_at (in FeatureIterator where) raises (IteratorInvalid, PositionInvalid); FeatureIterator create_iterator(); }; //---------------------------------------------------------------------- // FeatureCollectionFactory Interface //---------------------------------------------------------------------- interface FeatureCollectionFactory { exception FeatureTypeInvalid {string why;}; exception PropertyInvalid {string why;}; exception FeatureInvalid {string why;}; FeatureCollection create(in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureTypeSeq supported_feature_types) raises (FeatureTypeInvalid, PropertyInvalid); FeatureCollection createFromCollection(in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureTypeSeq supported_feature_types, in FeatureCollection collection) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); FeatureCollection createFromSequence(in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureTypeSeq supported_feature_types, in FeatureSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); }; //---------------------------------------------------------------------- // FeatureIterator Interface //---------------------------------------------------------------------- interface FeatureIterator { exception IteratorInvalid {}; exception PositionInvalid {}; exception FeatureNotAvailable {}; exception InvalidConversion {}; exception InvalidProperty {}; exception PropertyNotSet {}; exception InvalidParameters {}; // iterating over features boolean next (out Feature the_feature) raises (IteratorInvalid, PositionInvalid, FeatureNotAvailable); boolean next_n (in short n, out FeatureSeq the_features) raises (IteratorInvalid, PositionInvalid, FeatureNotAvailable); void advance () raises (IteratorInvalid, PositionInvalid); Feature current () raises (IteratorInvalid, PositionInvalid, FeatureNotAvailable); // accessing current feature via ‘Feature’-like methods FeatureType get_feature_type(); Geometry get_geometry(in NVPairSeq geometry_context) raises (InvalidParameters); boolean property_exists(in Istring name) raises(InvalidProperty); any get_property(in Istring name) raises (PropertyNotSet, InvalidProperty); string get_string_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); float get_float_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); double get_double_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); long get_long_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); short get_short_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); boolean get_boolean_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); Decimal get_decimal_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); OctetSeq get_byte_stream_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); Geometry get_geometry_by_name(in Istring propertyName) raises (PropertyNotSet, InvalidProperty); WKSGeometry get_wksgeometry_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); OctetSeq get_wkbgeometry_by_name(in Istring propertyName) raises (InvalidConversion, InvalidProperty); NVPairSeq get_property_sequence(in unsigned long n); FeaturePropertySetIterator get_property_iterator(); void reset() raises (IteratorInvalid); boolean more(); void destroy(); }; //---------------------------------------------------------------------- // ContainerFeatureCollection Interface //---------------------------------------------------------------------- interface ContainerFeatureCollection : FeatureCollection, FeatureFactory { }; //---------------------------------------------------------------------- // ContainerFeatureCollectionFactory Interface //---------------------------------------------------------------------- interface ContainerFeatureCollectionFactory { exception FeatureTypeInvalid {string why;}; exception PropertyInvalid {string why;}; exception FeatureInvalid {string why;}; ContainerFeatureCollection create(in FeatureType collection_type, in NVPairSeq collection_properties) raises (FeatureTypeInvalid, PropertyInvalid); ContainerFeatureCollection createFromCollection( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureCollection collection) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); ContainerFeatureCollection createFromSequence( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); ContainerFeatureCollection createFromFeatureData( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureDataSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); }; //---------------------------------------------------------------------- // Queryable Collection Interfaces //---------------------------------------------------------------------- //---------------------------------------------------------------------- // QueryEvaluator Interface //---------------------------------------------------------------------- interface QueryableFeatureCollection; // forward declaration interface QueryEvaluator { exception QueryLanguageTypeNotSupported {}; exception InvalidQuery {string why;}; exception QueryProcessingError {string why;}; exception InvalidGeometry {string why;}; exception InvalidSpatialOperator {}; enum QLType { SQLQuery, SQL_92Query, OQL, OQLBasic, OQL_93, OQL_93Basic }; typedef sequence QLTypeSeq; enum SpatialOperatorType { TouchOp, ContainsOp, WithinOp, DisjointOp, CrossesOp, OverlapsOp, IntersectsOp }; readonly attribute QLTypeSeq ql_types; readonly attribute QLType default_ql_type; enum GeomSwitch { GeomType, WKSGeomType }; union QueryGeom switch ( GeomSwitch ) { case GeomType: Geometry geom; case WKSGeomType: WKSGeometry wks_geom; }; struct GeomConstraint { Istring geom_name; SpatialOperatorType spatial_op; QueryGeom geo; }; typedef sequence GeomConstraintSeq; QueryableFeatureCollection query( in string where_clause, in QLType ql_type, in GeomConstraintSeq geom_constraints ) raises(QueryLanguageTypeNotSupported, InvalidQuery, InvalidGeometry, QueryProcessingError, InvalidSpatialOperator); }; //---------------------------------------------------------------------- // QueryableFeatureCollection Interface //---------------------------------------------------------------------- interface QueryableFeatureCollection : FeatureCollection, QueryEvaluator { }; //---------------------------------------------------------------------- // QueryableFeatureCollectionFactory Interface //---------------------------------------------------------------------- interface QueryableFeatureCollectionFactory { exception FeatureTypeInvalid {string why;}; exception PropertyInvalid {string why;}; exception FeatureInvalid {string why;}; QueryableFeatureCollection create(in FeatureType collection_type, in NVPairSeq collection_properties) raises (FeatureTypeInvalid, PropertyInvalid); QueryableFeatureCollection createFromCollection( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureCollection collection) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); QueryableFeatureCollection createFromSequence( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); QueryableFeatureCollection createFromFeatureData( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureDataSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); }; //---------------------------------------------------------------------- // QueryableContainerFeatureCollection Interface //---------------------------------------------------------------------- interface QueryableContainerFeatureCollection: ContainerFeatureCollection, QueryEvaluator { }; //---------------------------------------------------------------------- // QueryableContainerFeatureCollectionFactory Interface //---------------------------------------------------------------------- interface QueryableContainerFeatureCollectionFactory { exception FeatureTypeInvalid {string why;}; exception PropertyInvalid {string why;}; exception FeatureInvalid {string why;}; QueryableContainerFeatureCollection create( in FeatureType collection_type, in NVPairSeq collection_properties) raises (FeatureTypeInvalid, PropertyInvalid); QueryableContainerFeatureCollection createFromCollection( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureCollection collection) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); QueryableContainerFeatureCollection createFromSequence( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); QueryableContainerFeatureCollection createFromFeatureData( in FeatureType collection_type, in NVPairSeq collection_properties, in FeatureDataSeq list) raises (FeatureTypeInvalid,PropertyInvalid,FeatureInvalid); }; //---------------------------------------------------------------------- // Spatial Reference Systems //---------------------------------------------------------------------- //---------------------------------------------------------------------- // SpatialReferenceInfo //---------------------------------------------------------------------- interface SpatialReferenceInfo { attribute string name; attribute string authority; attribute long code; attribute string alias; attribute string abbreviation; attribute string remarks; readonly attribute string well_known_text; }; //---------------------------------------------------------------------- // Unit interface //---------------------------------------------------------------------- interface Unit : SpatialReferenceInfo { }; //---------------------------------------------------------------------- // AngularUnit interface //---------------------------------------------------------------------- interface AngularUnit : Unit { attribute double radians_per_unit; }; //---------------------------------------------------------------------- // LinearUnit interface //---------------------------------------------------------------------- interface LinearUnit : Unit { attribute double metres_per_unit; }; //---------------------------------------------------------------------- // Ellipsoid interface //---------------------------------------------------------------------- interface Ellipsoid : SpatialReferenceInfo { attribute double semi_major_axis; attribute double semi_minor_axis; attribute double inverse_flattening; attribute LinearUnit axis_unit; }; //---------------------------------------------------------------------- // HorizontalDatum interface //---------------------------------------------------------------------- interface HorizontalDatum : SpatialReferenceInfo { attribute Ellipsoid base_ellipsoid; }; //---------------------------------------------------------------------- // PrimeMeridian interface //---------------------------------------------------------------------- interface PrimeMeridian : SpatialReferenceInfo { attribute double longitude; attribute AngularUnit angular_units; }; //---------------------------------------------------------------------- // SpatialReferenceSystem interface //---------------------------------------------------------------------- interface SpatialReferenceSystem : SpatialReferenceInfo { }; //---------------------------------------------------------------------- // GeodeticSpatialReferenceSystem interface //---------------------------------------------------------------------- interface GeodeticSpatialReferenceSystem : SpatialReferenceSystem { }; //---------------------------------------------------------------------- // GeographicCoordinateSystem interface //---------------------------------------------------------------------- interface GeographicCoordinateSystem : GeodeticSpatialReferenceSystem { attribute string usage; // description? attribute HorizontalDatum horizontal_datum; attribute AngularUnit angular_unit; attribute PrimeMeridian prime_meridian; }; //---------------------------------------------------------------------- // Parameter interface //---------------------------------------------------------------------- interface Parameter : SpatialReferenceInfo { attribute Unit units; attribute double value; }; typedef sequence ParameterSeq; //---------------------------------------------------------------------- // ParameterList interface //---------------------------------------------------------------------- interface ParameterList { readonly attribute long number_parameters; ParameterSeq get_default_parameters(); void set_parameters (in ParameterSeq parameters); ParameterSeq get_parameters (); }; //---------------------------------------------------------------------- // GeographicTransform interface //---------------------------------------------------------------------- interface GeographicTransform : SpatialReferenceInfo { attribute GeographicCoordinateSystem source_gcs; attribute GeographicCoordinateSystem target_gcs; WKSGeometry forward (in WKSGeometry source_geometry); WKSGeometry inverse (in WKSGeometry source_geometry); }; //---------------------------------------------------------------------- // Projection interface //---------------------------------------------------------------------- interface Projection : SpatialReferenceInfo { readonly attribute string usage; readonly attribute string classification; WKSGeometry forward (in WKSGeometry source_geometry); WKSGeometry inverse (in WKSGeometry source_geometry); readonly attribute ParameterList parameters; attribute AngularUnit angular_units; attribute LinearUnit linear_units; attribute Ellipsoid base_ellipsoid; }; //---------------------------------------------------------------------- // ProjectedCoordinateSystem interface //---------------------------------------------------------------------- interface ProjectedCoordinateSystem : GeodeticSpatialReferenceSystem { attribute string usage; attribute GeographicCoordinateSystem geographic_coordinate_system; attribute LinearUnit linear_units; attribute Projection base_projection; readonly attribute ParameterList parameters; WKSGeometry forward (in WKSGeometry source_geometry); WKSGeometry inverse (in WKSGeometry source_geometry); }; //---------------------------------------------------------------------- // SpatialReferenceSystemFactory interface //---------------------------------------------------------------------- interface SpatialReferenceSystemFactory { SpatialReferenceSystem create_from_WKT (in string srs_wkt); }; //---------------------------------------------------------------------- // SpatialReferenceComponentFactory interface //---------------------------------------------------------------------- interface SpatialReferenceComponentFactory { readonly attribute string authority; ProjectedCoordinateSystem create_projected_coordinate_system ( in long code); GeographicCoordinateSystem create_geographic_coordinate_system ( in long code); Projection create_projection (in long code); GeographicTransform create_geographic_transform (in long code); HorizontalDatum create_horizontal_datum (in long code); Ellipsoid create_ellipsoid (in long code); PrimeMeridian create_prime_meridian (in long code); LinearUnit create_linear_unit (in long code); AngularUnit create_angular_unit (in long code); }; //---------------------------------------------------------------------- // Geometry interface //---------------------------------------------------------------------- interface Geometry { exception WKBNotImplemented {}; enum EgenhoferElement { Empty, NotEmpty, NoTest }; struct EgenhoferOperator { EgenhoferElement elements[3][3]; }; readonly attribute short dimension; // dimension of the geometry // - not the coordinate system readonly attribute Envelope range_envelope; // minBoundBox in abstract // spec readonly attribute SpatialReferenceSystem spatial_reference_system; // geometric characteristics boolean is_empty(); boolean is_simple(); boolean is_closed(); // constructive operators Geometry copy(); Geometry boundary(); Geometry buffer (in double distance); Geometry convex_hull(); // WKS operators WKSGeometry export(); // export geometry to WKS OctetSeq export_WKBGeometry() // export geometry to WKB raises (WKBNotImplemented); // relational operators boolean equals (in Geometry other); boolean touches (in Geometry other); boolean contains (in Geometry other); boolean within (in Geometry other); boolean disjoint (in Geometry other); boolean crosses (in Geometry other); boolean overlaps (in Geometry other); boolean intersects (in Geometry other); boolean relate (in Geometry other, in EgenhoferOperator operator); // metric operators double distance (in Geometry other); // set operators Geometry intersection (in Geometry other); Geometry union_op(in Geometry other); Geometry difference (in Geometry other); Geometry symmetric_difference (in Geometry other); void destroy(); }; //---------------------------------------------------------------------- // GeometryFactory interface //---------------------------------------------------------------------- interface GeometryFactory { exception InvalidWKS {string why;}; exception InvalidWKB {string why;}; exception WKBNotImplemented {}; Geometry create(in Geometry existing); Geometry create_from_WKS(in SpatialReferenceSystem srs, in WKSGeometry geo) raises (InvalidWKS); Geometry create_from_WKB(in SpatialReferenceSystem srs,in OctetSeq geo) raises (InvalidWKB, WKBNotImplemented); }; interface GeometryCollection; interface GeometryIterator; //---------------------------------------------------------------------- // GeometryCollection interface //---------------------------------------------------------------------- interface GeometryCollection : Geometry { exception IteratorInvalid {}; exception PositionInvalid {}; exception GeometryInvalid {}; readonly attribute long number_elements; // these operations allowing for arbitrary collections void add_element (in Geometry element) raises (GeometryInvalid); void merge (in GeometryCollection elements) raises (GeometryInvalid); void insert_element_at (in Geometry element, in GeometryIterator where) raises (GeometryInvalid, IteratorInvalid); void replace_element_at (in Geometry element, in GeometryIterator where) raises (GeometryInvalid, IteratorInvalid, PositionInvalid); void remove_element_at (in GeometryIterator where) raises (IteratorInvalid, PositionInvalid); void remove_all_elements (); // retrieve a geometry from a collection Geometry retrieve_element_at (in GeometryIterator where) raises (IteratorInvalid, PositionInvalid); // create an iterator over the collection GeometryIterator create_iterator(); }; //---------------------------------------------------------------------- // GeometryIterator interface //---------------------------------------------------------------------- interface GeometryIterator { exception IteratorInvalid {}; exception PositionInvalid {}; Geometry next () raises (IteratorInvalid, PositionInvalid); void reset() raises (IteratorInvalid); boolean more(); void destroy(); }; //---------------------------------------------------------------------- // Point interface //---------------------------------------------------------------------- interface Point : Geometry { attribute WKSPoint coordinates; }; //---------------------------------------------------------------------- // PointFactory interface //---------------------------------------------------------------------- interface PointFactory : GeometryFactory { exception InvalidWKSPoint {}; exception InvalidWKBPoint {}; Point create_from_Point(in Point existing); Point create_from_WKSPoint(in SpatialReferenceSystem srs, in WKSPoint geo) raises (InvalidWKSPoint); Point create_from_WKBPoint(in SpatialReferenceSystem srs, in OctetSeq geo) raises (InvalidWKBPoint, WKBNotImplemented); }; //---------------------------------------------------------------------- // MultiPoint interface //---------------------------------------------------------------------- interface MultiPoint : GeometryCollection { }; //---------------------------------------------------------------------- // MultiPointFactory interface //---------------------------------------------------------------------- interface MultiPointFactory : GeometryFactory { exception InvalidWKSMultiPoint {}; exception InvalidWKBMultiPoint {}; MultiPoint create_from_MultiPoint(in MultiPoint existing); MultiPoint create_from_WKSMultiPoint(in SpatialReferenceSystem srs, in WKSPointSeq geo) raises (InvalidWKSMultiPoint); MultiPoint create_from_WKBMultiPoint(in SpatialReferenceSystem srs, in OctetSeq geo) raises (InvalidWKBMultiPoint,WKBNotImplemented); }; //---------------------------------------------------------------------- // Curve interface //---------------------------------------------------------------------- interface Curve : Geometry { exception OutOfDomain {}; readonly attribute double length; readonly attribute Point start_point; readonly attribute Point end_point; readonly attribute WKSPoint start_point_as_WKS; readonly attribute WKSPoint end_point_as_WKS; boolean is_planar(); Point value (in double r) raises (OutOfDomain); WKSPoint value_as_WKS (in double r) raises (OutOfDomain); }; //---------------------------------------------------------------------- // LineString interface //---------------------------------------------------------------------- interface LineString : Curve { exception InvalidIndex{}; exception MinimumPoints{}; readonly attribute long num_points; Point get_point_by_index (in long index) raises (InvalidIndex); WKSPoint get_point_by_index_as_WKS (in long index) raises (InvalidIndex); void set_point_by_index (in WKSPoint new_point, in long index) raises (InvalidIndex); void set_point_by_index_with_WKS (in WKSPoint new_point, in long index) raises (InvalidIndex); void insert_point_by_index (in Point new_point, in long index) raises (InvalidIndex); void insert_point_by_index_with_WKS (in WKSPoint new_point, in long index) raises (InvalidIndex); void append_point (in Point new_point); void append_point_with_WKS (in WKSPoint new_point); void delete_point_by_index (in long index) raises (InvalidIndex, MinimumPoints); }; //---------------------------------------------------------------------- // LineStringFactory interface //---------------------------------------------------------------------- interface LineStringFactory : GeometryFactory { exception InvalidWKSLineString {}; exception InvalidWKBLineString {}; LineString create_from_LineString(in LineString existing); LineString create_from_WKSLineString (in SpatialReferenceSystem srs, in WKSLineString geo) raises (InvalidWKSLineString); LineString create_from_WKBLineString(in SpatialReferenceSystem srs, in OctetSeq geo) raises (InvalidWKBLineString,WKBNotImplemented); }; //---------------------------------------------------------------------- // Ring interface //---------------------------------------------------------------------- interface Ring : Curve { }; //---------------------------------------------------------------------- // LinearRing interface //---------------------------------------------------------------------- interface LinearRing : Ring, LineString { }; //---------------------------------------------------------------------- // MultiCurve interface //---------------------------------------------------------------------- interface MultiCurve : GeometryCollection { readonly attribute double length; }; //---------------------------------------------------------------------- // MultiLineString interface //---------------------------------------------------------------------- interface MultiLineString : MultiCurve { }; //---------------------------------------------------------------------- // MultiLineStringFactory interface //---------------------------------------------------------------------- interface MultiLineStringFactory : GeometryFactory { exception InvalidWKSMultiLineString {}; exception InvalidWKBMultiLineString {}; MultiLineString create_from_MultiLineString( in MultiLineString existing); MultiLineString create_from_WKSMultiLineString( in SpatialReferenceSystem srs, in WKSLineStringSeq geo) raises (InvalidWKSMultiLineString); MultiLineString create_from_WKBMultiLineString( in SpatialReferenceSystem srs, in OctetSeq geo) raises (InvalidWKBMultiLineString,WKBNotImplemented); }; //---------------------------------------------------------------------- // Surface interface //---------------------------------------------------------------------- interface Surface : Geometry { readonly attribute double area; readonly attribute Point centroid; readonly attribute WKSPoint centroid_as_WKS; readonly attribute Point point_on_surface; readonly attribute WKSPoint point_on_surface_as_WKS; boolean is_planar(); }; //---------------------------------------------------------------------- // Polygon interface //---------------------------------------------------------------------- interface Polygon : Surface { readonly attribute Ring exterior_ring; readonly attribute WKSGeometry exterior_ring_as_WKS; readonly attribute MultiCurve interior_rings; readonly attribute WKSGeometry interior_rings_as_WKS; }; //---------------------------------------------------------------------- // LinearPolygon interface //---------------------------------------------------------------------- interface LinearPolygon : Polygon { }; //---------------------------------------------------------------------- // LinearPolygonFactory interface //---------------------------------------------------------------------- interface LinearPolygonFactory : GeometryFactory { exception InvalidWKSLinearPolygon {}; exception InvalidWKBLinearPolygon {}; LinearPolygon create_from_LinearPolygon(in LinearPolygon existing); LinearPolygon create_from_WKSLinearPolygon( in SpatialReferenceSystem srs, in WKSLinearPolygon geo) raises (InvalidWKSLinearPolygon); LinearPolygon create_from_WKBLinearPolygon( in SpatialReferenceSystem srs, in OctetSeq geo) raises (InvalidWKBLinearPolygon,WKBNotImplemented); }; //---------------------------------------------------------------------- // MultiSurface interface //---------------------------------------------------------------------- interface MultiSurface : GeometryCollection { readonly attribute double area; }; //---------------------------------------------------------------------- // MultiPolygon interface //---------------------------------------------------------------------- interface MultiPolygon : MultiSurface { }; //---------------------------------------------------------------------- // MultiLinearPolygon interface //---------------------------------------------------------------------- interface MultiLinearPolygon : MultiPolygon { }; //---------------------------------------------------------------------- // MultiLinearPolygon interface //---------------------------------------------------------------------- interface MultiLinearPolygonFactory : GeometryFactory { exception InvalidWKSMultiLinearPolygon {}; exception InvalidWKBMultiLinearPolygon {}; MultiLinearPolygon create_from_MultiLinearPolygon( in MultiLinearPolygon existing); MultiLinearPolygon create_from_WKSMultiLinearPolygon( in SpatialReferenceSystem srs, in WKSLinearPolygonSeq geo) raises (InvalidWKSMultiLinearPolygon); MultiLinearPolygon create_from_WKBMultiLinearPolygon( in SpatialReferenceSystem srs, in OctetSeq geo) raises (InvalidWKBMultiLinearPolygon); }; }; // End OGIS Module #endif // _OGIS_SIMPLE_IDL_