django-gisserver 2.0__py3-none-any.whl → 2.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. {django_gisserver-2.0.dist-info → django_gisserver-2.1.1.dist-info}/METADATA +27 -10
  2. django_gisserver-2.1.1.dist-info/RECORD +68 -0
  3. {django_gisserver-2.0.dist-info → django_gisserver-2.1.1.dist-info}/WHEEL +1 -1
  4. gisserver/__init__.py +1 -1
  5. gisserver/conf.py +23 -1
  6. gisserver/crs.py +452 -0
  7. gisserver/db.py +78 -6
  8. gisserver/exceptions.py +106 -2
  9. gisserver/extensions/functions.py +122 -28
  10. gisserver/extensions/queries.py +15 -10
  11. gisserver/features.py +46 -33
  12. gisserver/geometries.py +64 -306
  13. gisserver/management/commands/loadgeojson.py +41 -21
  14. gisserver/operations/base.py +11 -7
  15. gisserver/operations/wfs20.py +31 -93
  16. gisserver/output/__init__.py +6 -2
  17. gisserver/output/base.py +28 -13
  18. gisserver/output/csv.py +18 -6
  19. gisserver/output/geojson.py +7 -6
  20. gisserver/output/gml32.py +86 -27
  21. gisserver/output/results.py +25 -39
  22. gisserver/output/utils.py +9 -2
  23. gisserver/parsers/ast.py +177 -68
  24. gisserver/parsers/fes20/__init__.py +76 -4
  25. gisserver/parsers/fes20/expressions.py +97 -27
  26. gisserver/parsers/fes20/filters.py +9 -6
  27. gisserver/parsers/fes20/identifiers.py +27 -7
  28. gisserver/parsers/fes20/lookups.py +8 -6
  29. gisserver/parsers/fes20/operators.py +101 -49
  30. gisserver/parsers/fes20/sorting.py +14 -6
  31. gisserver/parsers/gml/__init__.py +10 -19
  32. gisserver/parsers/gml/base.py +32 -14
  33. gisserver/parsers/gml/geometries.py +54 -21
  34. gisserver/parsers/ows/kvp.py +10 -2
  35. gisserver/parsers/ows/requests.py +6 -4
  36. gisserver/parsers/query.py +6 -2
  37. gisserver/parsers/values.py +61 -4
  38. gisserver/parsers/wfs20/__init__.py +2 -0
  39. gisserver/parsers/wfs20/adhoc.py +28 -18
  40. gisserver/parsers/wfs20/base.py +12 -7
  41. gisserver/parsers/wfs20/projection.py +3 -3
  42. gisserver/parsers/wfs20/requests.py +1 -0
  43. gisserver/parsers/wfs20/stored.py +3 -2
  44. gisserver/parsers/xml.py +12 -0
  45. gisserver/projection.py +17 -7
  46. gisserver/static/gisserver/index.css +27 -6
  47. gisserver/templates/gisserver/base.html +15 -0
  48. gisserver/templates/gisserver/index.html +10 -16
  49. gisserver/templates/gisserver/service_description.html +12 -6
  50. gisserver/templates/gisserver/wfs/feature_field.html +1 -1
  51. gisserver/templates/gisserver/wfs/feature_type.html +44 -13
  52. gisserver/types.py +152 -82
  53. gisserver/views.py +47 -24
  54. django_gisserver-2.0.dist-info/RECORD +0 -66
  55. {django_gisserver-2.0.dist-info → django_gisserver-2.1.1.dist-info/licenses}/LICENSE +0 -0
  56. {django_gisserver-2.0.dist-info → django_gisserver-2.1.1.dist-info}/top_level.txt +0 -0
@@ -1,15 +1,36 @@
1
+ /* Common page styling */
2
+
3
+ /*
4
+ This general CSS that can be disabled
5
+ by removing the .meta-page in the overwritten templates
6
+ */
7
+
1
8
  .meta-page {
2
- font-family: Arial, sans-serif;
3
- line-height: 1.5;
4
- margin: 0 2rem 4rem 2rem;
9
+ margin: 2rem 2rem 4rem 2rem;
5
10
  }
6
11
 
7
12
  .meta-page h2 { margin: 2rem 0 0.5rem 0; }
8
13
  .meta-page h3 { margin: 1rem 0 0.5rem 0; }
9
14
  .meta-page p { margin: 0 0 1rem 0; }
10
15
 
