Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1523

Reading Geo data from database

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • (Java) V4 4.8.0
    • None
    • odata4-server
    • None

    Description

      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:

      row.addProperty(new Property(null, propertyname, ValueType.GEOSPATIAL, value));

      The value is of type text and the type is GEOSPATIAL, this results in a cast exception

      class java.lang.String cannot be cast to class org.apache.olingo.commons.api.edm.geo.Geospatial

      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:

      1. Is there a support for that conversion built in?
      2. Can't there be a shortcut to assign GeoJson and return GeoJson?

       

       

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            wdaehn Werner Daehn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: