Skip to content

Releases: thehappycheese/megalinref

v0.4.0

29 Jun 15:39
Compare
Choose a tag to compare

On Windows

pip install https://github.com/thehappycheese/megalinref/releases/download/v0.4.0/megalinref-0.4.0-cp38-abi3-win_amd64.whl

On Linux

pip install https://github.com/thehappycheese/megalinref/releases/download/v0.4.0/megalinref-0.4.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

v0.3.0-manylinux

17 May 03:27
efcf6d9
Compare
Choose a tag to compare

Built on databricks environment 13.0

Installation

pip install https://github.com/thehappycheese/megalinref/releases/download/v0.3.0-manylinux/megalinref-0.3.0-cp38-abi3-manylinux_2_28_x86_64.whl

Usage

See readme

v0.2.0 - Windows Wheel

06 Mar 14:37
Compare
Choose a tag to compare
Pre-release

Both forward and reverse lookup is now possible.

Things still missing in this release:

  • ability to offset results.
  • ability to filter roads when converting from lat/lon to road/slk
  • documentation is still a bit scant... see examples in the tests/ folder

Installation

pip install https://github.com/thehappycheese/megalinref/releases/download/v0.2.0/megalinref-0.2.0-cp39-abi3-win_amd64.whl

v0.1.1 - linux only

11 Feb 04:51
Compare
Choose a tag to compare
v0.1.1 - linux only Pre-release
Pre-release

still an early release. See usage example on previous windows release

Installation

pip install https://github.com/thehappycheese/megalinref/releases/download/v0.1.1/megalinref-0.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

v0.1.0 - First pre-release build for windows :)

06 Feb 15:15
Compare
Choose a tag to compare

Installation

pip install https://github.com/thehappycheese/megalinref/releases/download/v0.1.0/megalinref-0.1.0-cp39-none-win_amd64.whl

Known Issues

  • cwy is returned in enum form, not as text
  • network_typ is returned in enum form, not as text
  • distance is returned in degrees; it needs to be converted to metres

For up-to-date information on the development roadmap please see Development Progress

Example

import megalinref as mlr

data = mlr.download_fresh_data_as_json()

slk_lookup = mlr.SLKLookup(data)

result = slk_lookup.lookup(
    lat=-31.89006203575722,
    lon=115.80183730752809,
    cwy=mlr.Cwy["L"] | mlr.Cwy["R"],
    network_type=mlr.NetworkType["State Road"] | mlr.NetworkType["Local Road"] 
)

assert result == {
    'feature': {
        'ROAD': 'H016',
        'CWY': 4,
        'START_SLK': 9.84,
        'END_SLK': 10.68,
        'START_TRUE_DIST': 9.84,
        'END_TRUE_DIST': 10.68,
        'NETWORK_TYPE': 1
    },
    'slk': 9.99999981522603,
    'true': 9.99999981522603,
    'distance': 1.064734332392196e-14
}