vec-geohash


Namevec-geohash JSON
Version 0.0.3 PyPI version JSON
download
home_page
SummaryVectorized functions for transforming latitude and longitude coordinates to Map Tile coordinates, Map Pixel coordinates or QuadKeys
upload_time2023-08-20 00:38:09
maintainer
docs_urlNone
author
requires_python>=3.7
licenseThe MIT License (MIT) Copyright (c) 2023 Filip Jakovljevic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords quadkeys tiles gis geohash geohash gis geo tiles map tile system
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Vec_GeoHash

![Python](https://img.shields.io/badge/python-3.7+-blue)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Tests](https://github.com/FJakovljevic/vec_geohash/actions/workflows/run_test_on_python_versions.yml/badge.svg)](https://github.com/FJakovljevic/vec_geohash/actions/workflows/runt_test_on_python_versions.yml)
[![Ruff](https://github.com/FJakovljevic/vec_geohash/actions/workflows/ruff_linting_tests.yml/badge.svg)](https://github.com/FJakovljevic/vec_geohash/actions/workflows/ruff_linting_tests.yml)

## Short Description

Vectorized functions that allow efficient transformation of __latitude and longitude coordinates__ into `Map Tile coordinates`, `Map Pixel coordinates` or `QuadKeys`. This can be particularly useful in (GIS) geographic information systems and mapping applications. By utilizing vectorized functions, transformation can be performed on large datasets, with minimal impact on performance. Additionally, only using numpy as dependency these functions can be easily incorporated into existing code and workflows.

## Instalation

The project can be installed using \`pip\`:

```sh
pip install vec_geohash
```

To install from this repo:

```sh
git clone https://github.com/FJakovljevic/vec_geohash.git
cd vec_geohash
pip install -e .
```

## Usage

#### Vector example

```python
import vec_geohash

lat_vector = [53.1231276599, 41.85]
lon_vector = [82.6978699112, -87.65]
zoom = 9

# getting tiles as [tile_x] vector and [tile_y] vector
vec_geohash.lat_lon_to_tile(lat_vector, lon_vector, zoom)
>>> (array([373, 131]), array([166, 190]))

# getting tiles as [[tile_x, tile_y]] vector
vec_geohash.lat_lon_to_tile(lat_vector, lon_vector, zoom)
>>> array([[373, 166],
           [131, 190]])

# getting quadkey
vec_geohash.lat_lon_to_quadkey(lat_vector, lon_vector, zoom)
>>> array(['121310321', '030222231'], dtype='<U9')

# getting pixels as [pixel_x] vector and [pixel_y] vector
vec_geohash.lat_lon_to_pixel(lat_vector, lon_vector, zoom)
>>> (array([95645, 33623]), array([42622, 48729]))

# getting pixels as [[pixel_x, pixel_y]] vector
vec_geohash.lat_lon_to_pixel(lat_vector, lon_vector, zoom)
>>> array([[95645, 42622],
           [33623, 48729]])
```

#### Scalar example

```python
import vec_geohash

lat = 53.1231276599
lon = 82.6978699112
zoom = 9

# getting tiles 
vec_geohash.lat_lon_to_tile(lat, lon, zoom)
>>> (373, 166)

# getting quadkey
vec_geohash.lat_lon_to_quadkey(lat, lon, zoom)
>>> array(['121310321'], dtype='<U9')

# getting pixels
vec_geohash.lat_lon_to_pixel(lat, lon, zoom)
>>> (95645, 42622)
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "vec-geohash",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "quadkeys,tiles,gis,geohash,geohash gis,geo tiles,map tile system",
    "author": "",
    "author_email": "Filip Jakovljevic <fillix96@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/70/d0/952fd268fb6a0d8d23cd1b2829dd60d2c9d9897c3f4b39bb7bd9ae3dfff9/vec_geohash-0.0.3.tar.gz",
    "platform": null,
    "description": "# Vec_GeoHash\n\n![Python](https://img.shields.io/badge/python-3.7+-blue)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Tests](https://github.com/FJakovljevic/vec_geohash/actions/workflows/run_test_on_python_versions.yml/badge.svg)](https://github.com/FJakovljevic/vec_geohash/actions/workflows/runt_test_on_python_versions.yml)\n[![Ruff](https://github.com/FJakovljevic/vec_geohash/actions/workflows/ruff_linting_tests.yml/badge.svg)](https://github.com/FJakovljevic/vec_geohash/actions/workflows/ruff_linting_tests.yml)\n\n## Short Description\n\nVectorized functions that allow efficient transformation of __latitude and longitude coordinates__ into `Map Tile coordinates`, `Map Pixel coordinates` or `QuadKeys`. This can be particularly useful in (GIS) geographic information systems and mapping applications. By utilizing vectorized functions, transformation can be performed on large datasets, with minimal impact on performance. Additionally, only using numpy as dependency these functions can be easily incorporated into existing code and workflows.\n\n## Instalation\n\nThe project can be installed using \\`pip\\`:\n\n```sh\npip install vec_geohash\n```\n\nTo install from this repo:\n\n```sh\ngit clone https://github.com/FJakovljevic/vec_geohash.git\ncd vec_geohash\npip install -e .\n```\n\n## Usage\n\n#### Vector example\n\n```python\nimport vec_geohash\n\nlat_vector = [53.1231276599, 41.85]\nlon_vector = [82.6978699112, -87.65]\nzoom = 9\n\n# getting tiles as [tile_x] vector and [tile_y] vector\nvec_geohash.lat_lon_to_tile(lat_vector, lon_vector, zoom)\n>>> (array([373, 131]), array([166, 190]))\n\n# getting tiles as [[tile_x, tile_y]] vector\nvec_geohash.lat_lon_to_tile(lat_vector, lon_vector, zoom)\n>>> array([[373, 166],\n           [131, 190]])\n\n# getting quadkey\nvec_geohash.lat_lon_to_quadkey(lat_vector, lon_vector, zoom)\n>>> array(['121310321', '030222231'], dtype='<U9')\n\n# getting pixels as [pixel_x] vector and [pixel_y] vector\nvec_geohash.lat_lon_to_pixel(lat_vector, lon_vector, zoom)\n>>> (array([95645, 33623]), array([42622, 48729]))\n\n# getting pixels as [[pixel_x, pixel_y]] vector\nvec_geohash.lat_lon_to_pixel(lat_vector, lon_vector, zoom)\n>>> array([[95645, 42622],\n           [33623, 48729]])\n```\n\n#### Scalar example\n\n```python\nimport vec_geohash\n\nlat = 53.1231276599\nlon = 82.6978699112\nzoom = 9\n\n# getting tiles \nvec_geohash.lat_lon_to_tile(lat, lon, zoom)\n>>> (373, 166)\n\n# getting quadkey\nvec_geohash.lat_lon_to_quadkey(lat, lon, zoom)\n>>> array(['121310321'], dtype='<U9')\n\n# getting pixels\nvec_geohash.lat_lon_to_pixel(lat, lon, zoom)\n>>> (95645, 42622)\n```\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2023 Filip Jakovljevic  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Vectorized functions for transforming latitude and longitude coordinates to Map Tile coordinates, Map Pixel coordinates or QuadKeys",
    "version": "0.0.3",
    "project_urls": {
        "homepage": "https://github.com/FJakovljevic/vec_geohash"
    },
    "split_keywords": [
        "quadkeys",
        "tiles",
        "gis",
        "geohash",
        "geohash gis",
        "geo tiles",
        "map tile system"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ddb6245e81639a8e567913d2b9e8a5cc9bbbf998a8ea4d8fb1615ab59df3e3c5",
                "md5": "3de2ff1d79c97f73897f43bddb985acf",
                "sha256": "caaea64f689b780f00358969507e97d2215200884c4b5000cbc7e65e0ad27ec0"
            },
            "downloads": -1,
            "filename": "vec_geohash-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3de2ff1d79c97f73897f43bddb985acf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6974,
            "upload_time": "2023-08-20T00:38:08",
            "upload_time_iso_8601": "2023-08-20T00:38:08.138739Z",
            "url": "https://files.pythonhosted.org/packages/dd/b6/245e81639a8e567913d2b9e8a5cc9bbbf998a8ea4d8fb1615ab59df3e3c5/vec_geohash-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70d0952fd268fb6a0d8d23cd1b2829dd60d2c9d9897c3f4b39bb7bd9ae3dfff9",
                "md5": "d17fe646443703daa903cb2d69cf5886",
                "sha256": "c728662ca3f8a89816d5484a54d4492da35351e2e8d91a622baab6118e6fc09a"
            },
            "downloads": -1,
            "filename": "vec_geohash-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "d17fe646443703daa903cb2d69cf5886",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 10317,
            "upload_time": "2023-08-20T00:38:09",
            "upload_time_iso_8601": "2023-08-20T00:38:09.633048Z",
            "url": "https://files.pythonhosted.org/packages/70/d0/952fd268fb6a0d8d23cd1b2829dd60d2c9d9897c3f4b39bb7bd9ae3dfff9/vec_geohash-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-20 00:38:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "FJakovljevic",
    "github_project": "vec_geohash",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "vec-geohash"
}
        
Elapsed time: 0.10323s