Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

GeoJson to sdo_geometry

martvJan 16 2020 — edited Jan 23 2020

Hi,

I've upgraded from DB 18.2 to  "Oracle Database 19c EE High Perf Release 19.0.0.0.0 - Production

Version 19.5.0.0.0"

Following selects ( 1 and 2 ) used to work on 18.2

1)

  select  geo

    from json_table('{"type":"LineString","coordinates":[[522967.33783563285,6726161.056502306],[523093.458976041,6726229.849816829],[523226.2683272657,6726236.538027645]]}', '$'

    columns ( geo varchar2(3000) format json path '$'

        )) ; 

2)

select  JSON_VALUE(GEOTYPE ,'$' RETURNING SDO_GEOMETRY) as geo

    from json_table('{"type":"LineString","coordinates":[[522967.33783563285,6726161.056502306],[523093.458976041,6726229.849816829],[523226.2683272657,6726236.538027645]]}', '$'

    columns ( "GEOTYPE" varchar2(3000) format json path '$'

        )) ;     

3)       

  select  geo

    from json_table('{"type":"LineString","coordinates":[[522967.33783563285,6726161.056502306],[523093.458976041,6726229.849816829],[523226.2683272657,6726236.538027645]]}', '$'

    columns ( geo sdo_geometry  path '$'

        )) ;

On 19.5

     select 2 is not working anymore, disconnected from DB.

     tried select 3 but also disonnects from DB.

Any idea?

Greetings

This post has been answered by martv on Jan 23 2020
Jump to Answer

Comments

Post Details

Added on Jan 16 2020
6 comments
275 views