[fdo-users] Shape file Extents
Shaik Esu
ShaikEsu at infotechsw.com
Mon Oct 13 23:58:40 EDT 2008
Hi Traian,
Thank You very much for your quick reply,
I am using C#.net. I know c++ also. I can convert this code to c#..
Thank You once again...
Regards,
Shaik Esu,
Sr Software Engineer,
Infotech Enterprises Ltd,
Extn: 740.
Mobile +91 9849538712.
-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org
[mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Traian Stanev
Sent: Tuesday, October 14, 2008 9:25 AM
To: 'FDO Users Mail List'
Subject: RE: [fdo-users] Shape file Extents
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);
agg->SetFeatureClassName(L"MyFeatureClass");
FdoPtr<FdoIdentifierCollection> props = agg->GetPropertyNames();
FdoPtr<FdoExpression> exp =
FdoExpression::Parse(L"SpatialExtents(GEOMETRY)");
FdoPtr<FdoComputedIdentifier> se =
FdoComputedIdentifier::Create(L"Extents", exp);
props->Add(se);
FdoPtr<FdoIDataReader> extrdr = agg->Execute();
extrdr->ReadNext();
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.
Traian
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,
Regards,
Shaik Esu,
Sr Software Engineer,
Infotech Enterprises Ltd,
Extn: 740.
Mobile +91 9849538712.
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users
More information about the fdo-users
mailing list