Logo
  • Home

Tutorials

  • Translate your first filter

How-to guides

  • Search the catalogue
  • Convert responses
  • Develop and preview documentation

Reference

  • Python API
  • Operators
  • Attributes
  • CLI
  • OData-STAC crosswalk
  • Container builds
  • Example notebooks
    • pygeofilter CDSE OData support for CQL2
    • Supported Comparison operators
    • Spatial operators
    • Temporal operators

Explanation

  • Translation and conversion
pygeofilter CDSE OData support for CQL2
  • Reference
  • Example notebooks
  • Spatial operators
  • Edit on Terradue/pygeofilter-odata-cdse

Intersects¶

s_intersects is, at the moment, the only Geographical supported operator, i.e.

In [2]:
Copied!
from pygeocdse.evaluator import to_cdse

cql2_filter = {
    "op": "s_intersects",
    "args": [
        {"property": "geometry"},
        {
            "type": "Polygon",
            "coordinates": [
                [
                    [12.655118166047592, 47.44667197521409],
                    [21.39065656328509, 48.347694733853245],
                    [28.334291357162826, 41.877123516783655],
                    [17.47086198383573, 40.35854475076158],
                    [12.655118166047592, 47.44667197521409],
                ]
            ],
        },
    ],
}

print(to_cdse(cql2_filter))
from pygeocdse.evaluator import to_cdse cql2_filter = { "op": "s_intersects", "args": [ {"property": "geometry"}, { "type": "Polygon", "coordinates": [ [ [12.655118166047592, 47.44667197521409], [21.39065656328509, 48.347694733853245], [28.334291357162826, 41.877123516783655], [17.47086198383573, 40.35854475076158], [12.655118166047592, 47.44667197521409], ] ], }, ], } print(to_cdse(cql2_filter))
OData.CSC.Intersects(area=geography'SRID=4326;POLYGON ((12.655118166047592 47.44667197521409, 21.39065656328509 48.347694733853245, 28.334291357162826 41.877123516783655, 17.47086198383573 40.35854475076158, 12.655118166047592 47.44667197521409))')
Previous Next

Apache License, Version 2.0

Built with MkDocs using a theme provided by Read the Docs.
Terradue/pygeofilter-odata-cdse « Previous Next »