mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Update utils to do linear transformation of polygons
Brings in https://github.com/alphagov/notifications-utils/pull/889/files At the moment, we are not doing any transformation of features before applying geometric algorithms to them. This is, in effect, assuming that the earth is flat. This new version of utils implements the transformation of our polygons to a Cartesian plane. In other words, it converts them from being defined in spherical degrees to metres. For the admin app this means we need to convert places where the code expects things to be measured in degrees to work in metres instead.
This commit is contained in:
@@ -76,6 +76,7 @@ from app.formatters import (
|
||||
recipient_count,
|
||||
recipient_count_label,
|
||||
round_to_significant_figures,
|
||||
square_metres_to_square_miles,
|
||||
valid_phone_number,
|
||||
)
|
||||
from app.models.organisation import Organisation
|
||||
@@ -572,6 +573,7 @@ def add_template_filters(application):
|
||||
message_count_noun,
|
||||
format_mobile_network,
|
||||
format_yes_no,
|
||||
square_metres_to_square_miles,
|
||||
]:
|
||||
application.add_template_filter(fn)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user