5 Replies Latest reply: Aug 1, 2012 3:03 PM by bkazar RSS

    sdo_util.from_gml311geometry and NLS

    user644135
      Hello,

      We use sdo_util for simple conversions between coordinates. The problem is that this function changes NLS settings:

      SQL> select parameter, value from nls_session_parameters;

      PARAMETER VALUE
      ------------------------------ ----------------------------------------
      NLS_LANGUAGE POLISH
      NLS_TERRITORY POLAND
      NLS_CURRENCY z│
      NLS_ISO_CURRENCY POLAND
      NLS_NUMERIC_CHARACTERS ,
      NLS_CALENDAR GREGORIAN
      NLS_DATE_FORMAT YYYY-MM-DD HH24:MI:SS
      NLS_DATE_LANGUAGE POLISH
      NLS_SORT POLISH_CI
      NLS_TIME_FORMAT HH24:MI:SSXFF
      NLS_TIMESTAMP_FORMAT RR/MM/DD HH24:MI:SSXFF
      NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
      NLS_TIMESTAMP_TZ_FORMAT RR/MM/DD HH24:MI:SSXFF TZR
      NLS_DUAL_CURRENCY z│
      NLS_COMP ANSI
      NLS_LENGTH_SEMANTICS BYTE
      NLS_NCHAR_CONV_EXCP FALSE

      17 wierszy zosta│o wybranych.

      SQL> select sdo_util.from_gml311geometry('<gml:Point srsName="EPSG:2180" xmlns:gml="http://www.opengis.net/gml"> <gml:posList srsDimension="2">273217.480335267 442804.87743167 </gml:posList></gml:Point>') from dual;

      SDO_UTIL.FROM_GML311GEOMETRY('<GML:POINTSRSNAME=EPSG:2180XMLNS:GML=HTTP://WWW.OP
      --------------------------------------------------------------------------------
      SDO_GEOMETRY(2001, 2180, SDO_POINT_TYPE(273217,48, 442804,877, NULL), NULL, NULL
      )


      SQL> select parameter, value from nls_session_parameters;

      PARAMETER VALUE
      ------------------------------ ----------------------------------------
      NLS_LANGUAGE AMERICAN
      NLS_TERRITORY AMERICA
      NLS_CURRENCY $
      NLS_ISO_CURRENCY AMERICA
      NLS_NUMERIC_CHARACTERS .,
      NLS_CALENDAR GREGORIAN
      NLS_DATE_FORMAT DD-MON-RR
      NLS_DATE_LANGUAGE AMERICAN
      NLS_SORT BINARY
      NLS_TIME_FORMAT HH.MI.SSXFF AM
      NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
      NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
      NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
      NLS_DUAL_CURRENCY $
      NLS_COMP BINARY
      NLS_LENGTH_SEMANTICS BYTE
      NLS_NCHAR_CONV_EXCP FALSE

      17 rows selected.


      Temporarily, we enclose sdo_util by our function that restores our NLS settings.
      Is it a bug or misuse? Strange is that sdo_util.to_gml311geometry doesn't have this feature.

      Database version: 11.2.0.2, 11.2.0.3 Standard on different platforms.

      I'll appreciate your help.
        • 1. Re: sdo_util.from_gml311geometry and NLS
          Paul Dziemiela
          Czesc nieznany,

          I don't see that happening on my default AMERICAN NLS setup for 11.2.0.3. It could be something specific to your Polish setup. I would open a support ticket and post how it gets resolved here.

          Cheers,
          Paul
          SELECT parameter, value FROM nls_session_parameters WHERE parameter IN ('NLS_LANGUAGE','NLS_NUMERIC_CHARACTERS');
          
          ALTER SESSION SET NLS_LANGUAGE = 'POLISH';
          ALTER SESSION SET NLS_TERRITORY = 'POLAND';
          
          SELECT parameter, value FROM nls_session_parameters WHERE parameter IN ('NLS_LANGUAGE','NLS_NUMERIC_CHARACTERS');
           
          SELECT sdo_util.from_gml311geometry('<gml:Point srsName="EPSG:2180" xmlns:gml="http://www.opengis.net/gml"> <gml:posList srsDimension="2">273217.480335267 442804.87743167 </gml:posList></gml:Point>') FROM dual;
          
          SELECT parameter, value FROM nls_session_parameters WHERE parameter IN ('NLS_LANGUAGE','NLS_NUMERIC_CHARACTERS');
          PARAMETER      VALUE 
          --------------------------------------------------------------------------------
          NLS_LANGUAGE AMERICAN                                                                        
          NLS_NUMERIC_CHARACTERS   .,                                                                              
          2 rows selected.
          
          Session altered.
          Session altered.
          
          PARAMETER      VALUE 
          --------------------------------------------------------------------------------
          NLS_LANGUAGE   POLISH                                                                                                                   
          NLS_NUMERIC_CHARACTERS   ,                                                                                                                                          
          2 rows selected.
          
          SDO_UTIL.FROM_GML311GEOMETRY('<GML:POINTSRSNAME="EPSG:2180"XMLNS:GML="HTTP://WWW
          --------------------------------------------------------------------------------
          (2001, 2180, (273217,480335267, 442804,87743167, ), (, , , , , , , , , , , , , ,
           , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
           , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
           , , , , , ), (, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
           , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
           , , , , , , , , , , , , , , , , , , , , , , , , , , ))                                                       
          1 row selected.
          
          PARAMETER      VALUE 
          --------------------------------------------------------------------------------
          NLS_LANGUAGE  POLISH                                                                                                                                      
          NLS_NUMERIC_CHARACTERS  ,                                                                                                                                     
          2 rows selected.
          {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
          • 2. Re: sdo_util.from_gml311geometry and NLS
            bkazar
            Hi,-
            We are looking into this issue.
            Thanks for reporting it.
            Thanks
            baris
            • 3. Re: sdo_util.from_gml311geometry and NLS
              bkazar
              Hi,-
              Yes, this is a bug and i will let you know the bug #.
              Thanks
              • 4. Re: sdo_util.from_gml311geometry and NLS
                user644135
                Thank you. I'll be glad to know the bug number.
                • 5. Re: sdo_util.from_gml311geometry and NLS
                  bkazar
                  Hi,-
                  Sure, it is Bug 14216300.
                  Thanks