streaming-osm-1.0.0: A hand-written streaming byte parser for OpenStreetMap Protobuf data.

Copyright(c) Azavea 2017
LicenseBSD3
MaintainerColin Woodbury <colingw@gmail.com>
Safe HaskellSafe
LanguageHaskell2010

Streaming.Osm.Types

Contents

Description

 

Synopsis

OpenStreetMap Elements

data Node Source #

An OpenStreetMap Node element. Represents a single point in 2D space.

Constructors

Node 

Instances

Eq Node Source # 

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Show Node Source # 

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

data Way Source #

An OpenStreetMap Way element. Made up of Nodes, and represents some line on the earth, or a Polygon if its first and last Nodes are the same.

Constructors

Way 

Instances

Eq Way Source # 

Methods

(==) :: Way -> Way -> Bool #

(/=) :: Way -> Way -> Bool #

Show Way Source # 

Methods

showsPrec :: Int -> Way -> ShowS #

show :: Way -> String #

showList :: [Way] -> ShowS #

data Relation Source #

An OpenStreetMap Relation element. These are logical groups of Nodes, Ways, and other Relations. They can represent large multipolygons, or more abstract non-polygonal objects like bus route networks.

data Info Source #

Non-geographic Element metadata. The OSM database is a wild place, so many of these fields may be missing for older Elements.

Instances

Eq Info Source # 

Methods

(==) :: Info -> Info -> Bool #

(/=) :: Info -> Info -> Bool #

Show Info Source # 

Methods

showsPrec :: Int -> Info -> ShowS #

show :: Info -> String #

showList :: [Info] -> ShowS #

data Member Source #

Equivalent to the member tag, found in OSM Relations.

Constructors

Member 

Instances

data MemType Source #

Is a Member entry referencing a Node, a Way, or a Relation?

Constructors

N 
W 
R 

memtype :: Int -> MemType Source #

A bridge between the Int-based enum value for MemType is protobuf and a more useful Haskell type.

Helper Types

newtype Blob Source #

Bytes parsed out of an OSMData section. Either non-compressed (Left) or compressed (Right) with its post-decompression size.

Constructors

Blob 

Instances

Eq Blob Source # 

Methods

(==) :: Blob -> Blob -> Bool #

(/=) :: Blob -> Blob -> Bool #

Show Blob Source # 

Methods

showsPrec :: Int -> Blob -> ShowS #

show :: Blob -> String #

showList :: [Blob] -> ShowS #

data Block Source #

A group of ~8000 OSM Elements.

Constructors

Block 

Fields

Instances

Eq Block Source # 

Methods

(==) :: Block -> Block -> Bool #

(/=) :: Block -> Block -> Bool #

Show Block Source # 

Methods

showsPrec :: Int -> Block -> ShowS #

show :: Block -> String #

showList :: [Block] -> ShowS #