示例#1
0
        public MultiLineString ReadMultiLineString(DimensionType dimension)
        {
            MultiLineString mline = new MultiLineString();

            if (!canRead())
            {
                return(mline);
            }

            int nLines = ReadNextInt();

            for (int i = 0; i < nLines; i++)
            {
                mline.AddGeometry(ReadLineString(dimension));
            }

            return(mline);
        }
示例#2
0
        public MultiLineString ReadMultiLineString(DimensionType dimension)
        {
            string groups = readGroup('(', ')', m_buffer, ref m_currIndex);

            string[]        lines     = readSubGroups('(', ')', groups);
            MultiLineString multiLine = new MultiLineString();

            foreach (string line in lines)
            {
                LineString tmpLine = new LineString();
                string[]   points  = line.Replace("(", "").Replace(")", "").Split(',');
                foreach (string point in points)
                {
                    tmpLine.AddGeometry(ReadCoordinate(dimension, point));
                }
                multiLine.AddGeometry(tmpLine);
            }
            return(multiLine);
        }