Werner Daehn created OLINGO-1523: ------------------------------------ Summary: Reading Geo data from database Key: OLINGO-1523 URL: https://issues.apache.org/jira/browse/OLINGO-1523 Project: Olingo Issue Type: Bug Components: odata4-server Affects Versions: (Java) V4 4.8.0 Reporter: Werner Daehn
I am reading a column GEODATA of type ST_GEOMETRY datatype from SAP Hana via JDBC. Obviously what that returns is a byte[] of the Hana internal representation. Does not help. So I use the Hana Spatial method GEODATA.ST_AsGeoJSON() to get one of the many supported standard geo representations. In the collection processor the value gets assigned: {code:java} row.addProperty(new Property(null, propertyname, ValueType.GEOSPATIAL, value));{code} The value is of type text and the type is GEOSPATIAL, this results in a cast exception {code:java} class java.lang.String cannot be cast to class org.apache.olingo.commons.api.edm.geo.Geospatial{code} All understandable. I would need to parse the GeoJson (or whatever format), translate that into a olingo native Geometry objects so that the serializer can then convert that to geojson when the $format=json. That raises two questions: # Is there a support for that conversion built in? # Can't there be a shortcut to assign GeoJson and return GeoJson? -- This message was sent by Atlassian Jira (v8.3.4#803005)