{"id":18321059,"url":"https://github.com/geodesign/django-wms","last_synced_at":"2025-04-05T22:32:16.965Z","repository":{"id":18130391,"uuid":"21210416","full_name":"geodesign/django-wms","owner":"geodesign","description":"Web Map Service or Tile Map Service functionality for Django projects","archived":false,"fork":false,"pushed_at":"2016-04-26T11:51:47.000Z","size":78,"stargazers_count":43,"open_issues_count":2,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-21T13:13:25.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geodesign.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-25T16:31:39.000Z","updated_at":"2024-09-28T15:06:13.000Z","dependencies_parsed_at":"2022-09-26T21:41:10.490Z","dependency_job_id":null,"html_url":"https://github.com/geodesign/django-wms","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geodesign%2Fdjango-wms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geodesign%2Fdjango-wms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geodesign%2Fdjango-wms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geodesign%2Fdjango-wms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geodesign","download_url":"https://codeload.github.com/geodesign/django-wms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411234,"owners_count":20934650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T18:18:13.890Z","updated_at":"2025-04-05T22:32:16.662Z","avatar_url":"https://github.com/geodesign.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Django WMS Framework\n======================\nThe Django WMS Framework is a toolkit that makes it easy to build a `Web Map Service (WMS) \u003chttp://en.wikipedia.org/wiki/Web_Map_Service\u003e`_ or a x-y-z `Tile Map Service \u003chttp://en.wikipedia.org/wiki/Tile_Map_Service\u003e`_. Rendering of both vector and raster data formats are supported.\n\nFor complete documentation please go to `\u003chttp://django-wms.readthedocs.org\u003e`_\n\nRequirements\n------------\nThe processing of spatial data in django-wms relies on `MapServer \u003chttp://mapserver.org/index.html\u003e`_ and its python bindings `MapScript \u003chttp://mapserver.org/mapscript/mapscript.html\u003e`_. Raster data integration depends on the `django-raster \u003chttps://pypi.python.org/pypi/django-raster/0.1.0\u003e`_ package. The use of `PostGIS \u003chttp://postgis.net/\u003e`_ as the database backend is required as well, for raster ntegration PostGIS \u003e= 2.0 is required (see also django-raster package).\n\nInstallation\n------------\n1. Install package with ``pip install django-wms``\n\n2. Add \"wms\" to your INSTALLED_APPS setting like this::\n\n        INSTALLED_APPS = (\n            ...\n            'wms',\n        )\n\nExample\n-------\nTo create a mapping service, subclass the django-wms layer, map and view classes and connect them to an existing model in django that has a spatial field (such as Point, Polygon or MultiPolygon). An example ``wms_config.py`` module could be specified as follows ::\n\n    ### wms_config.py\n\n    # Load django-wms classes\n    from wms import maps, layers, views\n\n    # Load model with spatial field (Point, Polygon or MultiPolygon)\n    from myapp.models import MySpatialModel\n\n\n    # Subclass the WmsVectorLayer class and point it to a spatial model.\n    # Use WmsRasterLayer for rasters\n    class MyWmsLayer(layers.WmsVectorLayer):\n        model = MySpatialModel\n\n    # Subclass the WmsMap class and add the layer to it\n    class MyWmsMap(maps.WmsMap):\n        layer_classes = [ MyWmsLayer ]\n\n    # Subclass the WmsView to create a view for the map\n    class MyWmsView(views.WmsView):\n        map_class = MyWmsMap\n\nWith the WmsView subclass in place, the only thing left to do to create a functional map service is to hook the view into a url. An example url configuration ``urls.py`` could be ::\n\n    ### urls.py\n\n    # Import the wms view\n    from myproject.wms_config import MyWmsView\n\n    # Add url patterns to setup map services from the view\n    urlpatterns = patterns('',\n\n        # This creates a WMS endpoint\n        url(r'^wms/$', MyWmsView.as_view(), name='wms'),\n\n        # This creates a TMS endpoint\n        url(r'^tile/(?P\u003clayers\u003e[^/]+)/(?P\u003cz\u003e[0-9]+)/(?P\u003cx\u003e[0-9]+)/(?P\u003cy\u003e[0-9]+)(?P\u003cformat\u003e\\.jpg|\\.png)$',\n            MyWmsView.as_view(), name='tms'),\n    )\n\nThe django-wms package will automatically detect the first spatial field it can find in ``MySpatialModel`` and create a WMS endpoint from the class based view. If the three arguments ``x``, ``y`` and ``z`` are found in the urlpattern, the view functions as TMS endpoint.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeodesign%2Fdjango-wms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeodesign%2Fdjango-wms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeodesign%2Fdjango-wms/lists"}