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

s2_l2a invalid geometry #246

Closed
pindge opened this issue Dec 3, 2020 · 0 comments · Fixed by #248
Closed

s2_l2a invalid geometry #246

pindge opened this issue Dec 3, 2020 · 0 comments · Fixed by #248
Assignees

Comments

@pindge
Copy link
Collaborator

pindge commented Dec 3, 2020

[2020-12-03 04:19:34,519] {pod_launcher.py:156} INFO - b'{"event":"generate.product.error","exception":"Traceback (most recent call last):\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py\\", line 1277, in _execute_context\\n    cursor, statement, parameters, context\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/default.py\\", line 593, in do_execute\\n    cursor.execute(statement, parameters)\\npsycopg2.errors.InternalError_: GEOSUnaryUnion: TopologyException: Input geom 1 is invalid: Self-intersection at or near point 776529.00604099256 1599917.9983541947 at 776529.00604099256 1599917.9983541947\\n\\n\\nThe above exception was the direct cause of the following exception:\\n\\nTraceback (most recent call last):\\n  File \\"/env/lib/python3.6/site-packages/cubedash/generate.py\\", line 96, in generate_report\\n    force_dataset_extent_recompute=recreate_dataset_extents,\\n  File \\"/env/lib/python3.6/site-packages/cubedash/summary/_stores.py\\", line 268, in refresh_product\\n    self._refresh_product_regions(product)\\n  File \\"/env/lib/python3.6/site-packages/cubedash/summary/_stores.py\\", line 302, in _refresh_product_regions\\n    dataset_type.id,\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py\\", line 2235, in execute\\n    return connection.execute(statement, *multiparams, **params)\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py\\", line 1003, in execute\\n    return self._execute_text(object_, multiparams, params)\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py\\", line 1178, in _execute_text\\n    parameters,\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py\\", line 1317, in _execute_context\\n    e, statement, parameters, cursor, context\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py\\", line 1511, in _handle_dbapi_exception\\n    sqlalchemy_exception, with_traceback=exc_info[2], from_=e\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/util/compat.py\\", line 182, in raise_\\n    raise exception\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/base.py\\", line 1277, in _execute_context\\n    cursor, statement, parameters, context\\n  File \\"/env/lib/python3.6/site-packages/sqlalchemy/engine/default.py\\", line 593, in do_execute\\n    cursor.execute(statement, parameters)\\nsqlalchemy.exc.InternalError: (psycopg2.errors.InternalError_) GEOSUnaryUnion: TopologyException: Input geom 1 is invalid: Self-intersection at or near point 776529.00604099256 1599917.9983541947 at 776529.00604099256 1599917.9983541947\\n\\n[SQL: \\n        with srid_groups as (\\n             select cubedash.dataset_spatial.dataset_type_ref                         as dataset_type_ref,\\n                     cubedash.dataset_spatial.region_code                             as region_code,\\n                     ST_Transform(ST_Union(cubedash.dataset_spatial.footprint), 4326) as footprint,\\n                     count(*)                                                         as count\\n              from cubedash.dataset_spatial\\n              where cubedash.dataset_spatial.dataset_type_ref = %s\\n              group by cubedash.dataset_spatial.dataset_type_ref,\\n                       cubedash.dataset_spatial.region_code,\\n                       st_srid(cubedash.dataset_spatial.footprint)\\n        )\\n        insert into cubedash.region (dataset_type_ref, region_code, footprint, count)\\n            select srid_groups.dataset_type_ref,\\n                   coalesce(srid_groups.region_code, \'\')                          as region_code,\\n                   ST_SimplifyPreserveTopology(\\n                           ST_Union(ST_Buffer(srid_groups.footprint, 0)), 0.0001) as footprint,\\n                   sum(srid_groups.count)                                         as count\\n            from srid_groups\\n            group by srid_groups.dataset_type_ref, srid_groups.region_code\\n        on conflict (dataset_type_ref, region_code)\\n            do update set count           = excluded.count,\\n                          generation_time = now(),\\n                          footprint       = excluded.footprint\\n\\n            ]\\n[parameters: (2,)]\\n(Background on this error at: http://sqlalche.me/e/13/2j85)","extents":false,"force":true,"level":"exception","product":"s2_l2a","timestamp":"2020-12-03T04:19:34.516595Z"}\n'

@pindge pindge self-assigned this Dec 3, 2020
@pindge pindge linked a pull request Dec 7, 2020 that will close this issue
@pindge pindge closed this as completed Dec 7, 2020
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

Successfully merging a pull request may close this issue.

1 participant