[fdo-users] How to retrieve the Oracle Spatial Data
Dan Stoica
dan.stoica at autodesk.com
Thu Jan 15 09:28:33 EST 2009
I think you should check for Null prior getting the geometry.
Dan.
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 7:10 AM
To: FDO Users Mail List
Subject: Re: [fdo-users] How to retrieve the Oracle Spatial Data
HI,
Can you retrieve any other property from this class( string,integer ).
Query FDO class with Fdo2Fdo tool. Check with Fdo2Fdo your geometry column
Simon
Shaik Esu 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> [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> [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> [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<mailto: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<mailto: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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20090115/f03733ae/attachment-0001.html
More information about the fdo-users
mailing list