@@ -155,9 +155,6 @@ def stac_to_db(
155155 else spatial_extent ["bbox" ]
156156 )
157157 collection_id = collection .get ("id" , "unknown" )
158- logger .debug (
159- f"Converting bbox to bbox_shape for collection '{ collection_id } ': bbox={ bbox } "
160- )
161158
162159 if len (bbox ) >= 4 :
163160 # Extract 2D coordinates (bbox can be 2D [minx, miny, maxx, maxy] or 3D [minx, miny, minz, maxx, maxy, maxz])
@@ -166,26 +163,17 @@ def stac_to_db(
166163 if len (bbox ) == 4 :
167164 # 2D bbox: [minx, miny, maxx, maxy]
168165 maxx , maxy = bbox [2 ], bbox [3 ]
169- logger .debug (
170- f"Collection '{ collection_id } ': Processing 2D bbox"
171- )
172166 else :
173167 # 3D bbox: [minx, miny, minz, maxx, maxy, maxz]
174168 # Extract indices 3,4 for maxx,maxy - discarding altitude at indices 2 (minz) and 5 (maxz)
175169 maxx , maxy = bbox [3 ], bbox [4 ]
176- logger .debug (
177- f"Collection '{ collection_id } ': Processing 3D bbox, discarding altitude values at indices 2 and 5"
178- )
179170
180171 # Convert bbox to GeoJSON polygon
181172 bbox_polygon_coords = bbox2polygon (minx , miny , maxx , maxy )
182173 collection ["bbox_shape" ] = {
183174 "type" : "Polygon" ,
184175 "coordinates" : bbox_polygon_coords ,
185176 }
186- logger .info (
187- f"Collection '{ collection_id } ': Created bbox_shape from bbox [{ minx } , { miny } , { maxx } , { maxy } ]"
188- )
189177 else :
190178 logger .warning (
191179 f"Collection '{ collection_id } ': bbox has insufficient coordinates (length={ len (bbox )} ), expected at least 4"
0 commit comments