Query Observations by Features
- Get feature from
/api/layers/{name}/features/
, e.g. /api/layers/reserves/features/?format=json
Note
We will implement a method for the simplification of geometry (simplify) in support of this method.
- Extract value from
geometry
field.
- Use geometry for query:
/api/observations/?g={“type”:”Polygon”,”coordinates”:[[[-121.53035370185627,36.40224890642316],[-121.53038370138893,36.400369482748246],[-121.53485943956616,36.40038136441021],[-121.5349186237684,36.3966403685779],[-121.53937798597057,36.39667118125351],[-121.54387609897248,36.39666735694215],[-121.54393639039687,36.393090893445866],[-121.54539695819831,36.39199584586792],[-121.54622332642987,36.39059069904705],[-121.54778829948953,36.389798151635276],[-121.54784727693502,36.38551072724012],[-121.54411181443116,36.38550780584348],[-121.54412390655102,36.38192117460792],[-121.54412999475375,36.38011441024642],[-121.53968184425827,36.38009543926128],[-121.53974588047147,36.37469788714802],[-121.53974767388402,36.37454804421183],[-121.53978862598511,36.37109606799788],[-121.54000324044507,36.363997290448545],[-121.55822399815321,36.36415057998472],[-121.55818404806615,36.35715329381148],[-121.56270845562793,36.35720778401521],[-121.5672328696278,36.35726210008614],[-121.56701795759031,36.36073428517599],[-121.56680265595247,36.36421236691931],[-121.56658750962781,36.36768775852394],[-121.56637236533349,36.37116261840768],[-121.57086473183247,36.37117310728341],[-121.5753570876695,36.37118344357675],[-121.57535799128986,36.376854604551795],[-121.57535825903267,36.37854404517395],[-121.56814416274062,36.37866507697169],[-121.56642187957678,36.378693913675114],[-121.56642762664309,36.379426627864085],[-121.56647692536109,36.385711544935305],[-121.55759446505478,36.38551779647234],[-121.55310027476578,36.38551464695533],[-121.55285607802332,36.39665922226327],[-121.55277470804367,36.400372516510465],[-121.55725283437414,36.40036534159647],[-121.55721007558724,36.40222192952706],[-121.55310545868736,36.402229523774785],[-121.5487942745519,36.40223733624084],[-121.54432530943268,36.40224527513358],[-121.54378207660382,36.40224622289154],[-121.54381342213951,36.40038637501246],[-121.53932979357579,36.40039305445594],[-121.53930570223415,36.402253984617026],[-121.53035370185627,36.40224890642316]]]}
Note
This approach is somewhat slow particularly in combination with search results.
The big advantage is that it can be used with external geometries not stored in the Ecoengine.
Warning
Searches with a high number of returns might timeout.