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

Tooltip issue with ch.bafu.karst-einzugsgebiete #3520

Open
procrastinatio opened this issue Jul 20, 2020 · 2 comments
Open

Tooltip issue with ch.bafu.karst-einzugsgebiete #3520

procrastinatio opened this issue Jul 20, 2020 · 2 comments

Comments

@procrastinatio
Copy link
Contributor Author

procrastinatio commented Jul 20, 2020

Hmm, a geometry without coordinates...

[Mon Jul 20 13:53:25.698814 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     response = view_callable(context, request)
[Mon Jul 20 13:53:25.698835 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/.venv/lib/python2.7/site-packages/pyramid/config/views.py", line 169, in __call__
[Mon Jul 20 13:53:25.698861 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     return view(context, request)
[Mon Jul 20 13:53:25.698882 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/.venv/lib/python2.7/site-packages/pyramid/viewderivers.py", line 436, in rendered_view
[Mon Jul 20 13:53:25.698923 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     result = view(context, request)
[Mon Jul 20 13:53:25.698944 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/.venv/lib/python2.7/site-packages/pyramid/viewderivers.py", line 144, in _requestonly_view
[Mon Jul 20 13:53:25.698970 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     response = view(request)
[Mon Jul 20 13:53:25.698991 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/chsdi/views/features.py", line 53, in identify_esrijson
[Mon Jul 20 13:53:25.699016 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     return _identify(request)
[Mon Jul 20 13:53:25.699038 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/chsdi/views/features.py", line 247, in _identify
[Mon Jul 20 13:53:25.699068 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     featuresDB = _identify_db(params, layersDB)
[Mon Jul 20 13:53:25.699090 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/chsdi/views/features.py", line 330, in _identify_db
[Mon Jul 20 13:53:25.699112 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     features.append(_process_feature(feature, params))
[Mon Jul 20 13:53:25.699130 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/chsdi/views/features.py", line 812, in _process_feature
[Mon Jul 20 13:53:25.699151 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     srid=params.srid)
[Mon Jul 20 13:53:25.699172 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/chsdi/models/vector/__init__.py", line 133, in to_esrijson
[Mon Jul 20 13:53:25.699198 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     layerName=trans(self.__bodId__))
[Mon Jul 20 13:53:25.699220 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/.venv/lib/python2.7/site-packages/esrijson/feature.py", line 24, in __init__
[Mon Jul 20 13:53:25.699246 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     geom = from_shape(geometry, wkid=wkid)
[Mon Jul 20 13:53:25.699267 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]   File "/var/www/vhosts/mf-chsdi3/private/chsdi/.venv/lib/python2.7/site-packages/esrijson/geometry.py", line 106, in from_shape
[Mon Jul 20 13:53:25.699292 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574]     coords = first.pop('coordinates')
[Mon Jul 20 13:53:25.699327 2020] [wsgi:error] [pid 27486] [remote 10.220.6.81:53574] KeyError: 'coordinates'

@procrastinatio
Copy link
Contributor Author

The geometry is a collections of different types, which cannot converted to esrijson:

{'geometries': [{'geometries': [{'coordinates': (2564903.2, 1220621.8, 0.0),
                                 'type': 'Point'},
                                {'coordinates': (2569590.1, 1224215.7, 0.0),
                                 'type': 'Point'},
                                {'coordinates': (2569845.8, 1224194.6, 0.0),
                                 'type': 'Point'},
                                {'coordinates': (2570084.1, 1224153.7, 0.0),
                                 'type': 'Point'},
                                {'coordinates': (2570725.1, 1224845.7, 0.0),
                                 'type': 'Point'},
                                {'coordinates': (2571009.1, 1225046.7, 0.0),
                                 'type': 'Point'},
                                {'coordinates': (2574499.5, 1226911.2, 0.0),
                                 'type': 'Point'}]},
                {'coordinates': (((2575592.4, 1227578.9, 0.0),
                                  (2574720.7, 1227286.3, 0.0),
                                  (2574032.2, 1227051.4, 0.0),
                                   [snip...]
                                  (2575592.4, 1227578.9, 0.0)),),
                 'type': 'Polygon'}]}

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

No branches or pull requests

1 participant