-
Notifications
You must be signed in to change notification settings - Fork 81
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
mercantile.InvalidLatitudeError: Y can not be computed: lat=90 #352
Comments
That's funny. Can you dump a schema of that table? What's the type of those bounds? |
Code reference. |
That's interesting. The data type is SQLA_METADATA_TYPE_LOOKUP: Dict[str, Any] = {
"real": functools.partial(sqla.types.Float, precision=8),
"text": sqla.types.Text,
"blob": sqla.types.LargeBinary,
} MySQL manual says this:
On the other hand, the SQLalchemy docs clarify that the precision arg corresponds to the number of decimal places, not binary precision:
So to me it sounds like the correct solution would be to increase that precision by a lot (for example to 53, as suggested here). @charalamm any thoughts? |
I am trying to serve GeoTIFFs using terracotta and using MySQL as the datastore. However, I am encountering an error during the process.
The GeoTIFF I am using has the following bounds
Upper Left (-180.0000051, 89.9999975) (180° 0' 0.02"W, 89° 59' 59.99"N)
Lower Left (-180.0000051, -90.0000051) (180° 0' 0.02"W, 90° 0' 0.02"S)
Upper Right ( 180.0000051, 89.9999975) (180° 0' 0.02"E, 89° 59' 59.99"N)
Lower Right ( 180.0000051, -90.0000051) (180° 0' 0.02"E, 90° 0' 0.02"S)
Center ( 0.0000000, -0.0000038) ( 0° 0' 0.01"E, 0° 0' 0.01"S)
Traceback
Upon inspecting the metadata table in MySQL, I noticed that the bounds are being rounded off and stored as
bound_noth -180,
bound_east -90,
bound_south 180,
bound_west 90
Note:- This works fine with SQLite DB.
The text was updated successfully, but these errors were encountered: