bruce-models 0.3.3__tar.gz → 0.3.4__tar.gz
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.
- {bruce_models-0.3.3 → bruce_models-0.3.4}/PKG-INFO +1 -1
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/__init__.py +1 -1
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_historic.py +20 -3
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/client_file/client_file_value_map.py +68 -2
- {bruce_models-0.3.3 → bruce_models-0.3.4}/MANIFEST.in +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/README.md +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/__main__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/account/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/account/account.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/account/account_audit.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/api/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/api/api.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/api/bruce_api.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/api/errors.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/api/guardian_api.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/api/response.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/change/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/change/change_set.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/change/change_set_builder.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/change/edit_store.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/baseline.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/baselines/benchmark.json +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/bench.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/cmd_accounts.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/cmd_audit.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/cmd_auth.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/cmd_indexes.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/cmd_render.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/cmd_run.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/cmd_status.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/commands.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/config.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/exits.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/humanize.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/identity.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/live.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/main.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/report.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_bench.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_change_set.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_data_model.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_data_transform.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_datalab.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_entity_lod.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_gis.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_import_brz.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_import_csv.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_import_geojson.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_import_ifc.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_import_json.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_import_kml.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_import_xlsx.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_merge.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_relation.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/run_scale.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/runner.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_bench.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_brz.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_change_set.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_data_model.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_data_transform.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_datalab.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_geojson.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_gis.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_historic.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_ifc.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_json.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_kml.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_lod.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_merge.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_relation.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_scale.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/seed_xlsx.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/style.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/cli/suites.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/client_file/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/client_file/client_file.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/client_file/client_file_query_builder.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/client_file/client_file_texture.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/common/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/common/bounds.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/common/geometry.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/common/geometry_builder.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/common/lru_cache.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_lab/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_lab/data_lab.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_lab/data_lab_builder.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_lab/data_lab_pairing.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_mapping/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_mapping/data_mapping.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_mapping/data_mapping_builder.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_transform/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/data_transform/data_transform.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/entity/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/entity/entity.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/entity/entity_historic_data.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/entity/entity_index.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/entity/entity_link.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/entity/entity_type.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/entity/entity_ucs.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_assembly/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_assembly/assembly_import.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_brz/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_brz/brz.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_csv/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_csv/csv_import.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_geojson/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_geojson/geojson.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_geojson/geojson_import.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_json/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_json/json_import.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_kml/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_kml/kml.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_kml/kml_import.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_xlsx/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_xlsx/xlsx.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/format_xlsx/xlsx_import.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/geometry/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/geometry/glb.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/hosting/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/hosting/hosting_location.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/internal/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/internal/uploader.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/lod/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/lod/entity_lod.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/lod/lod_category.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/relation/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/relation/entity_relation.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/relation/entity_relation_type.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/scenario/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/scenario/scenario.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/server/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/server/api_version.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/server/pending_action.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/tileset/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/tileset/tileset.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/user/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/user/session.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/util/__init__.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/util/import_utils.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/util/optional.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/util/path_utils.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/util/query_plan.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/util/required.py +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models.egg-info/SOURCES.txt +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/pyproject.toml +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/requirements.txt +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/setup.cfg +0 -0
- {bruce_models-0.3.3 → bruce_models-0.3.4}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bruce-models
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: This is a library which defines data-models for the Nextspace API and provides functions for communicating with the endpoints.
|
|
5
5
|
Author: Matvey Lavrinovich
|
|
6
6
|
Author-email: matveylavrinovich@gmail.com
|
|
@@ -62,7 +62,7 @@ from .util.path_utils import PathUtils
|
|
|
62
62
|
|
|
63
63
|
# The one place the version is written. setup.py reads it from here without importing the package,
|
|
64
64
|
# and pypi-release.sh reads this same file, so a source checkout and a wheel can never disagree.
|
|
65
|
-
__version__ = "0.3.
|
|
65
|
+
__version__ = "0.3.4"
|
|
66
66
|
|
|
67
67
|
__all__ = [
|
|
68
68
|
"__version__",
|
|
@@ -190,11 +190,27 @@ def _check_scenario(api: BruceApi, result: Result, entity_ids, stamp: int, repor
|
|
|
190
190
|
raise ImportFailed(f"Scenario was registered without an ID: {scenario}")
|
|
191
191
|
result.scenario_ids.append(scenario_id)
|
|
192
192
|
|
|
193
|
-
EntityHistoricData.update(api, [EntityHistoricData.build_record(
|
|
193
|
+
written = EntityHistoricData.update(api, [EntityHistoricData.build_record(
|
|
194
194
|
entity_id, seed_historic.DRIVER_PATH, seed_historic.SCENARIO_DATETIME,
|
|
195
195
|
{"temperature": seed_historic.SCENARIO_TEMPERATURE,
|
|
196
196
|
"status": seed_historic.SCENARIO_STATUS},
|
|
197
197
|
scenario=scenario_id)])
|
|
198
|
+
# Per-record problems arrive as warnings inside a successful response, so an unchecked
|
|
199
|
+
# write reads back as live values later and looks like the Scenario was ignored.
|
|
200
|
+
write_warnings = warnings_in(written)
|
|
201
|
+
if write_warnings:
|
|
202
|
+
step.detail = f"writing the Scenario record: {write_warnings}"
|
|
203
|
+
_report_step(report, step)
|
|
204
|
+
return
|
|
205
|
+
|
|
206
|
+
# A Scenario read falls back to live values both when the Scenario is ignored and when
|
|
207
|
+
# it holds no record for the point, and those need telling apart to be actionable.
|
|
208
|
+
stored = EntityHistoricData.get_list(
|
|
209
|
+
api, entity_ids=[entity_id], attr_key=seed_historic.DRIVER_PATH,
|
|
210
|
+
scenario=scenario_id)
|
|
211
|
+
if not (stored.get("Items") or []):
|
|
212
|
+
raise ImportFailed("the Scenario record was accepted without warnings and did not "
|
|
213
|
+
"read back, so nothing was stored against the Scenario")
|
|
198
214
|
|
|
199
215
|
point = seed_historic.SCENARIO_POINT
|
|
200
216
|
in_scenario = Entity.get(api, entity_id, historic_point=point, scenario=scenario_id)
|
|
@@ -202,8 +218,9 @@ def _check_scenario(api: BruceApi, result: Result, entity_ids, stamp: int, repor
|
|
|
202
218
|
|
|
203
219
|
problems = []
|
|
204
220
|
if in_scenario.get("status") != seed_historic.SCENARIO_STATUS:
|
|
205
|
-
problems.append(f"in the Scenario read {in_scenario.get('status')}, "
|
|
206
|
-
f"expected {seed_historic.SCENARIO_STATUS}"
|
|
221
|
+
problems.append(f"in the Scenario at {point} read {in_scenario.get('status')}, "
|
|
222
|
+
f"expected {seed_historic.SCENARIO_STATUS} from the record at "
|
|
223
|
+
f"{seed_historic.SCENARIO_DATETIME}")
|
|
207
224
|
# The point of a Scenario is that it changes nothing outside itself.
|
|
208
225
|
if base.get("status") != seed_historic.SCENARIO_BASE_STATUS:
|
|
209
226
|
problems.append(f"outside it read {base.get('status')}, "
|
|
@@ -63,8 +63,14 @@ def _segments_cross(ax, ay, bx, by, cx, cy, dx, dy) -> bool:
|
|
|
63
63
|
d4 = side(ax, ay, bx, by, dx, dy)
|
|
64
64
|
if ((d1 > 0) != (d2 > 0)) and ((d3 > 0) != (d4 > 0)):
|
|
65
65
|
return True
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
|
|
67
|
+
def between(px, py, qx, qy, rx, ry):
|
|
68
|
+
return (min(px, qx) <= rx <= max(px, qx)) and (min(py, qy) <= ry <= max(py, qy))
|
|
69
|
+
|
|
70
|
+
return ((d1 == 0 and between(cx, cy, dx, dy, ax, ay))
|
|
71
|
+
or (d2 == 0 and between(cx, cy, dx, dy, bx, by))
|
|
72
|
+
or (d3 == 0 and between(ax, ay, bx, by, cx, cy))
|
|
73
|
+
or (d4 == 0 and between(ax, ay, bx, by, dx, dy)))
|
|
68
74
|
|
|
69
75
|
|
|
70
76
|
def _cell_meets_ring(points: Sequence[Point], west: float, east: float,
|
|
@@ -1344,6 +1350,66 @@ class ClientFileValueMap:
|
|
|
1344
1350
|
if bool(shift_covered[row][column]) else None)
|
|
1345
1351
|
return reading
|
|
1346
1352
|
|
|
1353
|
+
def details_at(self, longitude: float, latitude: float, frame: int = 0) -> Optional[dict]:
|
|
1354
|
+
"""
|
|
1355
|
+
Everything the archive knows about one place, for a caller inspecting a single point.
|
|
1356
|
+
None where the position falls outside every tile.
|
|
1357
|
+
"""
|
|
1358
|
+
reading = self.sample_at(longitude, latitude, frame=frame)
|
|
1359
|
+
if reading is None:
|
|
1360
|
+
return None
|
|
1361
|
+
|
|
1362
|
+
tile = self.tile_at(longitude, latitude)
|
|
1363
|
+
at = self._texel_in(tile, longitude, latitude)
|
|
1364
|
+
position = self.tiles.index(tile)
|
|
1365
|
+
|
|
1366
|
+
details = dict(reading)
|
|
1367
|
+
details.update({
|
|
1368
|
+
"attribute": self.attribute,
|
|
1369
|
+
"label": self.label,
|
|
1370
|
+
"dataset": self.dataset,
|
|
1371
|
+
"frames": len(self),
|
|
1372
|
+
"transform": self.transform or None,
|
|
1373
|
+
"vertical_datum": self.vertical_datum,
|
|
1374
|
+
"tile": {
|
|
1375
|
+
"level": tile.get("Level"),
|
|
1376
|
+
"texel_metres": tile.get("TexelMetres"),
|
|
1377
|
+
"resolution": (tile.get("ResolutionX"), tile.get("ResolutionY")),
|
|
1378
|
+
"west": tile.get("West"), "east": tile.get("East"),
|
|
1379
|
+
"south": tile.get("South"), "north": tile.get("North"),
|
|
1380
|
+
},
|
|
1381
|
+
"tile_texel": at,
|
|
1382
|
+
"value_min": self._tile_reading(position, self.LAYER_VALUE_MIN, at),
|
|
1383
|
+
"value_max": self._tile_reading(position, self.LAYER_VALUE_MAX, at),
|
|
1384
|
+
"shift": self._tile_reading(position, self.LAYER_VALUE_SHIFT, at),
|
|
1385
|
+
"baseline": self._tile_flag(position, self.LAYER_BASELINE, at),
|
|
1386
|
+
})
|
|
1387
|
+
return details
|
|
1388
|
+
|
|
1389
|
+
def _tile_reading(self, position: int, name: str, at: Optional[Texel]) -> Optional[float]:
|
|
1390
|
+
"""
|
|
1391
|
+
One texel's number in a named layer of one tile, or None where the layer does not cover it.
|
|
1392
|
+
"""
|
|
1393
|
+
if at is None or name not in self.layers:
|
|
1394
|
+
return None
|
|
1395
|
+
values, covered = self._tile_layer(position, name)
|
|
1396
|
+
if values is None:
|
|
1397
|
+
return None
|
|
1398
|
+
row, column = at
|
|
1399
|
+
return float(values[row][column]) if bool(covered[row][column]) else None
|
|
1400
|
+
|
|
1401
|
+
def _tile_flag(self, position: int, name: str, at: Optional[Texel]) -> bool:
|
|
1402
|
+
"""
|
|
1403
|
+
Whether a mask layer flags one texel of one tile.
|
|
1404
|
+
"""
|
|
1405
|
+
if at is None or name not in self.layers:
|
|
1406
|
+
return False
|
|
1407
|
+
_values, covered = self._tile_layer(position, name)
|
|
1408
|
+
if covered is None:
|
|
1409
|
+
return False
|
|
1410
|
+
row, column = at
|
|
1411
|
+
return bool(covered[row][column])
|
|
1412
|
+
|
|
1347
1413
|
def series_at(self, longitude: float, latitude: float) -> List[dict]:
|
|
1348
1414
|
"""
|
|
1349
1415
|
Every reading at one place over the whole series, in the order the times run.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{bruce_models-0.3.3 → bruce_models-0.3.4}/bruce_models/client_file/client_file_query_builder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|