Beispiel #1
0
        private ILineString ReadLine(int dim, int lrsDim, SdoGeometry sdoGeom)
        {
            bool lrs = sdoGeom.LRS > 0;

            decimal[]           info = sdoGeom.ElemArray;
            ICoordinateSequence cs   = null;

            int i = 0;

            while (i < info.Length)
            {
                if (info.getElementType(i).isCompound())
                {
                    int numCompounds = info.getNumCompounds(i);
                    cs = Add(cs, GetCompoundCSeq(i + 1, i + numCompounds, sdoGeom));
                    i += 1 + numCompounds;
                }
                else
                {
                    cs = Add(cs, GetElementCSeq(i, sdoGeom, false));
                    i++;
                }
            }

            LineString ls =
                lrs
                                        ? factory.createMLineString(cs)
                                        : factory.CreateLineString(cs);

            ls.SRID = (int)sdoGeom.Sdo_Srid;
            return(ls);
        }