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

Find world file for .jpeg extension #672

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

baswein
Copy link

@baswein baswein commented May 30, 2022

Thanks for the amazing add-on! I'm new to this please ignore if I'm way off base here.

Adds the ability to load .jpegs with .jgw world files.
fixes: #568

Because the splitting of extensions is based on the last three characters in the path ([-3:]) the extension in foo.jpeg ends up being "peg" and the path ends up being "foo.j" so for the test I am appending "gw" to "foo.j to get "foo.jgw".

I am new to coding and this seems like it works and is in line with the other extension tests. However it doesn't seem very robust. I wonder if using os.path.splitext() and a list of world file extensions to check would be simpler.

I can imagine a scenario where you have both a jpeg and a png in the same folder with the same name and it would pick up the wrong world file. In which case it should be: if this file extension then look for these world file extensions.

Tiff files with .tiff extensions with world files don't and no internal georeferencing might have the same probelm.

Adds the ability to load .jpegs with .jgw world files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jpeg with jgw file not importing. png does work
1 participant