module that help get streets and neiborhoods from latitude longitude
Project description
latvian_streets_neighborhoods
install
pip install latviastreetify
or with CLI capabilities
pip install latviastreetify[cli]
Using external files
You can use external files for address and neighbordhoods by setting the enviroment variables to external .shp
files.
# for streets/address
export STREETS_FILE=
# for neighbordhoods
export NEIGHBORHOODS_FILE=
Usage examples
Head of the dataframe
from latviastreetify.resolvers import Language, SteetsAndNeighborhoodsResolver
from pprint import pprint
resolver = SteetsAndNeighborhoodsResolver()
gdf = resolver.get_gdf(language=Language.EN)
pprint(gdf.head())
Address Street Number Rotation Geometry lat lon index_right Name Website
1 pūku iela 14 pūku iela 14 110.0 POINT (24.25629 56.87265) 56.872648 24.256293 3.0 dārziņi https://apkaimes.lv/darzini/
2 pūku iela 12 pūku iela 12 110.0 POINT (24.25618 56.87248) 56.872484 24.256180 3.0 dārziņi https://apkaimes.lv/darzini/
3 pūku iela 10 pūku iela 10 110.0 POINT (24.25602 56.87228) 56.872280 24.256022 3.0 dārziņi https://apkaimes.lv/darzini/
4 pūku iela 2 pūku iela 2 110.0 POINT (24.25694 56.87278) 56.872777 24.256936 3.0 dārziņi https://apkaimes.lv/darzini/
5 pūku iela 4 pūku iela 4 110.0 POINT (24.25680 56.87260) 56.872602 24.256800 3.0 dārziņi https://apkaimes.lv/darzini/
CLI Usage
Usage:
$ [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion
: Install completion for the current shell.--show-completion
: Show completion for the current shell, to copy it or customize the installation.--help
: Show this message and exit.
Commands:
search-by-address
search-by-code
search-by-name
search-by-number
search-by-street
search-multiple
search-by-address
Usage:
$ search-by-address [OPTIONS] SEARCH_VALUE
Arguments:
SEARCH_VALUE
: [required]
Options:
--language [EN|LAV]
: [default: Language.EN]--help
: Show this message and exit.
search-by-code
Usage:
$ search-by-code [OPTIONS] SEARCH_VALUE
Arguments:
SEARCH_VALUE
: [required]
Options:
--language [EN|LAV]
: [default: Language.EN]--help
: Show this message and exit.
search-by-name
Usage:
$ search-by-name [OPTIONS] SEARCH_VALUE
Arguments:
SEARCH_VALUE
: [required]
Options:
--language [EN|LAV]
: [default: Language.EN]--help
: Show this message and exit.
search-by-number
Usage:
$ search-by-number [OPTIONS] SEARCH_VALUE
Arguments:
SEARCH_VALUE
: [required]
Options:
--language [EN|LAV]
: [default: Language.EN]--help
: Show this message and exit.
search-by-street
Usage:
$ search-by-street [OPTIONS] SEARCH_VALUE
Arguments:
SEARCH_VALUE
: [required]
Options:
--language [EN|LAV]
: [default: Language.EN]--help
: Show this message and exit.
search-multiple
Usage:
$ search-multiple [OPTIONS]
Options:
--address TEXT
--name TEXT
--street TEXT
--number TEXT
--code TEXT
--language [EN|LAV]
: [default: Language.EN]--help
: Show this message and exit.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
latviastreetify-0.2.0.tar.gz
(1.2 MB
view hashes)
Built Distribution
Close
Hashes for latviastreetify-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55af96cb581d8a4b77a47b18e84abb411782ccb3e0443d9b42d578b096bef35f |
|
MD5 | 063f47e8138d2dc19ad7f40b217d70a3 |
|
BLAKE2b-256 | 58ee675d8308abbc19e93de5e49b9a6bd6d3f063962209e261fda0464507c9d2 |