Skip to content

Commit

Permalink
configure reprojection
Browse files Browse the repository at this point in the history
  • Loading branch information
ninsbl committed Jul 22, 2024
1 parent 13b07f2 commit c10e4ab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/raster/r.avaframe.com1dfa_v2/r.avaframe.com1dfa_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ def get_shape_file_and_config(area_type, module_config, module_options):
if not ogr_dataset_area:
ogr_dataset_area = gdal.OpenEx(parse.unquote(area), gdal.OF_VECTOR)
layer_area = ogr_dataset_area.GetLayerByIndex(0)
layer_crs = layer_area.GetSpatialRef()
config_area = dict(
layer_area.GetNextFeature()
) # first feature contains config attributes
Expand All @@ -399,10 +400,10 @@ def get_shape_file_and_config(area_type, module_config, module_options):
/ f"{module_config['release_name']}.shp"
),
ogr_dataset_area,
options=gdal.VectorTranslateOptions(
format="ESRI Shapefile",
dstSRS=location_crs,
),
format="ESRI Shapefile",
dstSRS=location_crs,
srcSRS=layer_crs,
reproject=True,
)

return module_config
Expand Down

0 comments on commit c10e4ab

Please sign in to comment.