1.7. wkb.erl

Erlang library to convert and generate datas in OGC Well Known Binary format defined by the Open Geospatial Consortium (OGC) and described in their Simple Feature Access.

Encodings are done in big indian.

1.7.1. Tsung Exports

Functions exported and callable direcxtly in a Tsung’s scenario

1.7.1.1. wkb_point/1

Return a point with random coordinate in WKB format.

Paramaters : Tsung tuple {Pid, DynVars}

Return : string

24> wkb:wkb_point({Pid, DynVars}).
"0000000001C03FB4A8BE87B3804042B06F3D378054"

1.7.2. Other exports

1.7.2.1. float_to_wkb/1

Convert a float to OGC Well Known Binary format

Parameters : float

Return : string

79> wkb:float_to_wkb(42.14).
"404511EB851EB852"

1.7.2.2. wkb_point/2

1.7.2.3. wkb_linestring/1

Return a linestring encoded in WKB format.

Paramaters : Atrray of tuples {lat, lon}

Return : string

84> wkb:wkb_linestring([{42.5, -5.5},{135.2,5}]).
"000000000200000002C016000000000000404540000000000040140000000000004060E66666666666"