shapefile-0.0.0.1: Parser and related tools for ESRI shapefile format

Database.Shapefile.Shp

Synopsis

Documentation

data ShpFileHeader Source

Constructors

ShpFileHeader 

Fields

shpFileLength :: Word32

File length in 16-bit words. Unsigned, I assume - spec doesn't say.

shpFileShapeType :: ESRIShapeType
 
shpFileBBox :: BBox (Double, Double)
 
shpFileZBnd :: Maybe (Double, Double)
 
shpFileMBnd :: Maybe (Double, Double)
 

shpFileLengthBytes :: ShpFileHeader -> IntegerSource

Shape file length in bytes

data ShpRecHeader Source

Constructors

ShpRecHeader 

Fields

shpRecNum :: Word32

Index of the record. First index is 1.

shpRecSize :: Word32

Size of the record in 16-bit words, excluding this header.

shpRecSizeBytes :: ShpRecHeader -> IntegerSource

Size of the record in bytes, excluding the record header

data ShpRec Source

Constructors

ShpRec 

Instances

shpRecTotalSizeBytes :: ShpRec -> IntegerSource

Total size of the shape record in bytes, including the header

shpRecShapeType :: ShpRec -> ESRIShapeTypeSource

A shape record type isn't part of the header, but every shape format starts with a word indicating the shape type. This function extracts it.

mkShpRecs :: [ByteString] -> [ShpRec]Source

Pack several raw shape records into ShpRecs, setting proper record numbers and sizes.

mkShpRec :: Word32 -> ByteString -> ShpRecSource

Pack the data for a shape into a ShpRec with the specified record number