Closed ocefpaf closed 9 years ago
It seems kind of crazy to request floating point pixels, so it would be nice if cartopy/owslib could round to nearest integer pixel, no?
This was also asked (unanswered) here: https://groups.google.com/forum/#!searchin/scitools-iris/Filipe/scitools-iris/rpELfZtdDto/RVo7_kZkEyoJ
Ultimately it boils down to the following URL being passed to OWSLib:
Bad URL (floats):
Closed by #587. Thanks for reporting @ocefpaf - this will be fixed by v0.12.0.
Sorry, I should have been clearer :flushed:
np.ceil(2.1)
results in 2.0
, still not an int so the issue persists.
ServiceException: u'Invalid WIDTH value, NumberFormatException : For input string: "481.0"'
PS: Now that I know where to make the changes I can send a PR fixing this.
I am not sure if this is a cartopy bug or if I am doing something wrong. The code below fails to create an image with the error,
I notice that, if I force the
width
andheight
to be integers, at slippy_image_artist.py line 55, the figure is created (but I am not sure if I mess up the proportions).Other WebMapService URLs work fine with the width and height as float. Just some, like the one below, fails.
Thanks,
-Filipe