We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We could easily allow custom stacks with a geographic projection
Here is the code to create a VRT from the given input path:
# If we have an EPSG:4326 custom stack, reproject it with rasterio.open(input_path) as ds: if ds.crs.is_geographic: utm_crs = gpd.GeoDataFrame(geometry=[geometry.from_bounds_to_polygon(*ds.bounds)], crs=ds.crs).estimate_utm_crs() with rasterio.vrt.WarpedVRT(ds, **{"crs": utm_crs.to_epsg()}) as vrt: utm_name = path.get_filename(input_path) + f"_{utm_crs.to_epsg()}.vrt" utm_path = str(output_folder / utm_name) rasterio.shutil.copy(vrt, utm_path, driver="vrt") input_path = utm_path # Open the custom stack prod = reader.open( input_path, custom=True, sensor_type="OPTICAL", band_map=custom_band_map, pixel_size=pixel_size, remove_tmp=True )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We could easily allow custom stacks with a geographic projection
Here is the code to create a VRT from the given input path:
The text was updated successfully, but these errors were encountered: