RFC 3825 deconder & encoder

The rfc3825encoder encodes geographical location into binary encoding as defined in RFC 3825.

The rfc3825decoder decodes this a binary encoded LCI string into geographical location.

One of the issues of RFC 3825 is the encoding of the uncertainity as count of valid bits. This increases the uncertainity unnecessary. draft-thomson-geopriv-3825bis-00 shows a different, much more clearer and better way how to encode the uncertainity.

Thus, the librfc3825 uses the “not RFC conform” encoding of uncertainity as described in draft-thomson-geopriv-3825bis-00. Also note the development of RFC3825bis. This encoder does not support RFC3825bis.

Both tools are command line tools for Linux but should also compile under Windows. Both tools uses the functions from librfc3825.c and librfc3825.h. (To compile librfc3825 under Windows you have to uncomment some typedefs in librfc3825.h.)

License of rfc3825encoder: MPL 1.1/GPL 2.0/LGPL 2.1

License of rfc3825decoder: MPL 1.1/GPL 2.0/LGPL 2.1

License of librfc3825.*: MPL 1.1/GPL 2.0/LGPL 2.1


See included INSTALL file.


Start the tools without any parameter and they will print a description.

Encode location:

./rfc3825encoder --debug --lat=-33.8570095 --latres=0.0007105
--long=151.2152005 --longres=0.0007055 --alt=33.7 --altres=33.7  --alttype=1 --datumtype=1

Decode LCI encoding:

./rfc3825decoder --verbose --lci=4B:BC:49:36:0D:49:2E:6E:2E:C3:13:C0:00:21:B3:01

There is a lot of discussion in the Geopriv working group how to handle resolution and uncertainty, and how to convert them from LCI to decimal and vice versa. Thus, for sure there may be some small bugs in librfc3825. Furthermore, RFC3825bis is not implemented.


Klaus Darilion


0.2: initial release

0.3: release under MPL 1.1/GPL 2.0/LGPL 2.1

0.4: 2 bugs fixed, update recommended (thanks to Hannes)