If the survey configuration does not itself have a template
we will use the one in etc/defaults/templates/sequence.html.njk.
It is not very likely that the template will be changed all that
often and it avoids issues when people forget to copy it across
to a new survey, etc.
Replaces an existing element with a new one, or inserts it
if there is nothing to replace. The element may be deeply
nested inside a JSON object or array in the `info` table.
Works for both public.info and survey_?.info.
The following options are shown:
* Set line complete:
If a line has been partially shot and still has points
to be acquired.
This option marks remaining virgin points as NTBA=true.
* Set line incomplete:
If a line has been partially shot and remaining virgin
points have been marked as NTBA.
This option marks all points in the line as NTBA=false.
* Set line NTBA:
If a line has not been (successfully) shot at all, i.e.,
all points on the line are virgin.
This option marks the line itself as NTBA=true.
* Unset line NTBA:
If a line has been marked as NTBA.
This option clears the NTBA flag from the line.
`complete` is a boolean.
If true, any virgin points remaining on the line
will be marked as `ntba=true`.
If false, *all* points on the line will be marked
as `ntba=false`.
Virgin points are those that have not been acquired
(and processed) at least once.
Points to be acquired are virgin points that do not
have the `ntba` flag set.
If the location URL contains a hash of either:
* #z/x/y
* #x/y
In the first case it will zoom and pan to the location;
in the second case it will only pan while maintaining the
current (or last used) zoom level.
If the location URL does not contain a hash in one of those
formats, the marker will be removed from the map.
There is no concept of ‘current survey’ in Dougal, and
assigning navigation data to a particular survey is full
of edge cases but sometimes it is necessary or at least
convenient to do so.
This commit implements once such strategy, which consists
of checking the distance to the preplots of all active
surveys (well, those that do have preplots anyway) and
picking the nearest one.
To reduce load, we only do this every once in a while as
governed by the `offline_survey_detect_interval` option
in the configuration.
This strategy is only active if the configuration option
`offline_survey_heuristics == "nearest_preplot"` for the
corresponding navigation header.
This filter can collect attributes from items having the
same key into a single item.
Can be used in templates like this:
{% for Entry in Sequence.Entries |
collect("ShotPointId", ["EntryType", "Comment"]) %}
to avoid duplicating shotpoint numbers.
If the `download` or `d` query parameter is supplied (even
without any value), the response will include a
`Content-Disposition: attachment` header. A filename will
also be suggested.