convert GIS WMTS tile image to polygon and point using computer vision
Project description
raster_to_vector
convert GIS WMTS tile image to polygon and point using computer vision
define your tile image request function
the function should cache images to speed up
from raster_to_vector import GetTile
get_tile = GetTile('https://my-wmts/{z}/{y}/{x}')
(lng lat zoom) to polygon
expand tile from given point until bounded by area
from raster_to_vector import find_polygon_from_point
polygon = find_polygon_from_point(lng=120.67, lat=24.171, z=9, get_tile=get_tile)
print(polygon.wkt)
find all text (lng lat) in bounded area
recognize text based on rapidocr-onnxruntime engine
from raster_to_vector import find_text_in_area
found, queue = find_text_in_area(bound=polygon, z=9, get_tile=get_tile)
for point, text in found:
print(text, point.wkt)
convert raster to vector in bounded area
the algorithm will zoom in if the unknown area does not show text
from raster_to_vector import find_polygon_in_area
results = find_polygon_in_area(bound=polygon, z=9, maxz=10, get_tile=get_tile)
for polygon, text in results:
print(text, polygon.wkt)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file raster_to_vector-0.0.1.tar.gz
.
File metadata
- Download URL: raster_to_vector-0.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dc0238f045359c69b0f0dbf692238fac31457ddea4db76e6933e74438aa2663 |
|
MD5 | 609c05f8430f7ac99a7bf59c531f6fa3 |
|
BLAKE2b-256 | 4b3e6cb7722931a94370a67248268dba969b773b9b28f27edd2a12892298a81f |
File details
Details for the file raster_to_vector-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: raster_to_vector-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6856d24d9b017cf0e0ea70ffa9b375c60054515d87373955e383e482c7dd7742 |
|
MD5 | e9f1c192451a9ad3cb33ee28d429abe1 |
|
BLAKE2b-256 | 69e82e1f217c8f8dea223f5df410841bce2888a20ddc619915112f98b5d616a1 |