[fdo-trac] #652: Byte reader returning empty FdoIMultiGeometry/MgMultiGeometry

FDO trac_fdo at osgeo.org
Wed Jun 2 09:07:12 EDT 2010


#652: Byte reader returning empty FdoIMultiGeometry/MgMultiGeometry
-----------------------------------+----------------------------------------
   Reporter:  djonio               |       Owner:  haris
       Type:  defect               |      Status:  new  
   Priority:  major                |   Milestone:  3.6.0
  Component:  KingOracle Provider  |     Version:  3.4.0
   Severity:  3                    |    Keywords:       
External_id:                       |  
-----------------------------------+----------------------------------------
 Windoze 2k3, Oracle 10g2, instantclient 10.2.3, MGOS 2.1, .NET

 EXAMPLE: (works for all types except Oracle SDO_GEOMETRY gtype = 4)
     public string InsertToSDFFromScribbleSession(string session, string
 mapname, string key)
     {
         if (this._site == null)
         {
             this.SetUp(session, mapname);
         }
         int sdfkeyval = 0;
         MgResourceService resourceService =
 _site.CreateService(MgServiceType.ResourceService) as MgResourceService;
         MgFeatureService featureService =
 _site.CreateService(MgServiceType.FeatureService) as MgFeatureService;
         MgMap map = new MgMap();
         map.Open(resourceService, mapname);
         // get the geometry
         MgLayerBase scribblesessionLayer =
 map.GetLayers().GetItem(SCRIBBLESESSION_LAYERNAME) as MgLayer;
         MgResourceIdentifier featureSourceIdSDO = new
 MgResourceIdentifier(scribblesessionLayer.GetFeatureSourceId());
         string sql = "select GEOMETRY from SCRIBBLESESSION where
 SCRIBBLESESSION_ID = " + key;
         try
         {
             MgSqlDataReader sqlreader =
 featureService.ExecuteSqlQuery(featureSourceIdSDO, sql);
             sqlreader.ReadNext();
             MgByteReader br = sqlreader.GetGeometry("GEOMETRY");
             MgPropertyCollection propertyValues = new
 MgPropertyCollection();
             propertyValues.Add(new
 MgGeometryProperty(_GEOMETRYpropertyName, br));
             propertyValues.Add(new MgStringProperty(_TEXTpropertyName,
 "SCRIBBLESESSION:" + key));
             sdfkeyval = InsertScribbleFeature(propertyValues);
         }
         catch (System.Exception _e)
         {
             return (_e.Message + " ---- " + sql);
         }
         return sdfkeyval.ToString() + ":" + key;
     }

 ADDITIONAL INFO:
 fdo2fdo.exe(7.15) returns a _bad_ geometry error and the FDO Toolkit
 returns a _null_ value.

 A FEW SDO_GEOMETRY objects As Text are attached.

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/652>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list