@@ -181,7 +181,7 @@ def _resolve_dor(
181181 **and** the object has a ``uuid``/``uid`` attribute (i.e. it is a pointer,
182182 not a value type).
183183 """
184-
184+
185185 if obj is None or workspace is None :
186186 return obj
187187 type_lower = type (obj ).__name__ .lower ()
@@ -321,7 +321,9 @@ def _extract_vertical_crs_details(vertical_crs_obj: Any) -> dict:
321321 **must not** override a parent-level ``ZIncreasingDownward`` when this
322322 value is ``None``.
323323 """
324- logging .debug (f"Extracting vertical CRS details from object of type { type (vertical_crs_obj ).__name__ } with URI { get_obj_uri (vertical_crs_obj )} " )
324+ logging .debug (
325+ f"Extracting vertical CRS details from object of type { type (vertical_crs_obj ).__name__ } with URI { get_obj_uri (vertical_crs_obj )} "
326+ )
325327 result : dict = {
326328 "epsg_code" : None ,
327329 "wkt" : None ,
@@ -437,14 +439,10 @@ def _from_abstract_local3dcrs(
437439 z_increasing_downward = str (zid_raw ).lower () in ("true" , "1" , "yes" )
438440
439441 # --- Projected UOM -----------------------------------------------------
440- projected_uom : Optional [str ] = _uom_to_str (
441- get_object_attribute_no_verif (crs_obj , "projected_uom" )
442- )
442+ projected_uom : Optional [str ] = _uom_to_str (get_object_attribute_no_verif (crs_obj , "projected_uom" ))
443443
444444 # --- Vertical UOM (length or time) ------------------------------------
445- vertical_uom : Optional [str ] = _uom_to_str (
446- get_object_attribute_no_verif (crs_obj , "vertical_uom" )
447- )
445+ vertical_uom : Optional [str ] = _uom_to_str (get_object_attribute_no_verif (crs_obj , "vertical_uom" ))
448446 if vertical_uom is None :
449447 # time_uom only present on LocalTime3dCrs
450448 vertical_uom = _uom_to_str (getattr (crs_obj , "time_uom" , None ))
@@ -459,9 +457,7 @@ def _from_abstract_local3dcrs(
459457 projected_axis_order = ao .replace ("_" , " " ).lower ()
460458
461459 # --- Projected CRS -----------------------------------------------------
462- projected_crs_obj = _resolve_dor (
463- get_object_attribute_no_verif (crs_obj , "projected_crs" ), workspace
464- )
460+ projected_crs_obj = _resolve_dor (get_object_attribute_no_verif (crs_obj , "projected_crs" ), workspace )
465461 projected_details = _extract_projected_crs_details (projected_crs_obj )
466462
467463 # Projected UOM from inline ProjectedCrs takes precedence if present
@@ -471,20 +467,20 @@ def _from_abstract_local3dcrs(
471467 projected_axis_order = projected_details ["axis_order" ]
472468
473469 # --- Vertical CRS ------------------------------------------------------
474- vertical_crs_obj = _resolve_dor (
475- get_object_attribute_no_verif (crs_obj , "vertical_crs" ), workspace
476- )
470+ vertical_crs_obj = _resolve_dor (get_object_attribute_no_verif (crs_obj , "vertical_crs" ), workspace )
477471 vertical_details = _extract_vertical_crs_details (vertical_crs_obj )
478472
479473 # Direction from VerticalCrs overrides the top-level ZIncreasingDownward
480474 # only when explicitly set.
481475 logging .debug ("z_increasing_downward before vertical CRS details: %s" , z_increasing_downward )
482- logging .debug (f"Vertical CRS details: { vertical_details } -- vertical_crs_obj type: { type (vertical_crs_obj ).__name__ if vertical_crs_obj else 'None' } " )
476+ logging .debug (
477+ f"Vertical CRS details: { vertical_details } -- vertical_crs_obj type: { type (vertical_crs_obj ).__name__ if vertical_crs_obj else 'None' } "
478+ )
483479 if vertical_crs_obj is not None and vertical_details .get ("z_increasing_downward" ) is not None :
484480 z_increasing_downward = vertical_details ["z_increasing_downward" ]
485481 if vertical_details .get ("uom" ):
486482 vertical_uom = vertical_details ["uom" ]
487-
483+
488484 logging .debug ("z_increasing_downward after vertical CRS details: %s" , z_increasing_downward )
489485
490486 return CrsInfo (
@@ -547,9 +543,7 @@ def _from_local_engineering2d_crs(
547543 azimuth_reference = ar .replace ("_" , " " ).lower ()
548544
549545 # --- Horizontal UOM (HorizontalAxes.projected_uom or uom on ProjectedCrs) ---
550- projected_uom : Optional [str ] = _uom_to_str (
551- get_object_attribute (crs_obj , "horizontal_axes.projected_uom" )
552- )
546+ projected_uom : Optional [str ] = _uom_to_str (get_object_attribute (crs_obj , "horizontal_axes.projected_uom" ))
553547
554548 # --- ProjectedCrs — may be an inline object OR a DOR ------------------
555549 projected_crs_raw = get_object_attribute_no_verif (crs_obj , "origin_projected_crs" )
@@ -920,10 +914,7 @@ def extract_crs_info(
920914 # ------------------------------------------------------------------
921915 # v2.0.1 types (LocalDepth3dCrs, LocalTime3dCrs, AbstractLocal3dCrs)
922916 # ------------------------------------------------------------------
923- if any (
924- kw in type_name_lower
925- for kw in ("localdepth3dcrs" , "localtime3dcrs" , "abstractlocal3dcrs" , "local3dcrs" )
926- ):
917+ if any (kw in type_name_lower for kw in ("localdepth3dcrs" , "localtime3dcrs" , "abstractlocal3dcrs" , "local3dcrs" )):
927918 return _from_abstract_local3dcrs (crs_obj , workspace )
928919
929920 # ------------------------------------------------------------------
0 commit comments