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

2D Tiff plot option #282

Merged
merged 7 commits into from
Sep 21, 2021
Merged

2D Tiff plot option #282

merged 7 commits into from
Sep 21, 2021

Conversation

AsianHam
Copy link
Contributor

@AsianHam AsianHam commented Aug 6, 2021

Created an plotting option that plots via GDAL and creates TIFF files

To use, set plot type to '2d_gtiff'

Currently does not work on macOS.

Implemented gdal method of rasterization into visclaw

allows user to map via 2d_gtiff instead of matplotlib

provided example setplot.py

users can plot via gdal or matplotlib at the same time if setplot.py is set that way.
Included example setplot file to contains settings for both matplotlib and gdal mapping.
Added support for Gdal 3.2.1 on macOS
@donnaaboise
Copy link
Contributor

How are you installing GDAL? I've had some trouble installing it recently - I use it for supporting plot2kml (for Google Earth plotting) in VisClaw.

@mandli
Copy link
Member

mandli commented Aug 6, 2021

Heh, that has been a source of frustration for awhile. GDAL versioning also is an issue.

@rjleveque
Copy link
Member

I've been using conda environments and haven't had problems with gdal recently, although I don't think I'm using many parts of it, so there may be issues I'm not aware of.

The .yml file I use includes (among many other things):

channels:
- conda-forge
dependencies:
- gdal
- libgdal

@rjleveque
Copy link
Member

@AsianHam: Thanks for contributing a PR!

Unfortunately, the gdal_merge.py file that is included in this PR is GPL licensed, and hence we cannot include it in Clawpack (without making all of Clawpack GPL, which we don't want to do).

Since that code comes from a different developer, I think it would be best to simply list it as a dependency, with a pointer to where to obtain the code for those who want to use it. And with an informative error message for users who don't have it installed.

Also, I'd like to try this out, but am working on a Mac. What is the issue that keeps it from working on MacOS?

@mandli
Copy link
Member

mandli commented Aug 7, 2021

I have not any issues installing GDAL but the significant version differences have been an issue. The conda version for instance I believe is pretty old at this point, which also causes problems. The major issue we did have though we think was a weird incompatibility with libtiff library and GDAL that is used with the GeoTIFF functionality. This seemed to be only a problem on MacOS but it was a versioning problem as far as I could see (version incompatibilities between GDAL and libtiff).

@AsianHam
Copy link
Contributor Author

AsianHam commented Aug 7, 2021 via email

Copy link
Contributor Author

@AsianHam AsianHam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed gdal_merge

@mandli
Copy link
Member

mandli commented Aug 8, 2021

Do you need gdal_merge though to do AMR plotting? If so I would say leave it and just say that the MacOS version is broken right now.

@AsianHam
Copy link
Contributor Author

AsianHam commented Aug 8, 2021 via email

@mandli
Copy link
Member

mandli commented Aug 9, 2021

Oh, so you are just going to chalk this up to the awesome that is GDAL installation woes? That's fine with me.

@rjleveque
Copy link
Member

@mandli: I pointed out above that gdal_merge.py is GPL licensed, which is why I suggested removing it and listing it as a dependency instead.

@mandli
Copy link
Member

mandli commented Aug 9, 2021

@rjleveque I think our replies must have crossed as I never saw your post. Sorry about that.

@rjleveque
Copy link
Member

Seems fine to merge this now, sorry for the delay!

@rjleveque rjleveque merged commit b6786bc into clawpack:master Sep 21, 2021
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.

4 participants