Skip to content
New issue

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

[FEATURE]: (short description) #470

Open
6tronl opened this issue Dec 15, 2022 · 1 comment
Open

[FEATURE]: (short description) #470

6tronl opened this issue Dec 15, 2022 · 1 comment

Comments

@6tronl
Copy link

6tronl commented Dec 15, 2022

Hello,
I'm facing an issue when cropping an orthomosaic into tiles with solaris.tile.raster_tile.RasterTiler(). My orthomosaics covers a small area (155 m2) and when I crop it into smaller pieces, files are saved in a folder with the following name format : [src-filename]_[longitude]_[latitude].tif. However, longitude and latitude within the file name gets 3 numbers after the coma which is annoying to me because my orthomosaic doesn't cover a large area so, with 3 numbers after the coma, I only get 2 different longitude/latitude values. When saving after cropping, tiles then get the same dest name and are overwritten.

I would like to choose the accucary of longitude and latitude with an argument like dest_fname in the tile() function.

Currently, I have edited the save_tile() in raster_file.py to take 7 numbers after the coma in order to be able to get all my files saved and not overwritten:

            dest_fname = "{}_{}_{}.tif".format(
                dest_fname_root,
                np.round(profile["transform"][2], 7),
                np.round(profile["transform"][5], 7),
            )
@6tronl
Copy link
Author

6tronl commented Dec 15, 2022

Same comment when saving vector.

I have edited the tile() in vector_file.py :

dest_path = os.path.join(
                    self.dest_dir,
                    "{}_{}_{}{}".format(
                        dest_fname_base,
                        np.round(tb[0], 7),
                        np.round(tb[3], 7),
                        output_ext,
                    ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant