Catalog PyPI
Back to packageRELEASE DETAILS

0.1.2

PyPI

adaptwms

Lightweight OpenStreetMap adapter for WMS services as Django app

Published30 Jun 2023
Direct dependencies3
Transitive dependenciesNot calculated

README

Version 0.1.2 documentation

adaptwms

Lightweight OpenStreetMap adapter for WMS services

What it is?

Basically it is adapter translating requests in so called Slippy Map format (used by OpenStreetMap, takes zoom level and XY tile indexes) into requests to external WMS service (takes bounding box in form of two points in some coordinate system of area to render).

To give an example , let's say you need to supply to external map viewer an URL in format:

https://tile.openstreetmap.org/{z}/{x}/{y}.png

All x,y and z are natural numbers. But the service you want to access gives you interface that requires this format:

https://external.service/wms?BBOX=0.0%2C0.0%2C1.0%2C1.0&SRS=EPSG%3A3857&WIDTH=256&HEIGHT=256&SERVICE=WMS

However in this case BBOX contains set of 4 floating point numbers for 2 (x0, y0) and (x1, y1) points limiting the area to render. This is a kind of problems this program is trying to solve.

What is supported?

These are the known constraints:

  • WMS service you use must allow unauthenticated access (there is no way for passing credentials in any form at the moment)
  • it must support EPSG:3857 coordinate system

How to use it...

...if I don't have experience with Django

This makes use of this Github project and demo project it supplies. Best for testing, or temporary deployement.

  1. Make sure you have Python and pip installed
  2. Clone repo: git clone git@github.com:v3l0c1r4pt0r/adaptwms.git and enter it: cd adaptwms
  3. Install all requirements: pip install -r requirements.txt
  4. Run development server with: ./manage.py runserver
  5. Open http://127.0.0.1:8000/ in your browser

TODO: write

...if I do have some experience with Django

This makes use of pip package available on PyPI and Django project that you have, or want to set up. Best for production environments.

  1. Make sure you have Python and pip installed
  2. Start new django project: django-admin startproject demo ., where demo is its name, or use existing one
  3. Install adaptwms from PyPI: pip install adaptwms
  4. Add adaptwms to your INSTALLED_APPS in settings.py
  5. Add path("adaptwms/", adaptwms.views.adapter_view), to your urlpatterns in urls.py (same could be done for adaptwms.views.InterfaceView.as_view() if you want to have interactive generator for adaptwms URLs)
  6. Run development server with: ./manage.py runserver
  7. Open http://127.0.0.1:8000/ in your browser

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 3

Native requirements
3 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
django
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11,<4.0",
  "evaluation": "NOT_EVALUATED"
}
django (>=4.2.2,<5.0.0)runtime
pyproj
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11,<4.0",
  "evaluation": "NOT_EVALUATED"
}
pyproj (>=3.6.0,<4.0.0)runtime
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.11,<4.0",
  "evaluation": "NOT_EVALUATED"
}
requests (>=2.31.0,<3.0.0)runtime

Distribution files

2 collected
adaptwms-0.1.2-py3-none-any.whl

bdist_wheel · 9.58 KB · Python py3

Source file
adaptwms-0.1.2.tar.gz

sdist · 7.55 KB · Python source

Source file

Repository

PENDING
v3l0c1r4pt0r/adaptwms

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:fc783fafc890ca432594500d113cef129c4d0cc9fce68707a077b1f2e3383f57

Other collected versions

View all collected versions →