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

Remove warning about srid not being enforced when geometry_type is None #417

Closed
jwkaltz opened this issue Dec 30, 2022 · 3 comments · Fixed by #418
Closed

Remove warning about srid not being enforced when geometry_type is None #417

jwkaltz opened this issue Dec 30, 2022 · 3 comments · Fixed by #418

Comments

@jwkaltz
Copy link

jwkaltz commented Dec 30, 2022

I think there should be no warning about srid not being enforced when geometry_type is None,
I think these 2 lines should be removed:

if srid > 0:
warnings.warn("srid not enforced when geometry_type is None")

If there is no geometry, it is obvious that srid is not enforced. The warnings pollute the output, for example when running pytest (the warnings can be suppressed in pytest, but it would be clearer if they were not output at all).

@adrien-berchet
Copy link
Member

adrien-berchet commented Jan 3, 2023

Hi @jwkaltz
Thanks for your report!
You're right, these warnings do not make any sense for the Raster type. Nevertheless, it does not make sense to provide geometry_type=None and a specific SRID for Geometry and Geography types, so I would prefer to keep the warning in this case. Is it ok for you? If not, could you give me some details about which case these warnings bother you?

@jwkaltz
Copy link
Author

jwkaltz commented Jan 5, 2023

Thanks for the explanation @adrien-berchet , I found the missing test data in our case which lead to this warning. For me it's OK to proceed as you propose.

@adrien-berchet
Copy link
Member

Ok, cool, thanks for your feedback!

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 a pull request may close this issue.

2 participants