Skip to content
Snippets Groups Projects

Resolve "Create a rule that gets the construction date from cadaster data for Tabula dataset."

Compare and Show latest version
1 file
+ 15
15
Compare changes
  • Side-by-side
  • Inline
@@ -22,21 +22,21 @@ class DateFromValencianCadasterRule(AbstractRule):
def __call__(self, database: PostGISDatabase, geometry: str, *args, **kwargs):
"""
This rule is to provide an additional source for a building's construction year for
the Valencia province in Spain if it is not available in OSM. A building's geometry is
tested for intersection with a cadastral parcel in the source database. If such a parcel
exists, its construction date is taken from the related cadastral buildings table.
Args:
database (PostGISDatabase):
Source database that contains the cadastral data, including the two necessary
tables `parcels` and `cadaster_buildings`.
geometry (str):
Geometry of the building being currently processed. The geometry is a WKT
formatted string wrapped in the `ST_GeomFromText()` function.
Returns:
Integer that represents the building's construction year.
This rule provides an additional source for a building's construction year for
the Valencia province in Spain if it is not available in OSM. A building's geometry is
tested for intersection with a cadastral parcel in the source database. If such a parcel
exists, its construction date is taken from the related cadastral buildings table.
Args:
database (PostGISDatabase):
Source database that contains the cadastral data, including the two necessary
tables `parcels` and `cadaster_buildings`.
geometry (str):
Geometry of the building being currently processed. The geometry is a WKT
formatted string wrapped in the `ST_GeomFromText()` function.
Returns:
Integer that represents the building's construction year.
"""
Loading