Noark 5 API-et og geosøk med OData

Petter Reinholdtsen pere at hungry.com
Mon Dec 9 22:14:22 CET 2019


[Thomas Sødring]
> Hentet fra:
>
> https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html

Ah, utmerket.
<URL: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html >
har mer informasjon:

> 5.1.1.11 Geo Functions
> 5.1.1.11.1 geo.distance
> The geo.distance function has the following signatures:
> 
> Edm.Double geo.distance(Edm.GeographyPoint,Edm.GeographyPoint)
> Edm.Double geo.distance(Edm.GeometryPoint,Edm.GeometryPoint)
> 
> The geo.distance function returns the shortest distance between the two points in the coordinate reference system signified by the two points’ SRIDs.
> 
> 5.1.1.11.2 geo.intersects
> The geo.intersects function has the following signatures:
> 
> Edm.Boolean geo.intersects(Edm.GeographyPoint,Edm.GeographyPolygon)
> Edm.Boolean geo.intersects(Edm.GeometryPoint,Edm.GeometryPolygon)
> 
> The geo.intersects function returns true if the specified point lies within the interior or on the boundary of the specified polygon, otherwise it returns false.
> 
> 5.1.1.11.3 geo.length
> The geo.length function has the following signatures:
> 
> Edm.Double geo.length(Edm.GeographyLineString)
> Edm.Double geo.length(Edm.GeometryLineString)
> 
> The geo.length function returns the total length of its line string
> parameter in the coordinate reference system signified by its SRID.

Videre står det i
<URL: http://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html >:

> 7.2.6 SRID
> For a geometry or geography property the SRID facet identifies which spatial reference system is applied to values of the property on type instances.
> 
> The value of the SRID facet MUST be a non-negative integer or the special value variable. If no value is specified, the attribute defaults to 0 for Geometry types or 4326 for Geography types.
> 
> The valid values of the SRID facet and their meanings are as defined by the European Petroleum Survey Group [EPSG].
> 
> | Attribute SRID
> | 
> | The value of $SRID is a number or the symbolic value variable.

Finner så langt ingen definisjon av Edm.GeographyPoint som strider mot
Posisjon i API-spesifikasjonen.  Bruksmessig ser de ut til å virke på
samme måte.

-- 
Vennlig hilsen
Petter Reinholdtsen


More information about the nikita-noark mailing list