[fdo-users] How to retrieve the Oracle Spatial Data
Zac Spitzer
zac.spitzer at gmail.com
Thu Jan 15 07:04:55 EST 2009
King oracle polutes the feature class namespace (IMHO)
the feature class will be more like KingOra:USER~PARCEL~GEOM
I personally hate the fact that the provider injects it's name in
there, it completely
violates the concept of FDO being an abstract provider interface
anyway....once you know the quirks, you can deal with them!
z
On Thu, Jan 15, 2009 at 10:58 PM, Shaik Esu <ShaikEsu at infotechsw.com> wrote:
> Hi,
>
>
>
> Thanks for your reply.
>
>
>
> I have checked the code… I am passing the featureclassname as parameter to
> my function,.
>
>
>
> There is no problem with this parameter.
>
>
>
> While debugging it showing as
>
>
>
> sel.SetFeatureClassName("PARCEL"); // where PARCEL is my spatial table.
>
>
>
> But I am unable to retrive the data.
>
>
>
>
>
>
>
>
>
>
>
> Regards,
>
> Shaik Esu,
>
> Sr Software Engineer,
>
> Infotech Enterprises Ltd,
>
> Extn: 740.
>
> Mobile +91 9849538712.
>
> ________________________________
>
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Simon Pelicon
> Sent: Thursday, January 15, 2009 5:08 PM
> To: FDO Users Mail List
> Subject: Re: [fdo-users] How to retrieve the Oracle Spatial Data
>
>
>
> Hi!
> Looking at code bellow it looks like that you specified wrong class for
> select command.
> sel.SetFeatureClassName(featureclsname);
> featureclassname has value "KingFdoClass".
>
> "KingFdoClass" is table where you have your FDO class definitions and it is
> not an FDO class with geometry column.
>
> You should specified as something like sel.SetFeatureClassName("ROADS").
> Parameter should be FDO class with geometry column;
>
> Simon
>
>
> Shaik Esu wrote:
>
>
>
> Hi All,
>
>
>
>
>
> Please help me for the below question.
>
>
>
>
>
>
>
> Regards,
>
> Shaik Esu,
>
> Sr Software Engineer,
>
> Infotech Enterprises Ltd,
>
> Extn: 740.
>
> Mobile +91 9849538712.
>
> ________________________________
>
> From: Shaik Esu [mailto:ShaikEsu at infotechsw.com]
> Sent: Friday, October 31, 2008 6:25 PM
> To: 'FDO Users Mail List'
> Subject: RE: [fdo-users] How to retrieve the Oracle Spatial Data
>
>
>
> "IFeatureReader FDOReader" is returning null value…
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Regards,
>
> Shaik Esu,
>
> Sr Software Engineer,
>
> Infotech Enterprises Ltd,
>
> Extn: 740.
>
> Mobile +91 9849538712.
>
> ________________________________
>
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Donald Cameron
> Sent: Friday, October 31, 2008 6:03 PM
> To: 'FDO Users Mail List'
> Subject: RE: [fdo-users] How to retrieve the Oracle Spatial Data
>
>
>
> What is the error message?
>
>
>
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Shaik Esu
> Sent: Friday, October 31, 2008 12:04 AM
> To: 'FDO Users Mail List'
> Subject: [fdo-users] How to retrieve the Oracle Spatial Data
>
>
>
> Hi All,
>
>
>
> I want to retrieve the Geometry stored in oracle spatial.
>
>
>
> I have written the below code
>
>
>
> private IProviderRegistry FDORegistry =
> FeatureAccessManager.GetProviderRegistry();
>
> private IConnectionManager FDOManager =
> FeatureAccessManager.GetConnectionManager();
>
> private IConnection FDOConnection =
> FeatureAccessManager.GetConnectionManager().CreateConnection("OSGeo.KingOracle.3.3");
>
> public ConnectionState Constate;
>
> string featureclsname;
>
>
>
> public FDOKingOracleClass(string username,string password,string
> servicename,string featureclassname)
>
> {
>
>
>
>
> FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("Username",
> username);
>
>
> FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("Password",
> password);
>
>
> FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("Service",
> servicename);
>
>
> FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("OracleSchema",
> servicename);
>
>
> FDOConnection.ConnectionInfo.ConnectionProperties.SetProperty("KingFdoClass",
> featureclassname);
>
> featureclsname = featureclassname;
>
>
>
> Constate = FDOConnection.Open();
>
> }
>
>
>
>
>
> I am able to open the connection without any error… but I could not able to
> retrieve the geometry collection.
>
>
>
> I am getting the error in below code….
>
>
>
>
>
> public GeometryCollection SelectAllQuery()
>
> {
>
> GeometryCollection Geo_Collection = new GeometryCollection();
>
> try
>
> {
>
> ISelect sel =
> (ISelect)FDOConnection.CreateCommand(OSGeo.FDO.Commands.CommandType.CommandType_Select);
>
> sel.SetFeatureClassName(featureclsname);
>
> // sel.LockType =
> OSGeo.FDO.Commands.Locking.LockType.LockType_Unsupported;
>
>
>
>
>
> IFeatureReader FDOReader = sel.Execute();
>
> FgfGeometryFactory gFac = new FgfGeometryFactory();
>
> while (FDOReader.ReadNext())
>
> {
>
> Byte[] Tmppts = FDOReader.GetGeometry("Geometry");
>
> Geo_Collection.Add(gFac.CreateGeometryFromFgf(Tmppts));
>
> }
>
>
>
>
>
> }
>
> catch(OSGeo.FDO.Common.Exception ex)
>
> {
>
> MessageBox.Show(ex.Message.ToString());
>
>
>
> }
>
> return Geo_Collection;
>
> }
>
>
>
>
>
>
>
>
>
> If anybody has the code to retrieve the spatial data, please help me.
>
>
>
> 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
>
>
>
>
>
> ________________________________
>
>
>
>
>
> No virus found in this incoming message.
>
> Checked by AVG - http://www.avg.com
>
> Version: 8.0.176 / Virus Database: 270.10.7/1894 - Release Date: 14.1.2009
> 19:27
>
>
>
>
>
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
>
>
--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
More information about the fdo-users
mailing list