@@ -173,7 +173,7 @@ def _clip_vector_to_bounding_box(
173173
174174@functools .lru_cache
175175def cached_file_info (vsi_file_path , file_type ):
176- app .logger .info ("Getting file info... " )
176+ app .logger .info (f "Getting file info for { file_type } at { vsi_file_path } " )
177177 if file_type == RASTER :
178178 try :
179179 return pygeoprocessing .get_raster_info (vsi_file_path )
@@ -286,7 +286,10 @@ def clip():
286286 # align the bounding box
287287 source_file_path = f'/vsicurl/{ parameters ["file_url" ]} '
288288 if source_file_type == VECTOR :
289- source_file_path = source_file_path .replace ('.mvt' , '.fgb' )
289+ # source_file_path originates in `mappreview` extra; currently always .mvt,
290+ # but leaving this flexible in case we support .geojson again in the future
291+ filename , _ = os .path .splitext (source_file_path )
292+ source_file_path = filename + '.fgb'
290293
291294 source_file_info = cached_file_info (source_file_path , source_file_type )
292295
@@ -300,7 +303,7 @@ def clip():
300303 target_bbox , source_file_info ['projection_wkt' ],
301304 warping_kwargs ['target_projection_wkt' ])
302305 except KeyError :
303- # If we're keeping the same project , just align the requested bounding
306+ # If we're keeping the same projection , just align the requested bounding
304307 # box to the raster's grid.
305308 aligned_target_bbox = _align_bbox (target_bbox , source_file_info )
306309
0 commit comments