9 Replies Latest reply: May 28, 2013 7:33 AM by jsharma-Oracle RSS

    Problem with GoogleTileLayer

    916271
      Hi everyone!

      I'm trying display Google maps as tile layers like this:

      var googleLayer = new OM.layer.GoogleTileLayer(
      "mapCacheGoogle", {
      mapTypeList:"OM.layer.GoogleTileLayer.TYPE_ROAD;OM.layer.GoogleTileLayer.TYPE_SATELLITE;OM.layer.GoogleTileLayer.TYPE_SHADED",
      mapTypeVisible:true
      });

      map.addLayer(googleLayer);

      But it doesn't work, and I receive this error:

      java.sql.SQLException: ORA-13199: SRID does not exist.
      ORA-06512: em "MDSYS.MD", line 1723
      ORA-06512: em "MDSYS.MDERR", line 17
      ORA-06512: em "MDSYS.SDO_CS", line 5010
      ORA-06512: em "MDSYS.SDO_CS", line 2845

           at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
           at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
           at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
           at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
           at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
           at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
           at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
           at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
           at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
           at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
           at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
           at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
           at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
           at oracle.lbs.mapserver.core.InfoWorker.processPointSRIDConversion(InfoWorker.java:899)
           at oracle.lbs.mapserver.core.InfoWorker.processSRIDConversion(InfoWorker.java:945)
           at oracle.lbs.mapcache.MCSServlet.transformCS(MCSServlet.java:538)
           at oracle.lbs.mapcache.MCSServlet.doPost(MCSServlet.java:326)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
           at java.security.AccessController.doPrivileged(Native Method)
           at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
           at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
           at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
           at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
           at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

      I'm using the 3857 srid.

      How can I solve it, please?

      Thank you!

      Edited by: fe.mag on 22/05/2013 11:21
        • 1. Re: Problem with GoogleTileLayer
          jsharma-Oracle
          The database version has to be 11.2.0.3 or later.
          Check if the database has 3857 defined.
          Connected to:
          Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
          With the Partitioning, OLAP, Data Mining and Real Application Testing options

          SQL> select cs_name from cs_srs where srid=3857;

          CS_NAME
          --------------------------------------------------------------------------------

          WGS 84 / Pseudo-Mercator

          SQL>
          • 2. Re: Problem with GoogleTileLayer
            916271
            Hi Jayant !

            I'm using this version and the SRID exists!
            • 3. Re: Problem with GoogleTileLayer
              jsharma-Oracle
              OK. What is the srid for the other layers (if any) that you are trying to display?

              Or post more of your code snippet here.
              • 4. Re: Problem with GoogleTileLayer
                916271
                The SRID is 1010101. It was created by us.

                The query below:

                select wktext from cs_srs where srid = 1010101 returns:

                PROJCS["Gauss-Kruger_PortoAlegre", GEOGCS [ "Unknown datum based upon the International 1924 ellipsoid", DATUM ["Not specified (based on International 1924 ellipsoid) (EPSG ID 6022)", SPHEROID ["International 1924 (EPSG ID 7022)", 6378388.0, 297.0]], PRIMEM [ "Greenwich", 0.000000 ], UNIT ["Decimal Degree", 0.0174532925199433]], PROJECTION ["Transverse Mercator"], PARAMETER ["Latitude_Of_Origin", 0.0], PARAMETER ["Central_Meridian", -51.0], PARAMETER ["Scale_Factor", 1.0], PARAMETER ["False_Easting", 200000.0], PARAMETER ["False_Northing", 5000000.0], UNIT ["Meter", 1.0]]
                • 5. Re: Problem with GoogleTileLayer
                  jsharma-Oracle
                  That may be the cause here. To confirm do the following.
                  First, try the map without any additional layers and only a google tile layer. That'll confirm that mvgoogletilelayer is working as expected.

                  Second try a cs_transform in the database. login as the user which has the additional layers in srid 1010101 and try
                  select sdo_cs.transform(geom_in_1010101, 3857) geom3857 from table_with_geom_in_1010101 where rownum < 3 and geom_in_1010101 is not null ;

                  Check if that works. Then also test if srid 3785 works, i.e if
                  select sdo_cs.transform(geom_in_1010101, 3785) geom3785 from table_with_geom_in_1010101 where rownum < 3 and geom_in_1010101 is not null ;
                  works.
                  • 6. Re: Problem with GoogleTileLayer
                    916271
                    I made the query and the result was:


                    SQL> select sdo_cs.transform(geom, 3857) geom3857 from gpg_arborizacao where rownum < 3 and geom is not null;



                    GEOM3857(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
                    --------------------------------------------------------------------------------

                    SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-5699888,9, -3507220,3, NULL), NULL, NULL)

                    SDO_GEOMETRY(2001, 3857, SDO_POINT_TYPE(-5699880,5, -3507345,2, NULL), NULL, NULL)


                    SQL> select sdo_cs.transform(geom, 3785) geom3785 from gpg_arborizacao where rownum < 3 and geom is not null ;



                    GEOM3785(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
                    --------------------------------------------------------------------------------

                    SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-5699888,9, -3485835,9, NULL), NULL, NULL)

                    SDO_GEOMETRY(2001, 3785, SDO_POINT_TYPE(-5699880,5, -3485960,2, NULL), NULL, NULL)
                    • 7. Re: Problem with GoogleTileLayer
                      jsharma-Oracle
                      All I can think of is that the mapviewer instance is connecting to a different database.
                      Anyway does the google tile layer work by itself? With no additional vector layers?

                      And does the same example work with a different tile layer (e.g. the mvdemo one or the elocation tile layer)?

                      Lastly, set the log level to finest.
                      It'll indicate the query used for fetching the vector features or whichever sql query causes the no srid error.
                      • 8. Re: Problem with GoogleTileLayer
                        916271
                        Yes. The google tile layer work by itself, with no additional vector layer.
                        I also tried the Bing and OSM tile layers and they also work fine with no additional vector layers.
                        However, if I try to define the map center using a point based on SRID 1010101, the same problem happens.
                        Reading the documentation, I understood that, in this case, a server side transformation would be necessary.

                        If I try:

                        map.setMapCenter(new OM.geometry.Point(178854,1676149,1010101));
                        map.init() ;


                        When the init() function runs, the transformation error happens.
                        I tried something like the code below, to force a server side transformation, but the callback function is never called.

                        var lpoint = new OM.geometry.Point(178854,1676149,1010101);
                        var lpoint8307;



                        lpoint.transform(8307,function(_geom){
                        lpoint8307 = _geom;

                        });

                        map.setMapCenter(lpoint8307);
                        map.setMapZoomLevel(13) ;
                        map.init() ;

                        As the only layer added to the OM.Map is the google tile layer, is necessary to inform the datasource to the transform method?
                        • 9. Re: Problem with GoogleTileLayer
                          jsharma-Oracle
                          "As the only layer added to the OM.Map is the google tile layer, is necessary to inform the datasource to the transform method?"
                          No you should not have to.

                          Will try and reproduce this.

                          Could you send us your coordinate system definition please.

                          Did you file an SR on this?

                          Anyway email me the details (cs definition and code snippet)
                          firstname dot lastname at oracle