Scope, architecture, and validation¶
Station metadata and observations¶
NASA AERONET distributes aerosol observations and derived products. The Terradue STAC extension provides station metadata for discovery. This Python package stores that metadata; it does not retrieve measurements, perform cloud screening, calculate aerosol optical depth, or count available days.
Package structure¶
The distribution is pystac-ext-aeronet; its API lives in pystac.extensions.aeronet. The wheel excludes the shared pystac.extensions initializer owned by PySTAC.
AeronetExtension combines PySTAC's PropertiesExtension and ExtensionManagementMixin. It holds a reference to the Item's properties dictionary. Updates through either the Item or wrapper are therefore visible to the other, and ordinary PySTAC serialization preserves the fields.
Only Items are supported. Assets, Catalogs, Collections, and item asset definitions cannot be wrapped. No Collection summary aggregation or automatic extension registration is provided.
Schema identity¶
The code uses this exact URL in stac_extensions:
https://raw.githubusercontent.com/Terradue/aeronet-stac-extension/refs/heads/main/json-schema/schema.json
has_extension() checks exact membership, rather than accepting alternate URLs or versions. The URL tracks the upstream main branch; the Python package version does not pin a schema revision.
At the time of this documentation update, the upstream README lists proposal maturity and retains a template identifier. The schema also retains a template $id and title, but its stac_extensions constraint requires the raw GitHub URL above. Use get_schema_uri() rather than copying the README's template identifier. The schema's Item structure and this implementation determine the supported scope, despite broader template text in the upstream README.
Source: upstream JSON Schema.
Validation boundaries¶
Python annotations describe the accepted types, but setters do not enforce them at runtime. Getters require non-null values; they do not verify the type of an existing value. Extension membership checks also do not validate field contents.
apply() assigns all six fields in sequence. It does not compute values, validate consistency, or provide a transactional update. to_dict() serializes without validating. Use PySTAC's item.validate() separately for schema validation, as described in the how-to guide.
The field reference distinguishes schema constraints from wrapper behavior. Scientific interpretation and the relationship between availability counts and an Item's temporal extent remain the data producer's responsibility.