- data ShpFileHeader = ShpFileHeader {
- shpFileLength :: Word32
- shpFileShapeType :: ESRIShapeType
- shpFileBBox :: BBox (Double, Double)
- shpFileZBnd :: Maybe (Double, Double)
- shpFileMBnd :: Maybe (Double, Double)
- shpFileLengthBytes :: ShpFileHeader -> Integer
- putShpFileHeader :: ShpFileHeader -> Put
- getShpFileHeader :: Get ShpFileHeader
- data ShpRecHeader = ShpRecHeader {
- shpRecNum :: Word32
- shpRecSize :: Word32
- shpRecSizeBytes :: ShpRecHeader -> Integer
- putShpRecHeader :: ShpRecHeader -> Put
- getShpRecHeader :: Get ShpRecHeader
- data ShpRec = ShpRec {}
- shpRecTotalSizeBytes :: ShpRec -> Integer
- shpRecShapeType :: ShpRec -> ESRIShapeType
- mkShpRecs :: [ByteString] -> [ShpRec]
- mkShpRec :: Word32 -> ByteString -> ShpRec
- putShpRec :: ShpRec -> Put
- getShpRec :: Get ShpRec
- putShpFile :: ShpFileHeader -> [ShpRec] -> Put
- getShpFile :: Get (ShpFileHeader, [ShpRec])
Documentation
data ShpFileHeader Source
ShpFileHeader | |
|
shpFileLengthBytes :: ShpFileHeader -> IntegerSource
Shape file length in bytes
data ShpRecHeader Source
ShpRecHeader | |
|
shpRecSizeBytes :: ShpRecHeader -> IntegerSource
Size of the record in bytes, excluding the record header
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 ShpRec
s, setting proper record numbers
and sizes.
mkShpRec :: Word32 -> ByteString -> ShpRecSource
Pack the data for a shape into a ShpRec
with the specified record number
putShpFile :: ShpFileHeader -> [ShpRec] -> PutSource
getShpFile :: Get (ShpFileHeader, [ShpRec])Source