PyOGC is a Python package that provides a simple and consistent interface for working with OGC (Open Geospatial Consortium) services such as WMS, WFS, WCS, and Tiling Services.
PyOGC is built using modern Python development tools and practices, including Poetry for package management and Pytest for testing. It is designed to be easy to install and use, and to provide clear and comprehensive documentation.
pip install PyOGC
from PyOGC import landing
data = landing.metadata()
print(data)
Here is an example of how to use PyOGC to retrieve a tile matrix set:
from PyOGC.TilingSchemes.schemes import TilesAPI
api = TilesAPI()
# Get all available tile matrix sets
tile_matrix_sets = api.get_tile_matrix_sets()
print(tile_matrix_sets)
# Get a specific tile matrix set
tile_matrix_set = api.get_tile_matrix_set("CDB1GlobalGrid")
print(tile_matrix_set)
If you want to contribute to PyOGC or modify it to suit your needs, you can get started with the following steps:
git clone <https://github.com/your_username/PyOGC.git>
Change into the directory:
cd PyOGC
The project uses poetry
to manage dependencies so you'll have to install poetry globally using pip
pip install poetry
Install PyOGC and its dependencies:
poetry install
Install the pre-commit hooks
pre-commit install
Once you have installed PyOGC, you can run the tests to make sure everything is working as expected:
poetry run pytest
If you want to modify the tests or add new tests, you can find them in the tests
directory. You can also run individual tests by specifying the test file and the test name:
poetry run pytest tests/test_ogc.py::test_get_capabilities
This project needs your shiny star ⭐. Don't forget to leave a star ⭐️
Made with ❤ by Anvansh (@RyanWalker277)