-
Notifications
You must be signed in to change notification settings - Fork 826
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
Wrong values for !pixel_width! and !pixel_height! #1937
Comments
I'm trying to fix this but get_bbox().width() returns 0 and !scale_denom! is also zero, how can that be ? |
Never mind, I was using a silly extent value (indeed 0-sized) |
With a proper extent it looks like my computation for !pixel_width! and !pixel_height! end up being 10x bigger than scale_denom, why is so ? What's the meaning of scale_denom ? |
Also, what's the meaning of query.resolution ? It works pretty much as I'd expect when the layer input is latlon and the output projection is webmercator (ie: it gives about output_size / latlon_extent) but if I set the same projection for layer and map then resolution starts giving wild values like 6e-6 while rendering italy, independently on the advertised layer extent. All I'd need is the extent of the layer, in layer projection, the extent of the map, in map projection and the size of the output image. |
Also, note to self (thanks @springmeyer), the scale_denominator variable is another weird thing: |
Ok, I know how to get to the layer extent, so what I'm missing now is the map extent (in map projection) and the output image size |
After further analisys I can't confirm those values are broken. At least not in normal conditions. |
Alright, closing this one as invalid, the values are correct,the problem is elsewhere |
Theoretically the tokens should give the size of a pixel in geographical units.
Instead they seem to be giving 1/size_of_output_in_pixel.
I'm surprised it went unnoticed for all this time, or could it be that the semantic of query.resolution changed ? See #1181
The text was updated successfully, but these errors were encountered: