cjindex
Dagster resource wrapping the published cityjson-index package.
The pipeline keeps this module path for compatibility while exposing the package-oriented CityJSON index API used by downstream assets.
CityIndexResource
¶
Bases: ConfigurableResource
Dagster resource for a cityjson_index.OpenedIndex over a stage.
Source code in packages/common/src/bag3d/common/resources/cjindex.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
from_filestore(filestore_root, stage, index_path_override=None)
classmethod
¶
Build a resource from a filestore root and stage name.
Source code in packages/common/src/bag3d/common/resources/cjindex.py
78 79 80 81 82 83 84 85 86 87 88 89 90 | |
open()
¶
Return an opened native index for this resource's dataset.
Source code in packages/common/src/bag3d/common/resources/cjindex.py
72 73 74 75 76 | |
city_model_to_feature_json(model)
¶
Serialize a native CityJSONFeature model and release it.
Source code in packages/common/src/bag3d/common/resources/cjindex.py
41 42 43 44 45 46 47 48 | |
iter_package_refs(index, page_size)
¶
Yield package-ref pages and advance using the page's final record ID.
Source code in packages/common/src/bag3d/common/resources/cjindex.py
28 29 30 31 32 33 34 35 36 37 38 | |
open_ready_index(resource)
¶
Open the index and rebuild it when its source dataset is stale.
Source code in packages/common/src/bag3d/common/resources/cjindex.py
58 59 60 61 62 63 | |
package_ref_page_after_record_id(index, after_record_id, page_size)
¶
Return one keyset page of package refs, ordered by record ID.
Source code in packages/common/src/bag3d/common/resources/cjindex.py
19 20 21 22 23 24 25 | |
read_package_feature_json(index, ref)
¶
Read a package and convert its native model to a CityJSONFeature dict.
Source code in packages/common/src/bag3d/common/resources/cjindex.py
51 52 53 54 55 | |