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

Incorrect world file name when generating GeoTIFF file #7844

Closed
seisman opened this issue Sep 25, 2023 · 5 comments · Fixed by #7865
Closed

Incorrect world file name when generating GeoTIFF file #7844

seisman opened this issue Sep 25, 2023 · 5 comments · Fixed by #7865
Labels
bug Something isn't working

Comments

@seisman
Copy link
Member

seisman commented Sep 25, 2023

Issue first reported at GenericMappingTools/pygmt#2698 (comment).

gmt psbasemap -R0/10/0/10 -JM10c -Baf > map.ps
gmt psconvert -A -P -W+g map.ps

The commands above produce two files: map.tiff and map.pgw.

The world file map.pgw makes no sense here:

  1. The output file is .tiff, so the expected world file extension should be .tfw, not .pgw
  2. Since the GeoTIFF file already has the georeference information embedded, a world file seems useless. Perhaps we should delete the world file in this case?
@seisman
Copy link
Member Author

seisman commented Oct 2, 2023

Ping @PaulWessel and @joa-quim for comments on this issue so that we can take the same action in the PyGMT side.

@PaulWessel
Copy link
Member

Leaving this to @joa-quim since he wrote that module.

@seisman
Copy link
Member Author

seisman commented Oct 3, 2023

Ping @joa-quim

@joa-quim
Copy link
Member

joa-quim commented Oct 3, 2023

Yes, that .pgw is a mistake. But can't you just ignore it. Apparently it bothered nobody for ~15 years.

@seisman
Copy link
Member Author

seisman commented Oct 4, 2023

Better to fix it if it's a mistake.

PaulWessel added a commit that referenced this issue Oct 4, 2023
See #7844 for discussion.  Closes #7844. Note to @joa-quim : In messages that says

...the Proj4 command...

should that be PROJ or are these things still called proj4 even though we are at proj9?
PaulWessel added a commit that referenced this issue Oct 4, 2023
…sted (#7865)

* Ignore writing world file if geotiff output is requested

See #7844 for discussion.  Closes #7844. Note to @joa-quim : In messages that says

...the Proj4 command...

should that be PROJ or are these things still called proj4 even though we are at proj9?

* Update psconvert.c

Keep old world_file name so it can be deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants