3

I'm running Alexander Hajnal's Python module (http://alephnull.net/software/gis/tile_writer.shtml) in QGIS (2.14.3, Win10 64) and I'm using the EPSG:3857 as crs.

I got this error:

"Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "c:/users/gregor~1/appdata/local/temp/tmpqgu4ow.py", line 107, in <module>
    mx_min, my_min = gm.LatLonToMeters(lat, lon)
  File "C:/Users/gregordavid/.qgis2/python/plugins\globalmercator.py", line 178, in LatLonToMeters
    my = math.log( math.tan((90 + lat) * math.pi / 360.0 )) / (math.pi / 180.0)
ValueError: math domain error"

Can I solve the problem?

  • 2
    the script uses lat and lon coordinates that would cause the problem. Can u transform your coordinates into EPSG:4326? – axel_ande Mar 8 '17 at 14:55
  • my coordinates are into EPSG 4326 and I have the same problem. – Nana Dec 23 '18 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.