Esempio n. 1
0
        public BasFeatureEntity GetFeatureEntityByOffset(long offset)
        {
            BasFeatureEntity feature = null;

            basReader.BaseStream.Seek(offset, SeekOrigin.Begin);

            BasEntity entity = BasEntityParser.Parse(basReader);

            if (entity != null)
            {
                feature = BasEntityToFeatureEntityConverter.Convert(entity);
            }

            return(feature);
        }
Esempio n. 2
0
        public Collection <BasFeatureEntity> GetAllFeatureEntities()
        {
            Collection <BasFeatureEntity> features = new Collection <BasFeatureEntity>();

            basReader.BaseStream.Seek(0, SeekOrigin.Begin);
            while (basReader.BaseStream.Position != -1 && basReader.BaseStream.Length - basReader.BaseStream.Position > 80)
            {
                BasEntity entity = BasEntityParser.Parse(basReader);

                if (entity != null)
                {
                    features.Add(BasEntityToFeatureEntityConverter.Convert(entity));
                }
            }
            return(features);
        }