Ticket #244 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

FDOGeometricType not exposed in DotNET API

Reported by: chrisErickson Owned by: gregboone
Priority: minor Milestone: 3.3.0
Component: FDO API Version: 3.2.0
Severity: 3 Keywords:
Cc: External ID:

Description

The FDOGeometricType enumeration is not exposed in the Managed API.

Change History

Changed 5 years ago by chrisErickson

As an addition to this, when passing Enumerations that are bitwise in a DotNet? API, you can still use the Enum name in the signature rather than casting it to an int. This makes the API much more friendly, especially when there are similarly named enumerations.

For instance: with a given enum of:

public enum GeometricType? {

GeometricType?_Point = 1, GeometricType?_Curve = 2, GeometricType?_Surface = 4, GeometricType?_Solid = 8,

}

The signature for int GeometricPropertyDefinition::GeometryTypes? could be: GeometryType? GeometricPropertyDefinition::GeometryTypes?

and GeometryTypes? can return GeometricType?_Solid | GeometricType?_Surface

Similarly, void GeometricPropertyDefinition::set_SpecificGeometryTypes(GeometryType?[] types, int length) could be void GeometricPropertyDefinition::set_SpecificGeometryTypes(GeometryType? types)

and the user could hand in GeometricPropertyDefinition::set_SpecificGeometryTypes(GeometricType?_Solid | GeometricType?_Surface)

Changed 5 years ago by gregboone

  • status changed from new to closed
  • resolution set to invalid

The GeometricType Enumeration is currently defined in the FDO 3.3.0 Managed API as...

enum OSGeo::FDO::Schema::GeometricType

in file...

[trunk]\Fdo\Managed\Src\OSGeo\FDO\Schema\mgGeometricType.h

as follows...

/// \ingroup (OSGeoFDOSchema)
/// \brief
/// The GeometricType enumeration categorizes all of the geometry types
/// supported by FDO based on their geometric dimensionality.
public __value enum GeometricType
{
    /// Represents 0-dimensional geometric primitives, such as Points.
    GeometricType_Point = 0x01,

    /// Represents 1 dimensional geometric primitives, such as Curves and Lines.
    GeometricType_Curve = 0x02,

    /// Represents 2 dimensional geometric primitives, such as Polygons.
    GeometricType_Surface = 0x04,

    /// Represents 3 dimensional geometric primitives, such as Cubes.
    GeometricType_Solid = 0x08,

    /// All
    GeometricType_All = 0x01|0x02|0x04|0x08
};

Usage:

GeometricPropertyDefinition pGeomProp = new GeometricPropertyDefinition("Geometry", "location and shape");
pGeomProp.GeometryTypes = GeometricType.GeometricType_All;
pGeomProp.HasMeasure = true;
pGeomProp.ReadOnly = true;
pGeomProp.SpatialContextAssociation = "SC_0";
pGeomProp.Attributes.Add("Measure Units", "metres");
pDevClass.Properties.Add(pGeomProp);

Changed 5 years ago by crispinatime

Hi,

I am using FDO 3.3 RC1 in .net and cannot see the enum described?!

OSGeo.FDO.Schema.GeometricType?

Crispin

Changed 5 years ago by gregboone

  • status changed from closed to reopened
  • resolution invalid deleted

Ok. I see the issue. The enum is defined but not exported to the .NET Assembly.

Changed 5 years ago by gregboone

Author: gregboone Date: 2008-01-30 14:29:10 -0500 (Wed, 30 Jan 2008) New Revision: r3754

Modified:

trunk/Fdo/Managed/Src/OSGeo/FDO/mgObjectFactory.cpp

Log: Ticket #244: FDO GeometricType not exposed in Dot NET API

Changed 5 years ago by gregboone

  • status changed from reopened to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.