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

Unhandled exception if incorrect projection encountered for density layer encountered #374

Closed
timlinux opened this issue Oct 23, 2012 · 2 comments

Comments

@timlinux
Copy link
Contributor

This is another regression. Experienced under windows, though this is probably not a windows specific issue.

To Replicate:

  • hazard layer: Banjir Jakarta seperti 2007
  • exposure layer: Penduduk Jakarta UTM48N
  • press run

Symptom:

Exception caught by QGIS rather than dock resulting in a poor experience for the user.

Traceback:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:\Users\Tim Sutton\.qgis\python\plugins\inasafe\safe_qgis\dock.py", line 947, in accept
    self.run()
  File "C:\Users\Tim Sutton\.qgis\python\plugins\inasafe\safe_qgis\dock.py", line 977, in run
    self.setupCalculator()
  File "C:\Users\Tim Sutton\.qgis\python\plugins\inasafe\safe_qgis\dock.py", line 845, in setupCalculator
    myHazardFilename, myExposureFilename = self.optimalClip()
  File "C:\Users\Tim Sutton\.qgis\python\plugins\inasafe\safe_qgis\dock.py", line 1962, in optimalClip
    theExtraKeywords=extraExposureKeywords)
  File "C:\Users\Tim Sutton\.qgis\python\plugins\inasafe\safe_qgis\clipper.py", line 101, in clipLayer
    theExtraKeywords=theExtraKeywords)
  File "C:\Users\Tim Sutton\.qgis\python\plugins\inasafe\safe_qgis\clipper.py", line 337, in _clipRasterLayer
    raise InvalidProjectionException(myMessage)
InvalidProjectionException: Layer C:/Users/Tim Sutton/.qgis/python/plugins/riab_test_data/Population_Jakarta_UTM48N.tif represents density but has spatial reference "+proj=utm +zone=48 +datum=WGS84 +units=m +no_defs". Density layers must be given in WGS84 geographic coordinates, so please reproject and try again. For more information, see issue https://github.com/AIFDR/inasafe/issues/123

Python version:
2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]


QGIS version:
1.8.0-Lisboa Lisboa, 6416f38

Python path: ['C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python', 'C:/Users/Tim Sutton/.qgis//python', 'C:/Users/Tim Sutton/.qgis//python/plugins', 'C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python/plugins', 'C:\\Progra~2\\Quantu~2\\apps\\Python27', 'C:\\Progra~2\\Quantu~2\\apps\\Python27\\Lib', 'C:\\Progra~2\\Quantu~2\\apps\\Python27\\libs', 'C:\\Progra~2\\Quantu~2\\apps\\qgis\\python', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\bin\\python27.zip', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\DLLs', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\qgis\\bin', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\Users\\Tim Sutton\\.qgis\\python\\plugins\\FlightLines\\tools', 'C:\\Users\\Tim Sutton\\.qgis\\python\\plugins\\FlightLines\\tools\\gdal_modules', 'C:\\Users\\Tim Sutton\\.qgis\\python\\plugins\\inasafe', 'C:\\Users\\Tim Sutton\\.qgis\\python\\plugins\\inasafe', 'C:\\Users\\Tim Sutton\\.qgis\\python\\plugins\\inasafe', 'C:\\PROGRA~2\\Quantum GIS Lisboa\\apps\\qgis\\python\\plugins\\fTools\\tools', 'C:/Users/Tim Sutton/.qgis/python/plugins/riab_test_data']
@timlinux
Copy link
Contributor Author

Can you take a look at this @cchristelis and close it if no longer relevant

@cchristelis
Copy link
Contributor

No longer relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants