[fdo-users] Shape file Extents
Donald Cameron
donald.cameron at autodesk.com
Tue Oct 14 14:15:43 EDT 2008
Hi Jason,
I have created a chapter called FDO Cookbook in the FDO Developers Guide. It contains C# snippets for a lot of things. I gave Greg Boone a copy of it for posting to the osgeo site. I would attach it to this email except that it is 1MB, which exceeds the limit of 256KB.
Don
-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: Tuesday, October 14, 2008 12:28 PM
To: FDO Users Mail List; FDO Internals Mail List
Subject: RE: [fdo-users] Shape file Extents
Hey, that's cool...
I wonder if we should have a "Code Snippets" page on the wiki for things
like this.
Anyone have any objections? If not, I'll set one up.
Jason
-----Original Message-----
From: Shaik Esu
Subject: RE: [fdo-users] Shape file Extents
Hi All,
Here is the c#.net code to get the extents of the featureclass.
This code might help the new programmers to FDO like me.
public IPolygon GetExtents()
{
IPolygon retpolygon;
ISelectAggregates pselagree =
(ISelectAggregates)FDOConnection.CreateCommand(CommandType.CommandType_S
elec
tAggregates);
pselagree.SetFeatureClassName(System.IO.Path.GetFileNameWithoutExtension
(Ope
nedFile));
IFeatureReader FDOReader = pselagree.Execute();
FgfGeometryFactory GeoFac = new FgfGeometryFactory();
Byte[] Tmppts = FDOReader.GetGeometry("Geometry");
IGeometry Geo = GeoFac.CreateGeometryFromFgf(Tmppts);
retpolygon = (IPolygon)Geo;
return retpolygon;
}
_______________________________________________
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