[mapguide-users] Oracle SDO Geometry to MgGeometry

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


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] =
The AGF text is invalid because it failed to parse into a valid geometry

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