esqueleto-postgis-4.0.0: postgis bindings for esqueleto.
Safe HaskellNone
LanguageHaskell2010

Database.Esqueleto.Postgis.Ewkb

Contents

Description

Ewkb is the basis for postgis in postgres. This module Allows parsing of ByteString into a Geospatial Object.

These functions are used in the instance PersistField instance to parse the database base16 output into types we can use.

Refer to the eWKB Postgis Documentation https://postgis.net/docs/using_postgis_dbmanagement.html#EWKB_EWKT

Synopsis

Documentation

parseByteString :: ByteString -> Either String GeospatialGeometry Source #

Representation of EWKB as Binary

parseHexByteString :: Base16 ByteString -> Either String GeospatialGeometry Source #

Representation of EWKB as a String in Base16/Hex form i.e. "0101000000000000000000f03f0000000000000040" is POINT 1.0 2.0

toByteString :: EndianType -> SridType -> GeospatialGeometry -> ByteString Source #

Produce the binary representation of EWKB given its EndianType (Little or Big - Intel is Little) and SRID (4326 for example).

Core

the greasy gears inside for experienced users or the brave!

data SridType Source #

Constructors

Srid Word32 
NoSrid 

Instances

Instances details
Show SridType Source # 
Instance details

Defined in Database.Esqueleto.Postgis.Ewkb.Geometry

Eq SridType Source # 
Instance details

Defined in Database.Esqueleto.Postgis.Ewkb.Geometry