tileclipper


Nametileclipper JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/sijandh35/tileclipper
SummaryThe `TileClipper` package enables users to download map tiles within a specified bounding box from a tile server
upload_time2024-06-03 09:35:15
maintainerNone
docs_urlNone
authorSijan Dhungana
requires_pythonNone
licenseGPLv3
keywords map tile clip download tileclipper
VCS
bugtrack_url
requirements requests pyproj tqdm boto3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### TileClipper Package Usage Guide

#### Introduction

The `TileClipper` package enables users to download map tiles within a specified bounding box from a tile server. This guide illustrates the installation process, instantiation of the `TileClipper` class, and downloading map tiles using the package.

#### Installation

Ensure Python is installed on your system, then install the `TileClipper` package using `pip`:

```sh
pip install tileclipper
```


```python
from tileclipper import TileClipper
```

#### Instantiate TileClipper

Define the required parameters for the TileClipper class:

    base_url (str): Base URL of the tile server.
    bbox (list): Bounding box coordinates [minx, miny, maxx, maxy].
    output_folder (str): Directory to save downloaded tiles.
    max_workers (int, optional): Maximum number of concurrent workers for tile downloads (default is 10).

Create an instance of the TileClipper class:

```python

base_url = "https://example.com/tiles/"  # Replace with your tile server URL
bbox = [xmin, ymin, xmax, ymax]  # Replace with bounding box coordinates
output_folder = "/path/to/output/folder/"  # Replace with output folder path
max_workers = 10  # Optional: Set maximum workers for concurrent downloads

tileclipper = TileClipper(base_url, bbox, output_folder, max_workers)

```

Download Tiles

Utilize the download_tiles(zoom_start, zoom_end) method to download tiles within a specified zoom level range:

```python

    # Download tiles within zoom level range 18 to 20
    tileclipper.download_tiles(18, 20)

```

Example

Here's an example demonstrating the usage of the TileClipper class:

```python

from tileclipper import TileClipper

base_url = "https://example.com/tiles/"
bbox = [xmin, ymin, xmax, ymax]
output_folder = "/path/to/output/folder/"
max_workers = 10

tileclipper = TileClipper(base_url, bbox, output_folder, max_workers)
tileclipper.download_tiles(18, 20)
    
```

Replace the placeholder values (base_url, bbox, output_folder, etc.) with your specific values according to your use case.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sijandh35/tileclipper",
    "name": "tileclipper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "map, tile, clip, download, tileclipper",
    "author": "Sijan Dhungana",
    "author_email": "sijandhungana35@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b7/a0/953bab4064a09b06c7b87affd16cfc937fa263b65ac733b56b3e273eaa96/tileclipper-1.0.2.tar.gz",
    "platform": null,
    "description": "### TileClipper Package Usage Guide\n\n#### Introduction\n\nThe `TileClipper` package enables users to download map tiles within a specified bounding box from a tile server. This guide illustrates the installation process, instantiation of the `TileClipper` class, and downloading map tiles using the package.\n\n#### Installation\n\nEnsure Python is installed on your system, then install the `TileClipper` package using `pip`:\n\n```sh\npip install tileclipper\n```\n\n\n```python\nfrom tileclipper import TileClipper\n```\n\n#### Instantiate TileClipper\n\nDefine the required parameters for the TileClipper class:\n\n    base_url (str): Base URL of the tile server.\n    bbox (list): Bounding box coordinates [minx, miny, maxx, maxy].\n    output_folder (str): Directory to save downloaded tiles.\n    max_workers (int, optional): Maximum number of concurrent workers for tile downloads (default is 10).\n\nCreate an instance of the TileClipper class:\n\n```python\n\nbase_url = \"https://example.com/tiles/\"  # Replace with your tile server URL\nbbox = [xmin, ymin, xmax, ymax]  # Replace with bounding box coordinates\noutput_folder = \"/path/to/output/folder/\"  # Replace with output folder path\nmax_workers = 10  # Optional: Set maximum workers for concurrent downloads\n\ntileclipper = TileClipper(base_url, bbox, output_folder, max_workers)\n\n```\n\nDownload Tiles\n\nUtilize the download_tiles(zoom_start, zoom_end) method to download tiles within a specified zoom level range:\n\n```python\n\n    # Download tiles within zoom level range 18 to 20\n    tileclipper.download_tiles(18, 20)\n\n```\n\nExample\n\nHere's an example demonstrating the usage of the TileClipper class:\n\n```python\n\nfrom tileclipper import TileClipper\n\nbase_url = \"https://example.com/tiles/\"\nbbox = [xmin, ymin, xmax, ymax]\noutput_folder = \"/path/to/output/folder/\"\nmax_workers = 10\n\ntileclipper = TileClipper(base_url, bbox, output_folder, max_workers)\ntileclipper.download_tiles(18, 20)\n    \n```\n\nReplace the placeholder values (base_url, bbox, output_folder, etc.) with your specific values according to your use case.\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "The `TileClipper` package enables users to download map tiles within a specified bounding box from a tile server",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/sijandh35/tileclipper"
    },
    "split_keywords": [
        "map",
        " tile",
        " clip",
        " download",
        " tileclipper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b98c296b71353ec457177e84ba8fb3294d2e55dcecfba0ec288183571c3a7d1f",
                "md5": "e88bd628f89808a4a95217b6db57bcb4",
                "sha256": "86c4c7a84e668e6f8db2a49c365b91e77e16188163d769d127253db315942c84"
            },
            "downloads": -1,
            "filename": "tileclipper-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e88bd628f89808a4a95217b6db57bcb4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16328,
            "upload_time": "2024-06-03T09:35:13",
            "upload_time_iso_8601": "2024-06-03T09:35:13.887027Z",
            "url": "https://files.pythonhosted.org/packages/b9/8c/296b71353ec457177e84ba8fb3294d2e55dcecfba0ec288183571c3a7d1f/tileclipper-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b7a0953bab4064a09b06c7b87affd16cfc937fa263b65ac733b56b3e273eaa96",
                "md5": "7d8780f329c7574a3497b08805f411c4",
                "sha256": "46a2c0124dfe3a7019c04aa5646411b1fdd3f795aeb5dfdf4e5dddd7e24782d1"
            },
            "downloads": -1,
            "filename": "tileclipper-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "7d8780f329c7574a3497b08805f411c4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16097,
            "upload_time": "2024-06-03T09:35:15",
            "upload_time_iso_8601": "2024-06-03T09:35:15.301025Z",
            "url": "https://files.pythonhosted.org/packages/b7/a0/953bab4064a09b06c7b87affd16cfc937fa263b65ac733b56b3e273eaa96/tileclipper-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-03 09:35:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sijandh35",
    "github_project": "tileclipper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.31.0"
                ]
            ]
        },
        {
            "name": "pyproj",
            "specs": [
                [
                    "==",
                    "3.6.1"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.66.1"
                ]
            ]
        },
        {
            "name": "boto3",
            "specs": [
                [
                    "==",
                    "1.24.54"
                ]
            ]
        }
    ],
    "lcname": "tileclipper"
}
        
Elapsed time: 0.24937s