[mapguide-users] Oracle SDO Geometry to MgGeometry

Peter Filip reklamama at centrum.sk
Mon Feb 9 10:38:16 EST 2009


Hello,

I imported a SHP file using FDO2FDO into a oracle DB. Now I'm reading this
data from this DB using a SQL select. Now I got stuck trying convert the
Geometry from the DB (it's sdogeometry type)  to regular MgGeometry.

I tryed to do it like this:

       
        sdogeometry  geom = (sdogeometry)reader.GetValue(4);
         
        MgByteReader br = null;
        MgAgfReaderWriter agf = new MgAgfReaderWriter();
        MgWktReaderWriter wkt = new MgWktReaderWriter();
        MgGeometry a;
        a = (MgGeometry)wkt.Read(geom.AsText);
        br = agf.Write(a);


I get this error:

Invalid argument(s):
[1] =
"MDSYS.SDO_GEOMETRY(2002,null,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(-503158,175435285,-1208252,70111477,-503248,690392669,-1208190,72745506,-503332,195962396,-1208116,40859907,-503403,781240635,-1208039,33266524,-503450,87133196,-1207974,87922655,-503487,173282191,-1207919,64803774,-503553,312548935,-1207795,35368413,-503584,093035538,-1207714,11421054,-503595,538441408,-1207675,74790928,-503614,599240642,-1207597,14977257,-503633,382945854,-1207489,41422821,-503636,32103388,-1207472,15669073,-503637,291822139,-1207453,17847393,-503643,028875972,-1207420,72900621))"
The AGF text is invalid because it failed to parse into a valid geometry
object.

Is there any work around at all to create a MgGeometry object from this
sdogeometry or its text representation??



-- 
View this message in context: http://n2.nabble.com/Oracle-SDO-Geometry-to-MgGeometry-tp2297800p2297800.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list