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

Do not free the PROJ4 pointers at levels > 1. #8390

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

joa-quim
Copy link
Member

@joa-quim joa-quim commented Mar 4, 2024

With nested calls, as for example pscoast -E, if projections are done with PROJ4 we need those pointers alive when plotting the grid lines that happens only at the end.

Whith nested calls, as for example pscoast -E, if projections are done with PROJ4 we need those pointers alive when plotting the grid lines that happens only at the end.
@joa-quim joa-quim requested a review from a team March 4, 2024 01:13
@anbj
Copy link
Contributor

anbj commented Mar 4, 2024

Don't know how to test this.

@joa-quim
Copy link
Member Author

joa-quim commented Mar 4, 2024

Good point. The need for the change arises when this:

gmt coast -ECA+p0.2 -R-122.913612/36.214964/-9.977657/62.430681+r -J+proj=lcc+lat_0=0+lon_0=-95+lat_1=49+lat_2=77+width=15c/0 -Bpa10g10 -png lixo

Would not plot the grid lines and print lots of error messages issued from GDAL

@anbj
Copy link
Contributor

anbj commented Mar 4, 2024

I get

$ gmt coast -ECA+p0.2 -R-122.913612/36.214964/-9.977657/62.430681+r -J+proj=lcc+lat_0=0+lon_0=-95+lat_1=49+lat_2=77+width=15c/0 -Bpa10g10 -png lixo
ERROR 1: Point outside of projection domain
ERROR 1: Point outside of projection domain

But plot is made and looks good.

@joa-quim
Copy link
Member Author

joa-quim commented Mar 4, 2024

But you get that with the no-free-proj4-at-higher-levels branch, not master, right?

@joa-quim joa-quim closed this Mar 4, 2024
@joa-quim joa-quim reopened this Mar 4, 2024
@anbj
Copy link
Contributor

anbj commented Mar 4, 2024

Yes, sorry. I get this with no-free-proj4-at-higher-levels.

@joa-quim
Copy link
Member Author

joa-quim commented Mar 4, 2024 via email

@joa-quim joa-quim merged commit 72e44b3 into master Mar 4, 2024
11 checks passed
@joa-quim joa-quim deleted the no-free-proj4-at-higher-levels branch March 4, 2024 19:11
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.

None yet

2 participants