Skip to Content
0
Jun 15, 2016 at 10:17 AM

Spatial query returns a few rows and then returns an error.

385 Views

We use .NET Sap.Data.Hana.v4.5 version 1.0.120.0.

I have the following spatial query, which is returning rows, but sometimes raises an error.

SELECT T1.SHAPE.ST_AsBinary() FROM (SELECT * FROM SYSTEM.AUTOBAAN WHERE SHAPE.ST_IntersectsFilter(ST_GeomFromWKB(:Param1, 28992)) = 1) T1


We sometimes get this exception, but after already returning more than a dozen rows.


spatial error: exception 1600401: Invalid WKB byte order (28) at position 0 at function st_geomfromwkb()

at Sap.Data.Hana.HanaException.CheckException(Int32 idEx)
at Sap.Data.Hana.HanaDataReader.Read()

Param1 is a Polygon in WKB format, which does not have an SRS_ID yet

The strange thing is that this is returning rows for many other tables that we query without any issues

and even for this autobaan table sample it returns rows sometimes with and sometimes without issues.


Any help please?


Patrick