16
+ .meta-page code { color: #000; }
17
+
18
+ .meta-page dl {
19
+ display: grid;
20
+ grid-gap: 2px 16px;
21
+ grid-template-columns: max-content;
22
+ }
23
+ .meta-page dd { grid-column-start: 2; margin: 0; }
24
+
25
+ .meta-page .wfs-feature-type { margin-bottom: 2.5rem; }
26
+ .meta-page .field-name { min-width: 20%; }
27
+ .meta-page .field-type { min-width: 25%; }
28
+
29
+ /* application-specific */
30
+ p.connect-url { margin-left: 2.5rem; font-weight: bold; }
31
+
11
32
  tbody th { text-align: left; padding-right: 2rem; }
12
33
  tbody td { padding-right: 2rem; }
13
- .complex-level-1 th { padding-left: 16px; }
14
- .complex-level-2 th { padding-left: 32px; }
15
- .complex-level-3 th { padding-left: 48px; }
34
+ .table > tbody > tr.complex-level-1 > th { padding-left: 20px; }
35
+ .table > tbody > tr.complex-level-2 > th { padding-left: 40px; }
36
+ .table > tbody > tr.complex-level-3 > th { padding-left: 60px; }
@@ -0,0 +1,15 @@
1
+ <!doctype html>{% load i18n static %}{# This is a very basic template that can be overwritten in projects #}
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
5
+ <title>{% block title %}{{ service_description.title }} {{ accept_operations|dictsort:0|join:"/" }}{% endblock %}</title>
6
+ {% block link %}
7
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT" crossorigin="anonymous">
8
+ <link rel="stylesheet" type="text/css" href="{% static 'gisserver/index.css' %}">
9
+ {% endblock %}
10
+ {% block extrahead %}{% endblock %}
11
+ </head>
12
+ <body class="{% block body-class %}meta-page{% endblock %}">
13
+ {% block content %}{% endblock %}
14
+ </body>
15
+ </html>
@@ -1,26 +1,20 @@
1
- <!doctype html>{% load i18n static %}{# This is a very basic template that can be overwritten in projects #}
2
- <html>
3
- <head>
4
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
5
- <title>{{ service_description.title }} {{ accept_operations|dictsort:0|join:"/" }}</title>
6
- {% block link %}<link rel="stylesheet" type="text/css" href="{% static 'gisserver/index.css' %}">{% endblock %}
7
- {% block extrahead %}{% endblock %}
8
- </head>
9
- <body class="{% block body-class %}meta-page{% endblock %}">
10
- <header>
1
+
2
+ {% extends "gisserver/base.html" %}{% load i18n %}
3
+
4
+ {% block title %}{{ service_description.title }} {{ accept_operations|dictsort:0|join:"/" }}{% endblock %}
5
+ {% block content %}
6
+ <header id="wfs-header">
11
7
  {% block header %}{% include "gisserver/service_description.html" %}{% endblock %}
12
8
  </header>
13
9
 
14
- <main>
10
+ <main id="wfs-main">
15
11
  {% block main %}
16
12
  {% if wfs_features %}
17
- <h2>WFS Feature Types</h2>
13
+ <h2>{% translate "WFS Feature Types" %}</h2>
18
14
  {% for feature_type in wfs_features %}
19
- <article>{% include "gisserver/wfs/feature_type.html" %}</article>
15
+ <article class="wfs-feature-type">{% include "gisserver/wfs/feature_type.html" %}</article>
20
16
  {% endfor %}
21
17
  {% endif %}
22
18
  {% endblock %}
23
19
  </main>
24
-
25
- </body>
26
- </html>
20
+ {% endblock %}
@@ -2,15 +2,21 @@
2
2
  <h1>{{ service_description.title }} {{ accept_operations|dictsort:0|join:"/" }}</h1>
3
3
  {% if service_description.abstract %}{{ service_description.abstract|linebreaks }}{% endif %}
4
4
 
5
+ {% if service_description.keywords or service_description.provider_name %}
6
+ <dl>
5
7
  {% if service_description.keywords %}
6
- <p>{% trans "Keywords" %}: {{ service_description.keywords|join:", " }}</p>
8
+ <dt>{% translate "Keywords" %}:</dt><dd>{{ service_description.keywords|join:", " }}</dd>
7
9
  {% endif %}
8
10
  {% if service_description.provider_name %}
9
- <p>{% trans "Provider" %}: {% if service_description.provider_site %}<a href="{{ service_description.provider_site }}">{% endif %}{{ service_description.provider_name }}{% if service_description.provider_site %}</a></p>{% endif %}
10
- {% if service_description.contact_person %}<p>{% trans "Contact" %}: {{ service_description.contact_person }}</p>{% endif %}
11
+ <dt>{% translate "Provider" %}:</dt>
12
+ <dd>{% if service_description.provider_site %}<a href="{{ service_description.provider_site }}">{% endif %}{{ service_description.provider_name }}{% if service_description.provider_site %}</a></dd>{% endif %}
13
+ {% if service_description.contact_person %}<dt>{% translate "Contact" %}:</dt><dd>{{ service_description.contact_person }}</dd>{% endif %}
11
14
  {% endif %}
15
+ </dl>
16
+ {% endif %}
17
+
12
18
  {% if connect_url %}
13
- <h2>{% trans "Using This WFS" %}</h2>
14
- <p>{% trans "Add the following URL to your GIS application:" %}</p>
15
- <blockquote><code>{{ connect_url }}</code></blockquote>
19
+ <h2>{% translate "Using This WFS" %}</h2>
20
+ <p>{% translate "Add the following URL to your GIS application:" %}</p>
21
+ <p class="connect-url"><samp>{{ connect_url }}</samp></p>
16
22
  {% endif %}
@@ -1,5 +1,5 @@
1
1
  {% load gisserver_tags %}<tr{% if level %} class="complex-field-member complex-level-{{ level }}"{% endif %}>
2
- <th><code>{{ field.name }}</code></th>
2
+ <th><code>{% if level %}/{% endif %}{{ field.name }}</code></th>
3
3
  <td>{{ field.xsd_element.type|to_qname:xml_namespaces }}{% if field.xsd_element.is_many %} <em>(maxOccurs={{ field.xsd_element.max_occurs }})</em>{% endif %}</td>
4
4
  <td>{{ field.abstract|default:'' }}</td>
5
5
  </tr>
@@ -1,19 +1,50 @@
1
- {% load i18n %}
2
- <h3>{{ feature_type.title }}</h3>
3
- {% if feature_type.abstract %}{{ feature_type.abstract|linebreaks }}{% endif %}
1
+ {% load i18n gisserver_tags %}
4
2
 
5
- {% block formats %}{% if wfs_output_formats %}
6
- <p>
7
- {% trans "Formats" %}:
8
- {% for output_format in wfs_output_formats %}
9
- <a href="?{{ base_query }}SERVICE=WFS&VERSION={{ version }}&REQUEST=GetFeature&TYPENAMES={{ feature_type.name }}&OUTPUTFORMAT={{ output_format.identifier }}">{{ output_format.title|default:output_format }}</a>{% if not forloop.last %},{% endif %}
10
- {% endfor %}
11
- </p>
12
- {% endif %}{% endblock %}
3
+ {% block title %}<h3><a id="feature-{{ feature_type.name }}">{{ feature_type.title }}</a></h3>{% endblock %}
4
+ {% block description %}
5
+ {% if feature_type.abstract %}{{ feature_type.abstract|linebreaks }}{% endif %}
6
+ {% endblock %}
7
+
8
+ {% block metadata %}
9
+ <dl>
10
+ {% block metadata-items %}
11
+ <dt>{% translate "XML Namespace" %}:</dt><dd><code>{{ feature_type.xml_namespace }}</code></dd>
12
+ <dt>{% translate "Typename" %}:</dt><dd><abbr title="{{ feature_type.xml_name }}">{% feature_qname feature_type %}</abbr></dd>
13
+ <dt>{% translate "Supported CRS" %}:</dt>
14
+ <dd>
15
+ {% if GISSERVER_SUPPORTED_CRS_ONLY %}
16
+ {% blocktranslate trimmed with default_crs=feature_type.crs supported_crs=feature_type.supported_crs|join:", " %}
17
+ {{ supported_crs }}, and all others. Source data uses {{ default_crs }}.
18
+ {% endblocktranslate %}
19
+ {% else %}
20
+ {% blocktranslate trimmed with default_crs=feature_type.crs supported_crs=feature_type.supported_crs|join:", " %}
21
+ {{ supported_crs }}. Source data uses {{ default_crs }}.
22
+ {% endblocktranslate %}
23
+ {% endif %}
24
+ </dd>
25
+ {% if wfs_output_formats %}
26
+ <dt>{% translate "Formats" %}:</dt>
27
+ <dd>{% block metadata-formats %}
28
+ {% for output_format in wfs_output_formats %}
29
+ <a href="?{{ base_query }}SERVICE=WFS&VERSION={{ version }}&REQUEST=GetFeature&TYPENAMES={% feature_qname feature_type %}&OUTPUTFORMAT={{ output_format.identifier }}">{{ output_format.title|default:output_format }}</a>{% block format-sep %},{% endblock %}
30
+ {% endfor %}
31
+ <a href="?{{ base_query }}SERVICE=WFS&VERSION={{ version }}&REQUEST=DescribeFeatureType&TYPENAMES={% feature_qname feature_type %}">XML Schema</a>
32
+ {% endblock %}
33
+ </dd>
34
+ {% endif %}
35
+ {% endblock %}
36
+ </dl>
37
+ {% endblock %}
13
38
 
14
39
  {% block fields %}
15
- <p>{% trans "Fields" %}:</p>
16
- <table>
40
+ <p>{% translate "The following fields are available:" %}</p>
41
+ <table class="table table-striped">
42
+ <colgroup>
43
+ <col class="field-name" />
44
+ <col class="field-type" />
45
+ <col class="field-description" />
46
+ </colgroup>
47
+ <thead><tr><th>{% translate "Field Name" %}</th><th>{% translate "Type" %}</th><th>{% translate "Description" %}</th></tr></thead>
17
48
  <tbody>
18
49
  {% for field in feature_type.fields %}
19
50
  {% include "gisserver/wfs/feature_field.html" with level=0 %}