[fdo-users] Shape file Extents

Traian Stanev traian.stanev at autodesk.com
Mon Oct 13 23:55:15 EDT 2008

Are you using the C++ API or C# or? Generally you would use a SelectAggregates command with the SpatialExtents() function added to its list of properties to compute. In C++, it's something like this:

    FdoPtr<FdoISelectAggregates> agg = (FdoISelectAggregates*)con->CreateCommand(FdoCommandType_SelectAggregates);
    FdoPtr<FdoIdentifierCollection> props = agg->GetPropertyNames();

    FdoPtr<FdoExpression> exp = FdoExpression::Parse(L"SpatialExtents(GEOMETRY)");
    FdoPtr<FdoComputedIdentifier> se = FdoComputedIdentifier::Create(L"Extents", exp);

    FdoPtr<FdoIDataReader> extrdr = agg->Execute();

    FdoPtr<FdoByteArray> ba = extrdr->GetGeometry(L"Extents");
    //ba contains the extents polygon, in FGF array form, use FdoIGeometry APIs to get the numbers out of it.

In C# it's similar, but I don't have a code snippet lying around.


From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Shaik Esu
Sent: Monday, October 13, 2008 11:46 PM
To: 'FDO Users Mail List'
Subject: [fdo-users] Shape file Extents

Hi all,

I am using FDO technology to work on Shape file.

I want to get the Extents (bounds) of a particular shape file. Please help me in this regards

 Thank You,

Shaik Esu,
Sr Software Engineer,
Infotech Enterprises Ltd,
Extn: 740.
Mobile +91 9849538712.

More information about the fdo-users mailing list