public ShapefileFeature(ShapeReader shapeReader, DbaseReader dbfReader, ShapeLocationInFileInfo shapeLocation, IGeometryFactory geoFactory) { m_ShapeReader = shapeReader; m_GeoFactory = geoFactory; m_ShapeLocationInfo = shapeLocation; m_LazyGeometry = new Lazy <IGeometry>(() => m_ShapeReader.ReadShapeAtOffset(m_ShapeLocationInfo.OffsetFromStartOfFile, m_GeoFactory), LazyThreadSafetyMode.ExecutionAndPublication); m_DbaseReader = dbfReader; m_LazyAttributeTable = new Lazy <IAttributesTable>(() => m_DbaseReader.ReadEntry(m_ShapeLocationInfo.ShapeIndex), LazyThreadSafetyMode.ExecutionAndPublication); }
private IShapefileFeature ReadFeature(ShapeLocationInFileInfo shapeLocationInfo) { return(new ShapefileFeature(m_ShapeReader, m_DbfReader, shapeLocationInfo, m_GeoFactory)); }
public ShapefileFeature(ShapeReader shapeReader, DbaseReader dbfReader, ShapeLocationInFileInfo shapeLocation, GeometryFactory geoFactory) { FeatureId = shapeLocation.ShapeIndex; _lazyGeometry = new Lazy <Geometry>(() => shapeReader.ReadShapeAtOffset(shapeLocation.OffsetFromStartOfFile, geoFactory), LazyThreadSafetyMode.ExecutionAndPublication); _lazyAttributeTable = new Lazy <IAttributesTable>(() => dbfReader.ReadEntry(shapeLocation.ShapeIndex), LazyThreadSafetyMode.ExecutionAndPublication); }