Store simplifed polygons in the SQLite database

This commit does two things:
- uses our new polygon-simplifying library to process the polygons
  before storing them, rather than processing them in real time
- stores only the polygons in the database, rather than the whole
  GeoJSON feature, because we don’t need any of the other information
  about the feature
This commit is contained in:
Chris Hill-Scott
2020-08-24 14:43:28 +01:00
parent 3470c5bb31
commit c49a6338af
8 changed files with 164 additions and 164 deletions

View File

@@ -36,7 +36,7 @@
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(mymap);
{% for polygon in broadcast_message.polygons.buffer_and_debuffer.simplify.bleed.as_coordinate_pairs %}
{% for polygon in broadcast_message.simple_polygons.bleed.as_coordinate_pairs %}
polygons.push(
L.polygon({{polygon}}, {
opacity: 0.5,
@@ -48,7 +48,7 @@
);
{% endfor %}
{% for polygon in broadcast_message.polygons.buffer_and_debuffer.simplify.as_coordinate_pairs %}
{% for polygon in broadcast_message.simple_polygons.as_coordinate_pairs %}
polygons.push(
L.polygon({{polygon}}, {
opacity: 0.1,