5 Replies Latest reply on Sep 26, 2012 8:19 PM by MaximeD

    Strange behaviour in web cartographic application

      Hi group,

      I have noticed a strange behaviour with the overview tool of my web application with MapInfo data uploaded in Oracle 10g with EasyLoader. When I put the cursor near the limit of some polygons but outside of its surface, the overview tool shows the info of this polygon when it should show the info of the neighbor polygon. It's like if the boundary of the polygon is outside of its limit but visually the borders are looking good.

      After many tests, I think the problem may be related with the tolerance precision and the table bounds in sdo_metadata. The table is in lat/long (8307) and the tolerance setted by Easyloader is X: 7.9013E-6 and Y:1.01201E-5

      In MapInfo I gave this bounds to the table: min x: -82.0483359 min y: 43.2322719 max x: -54.6521931 max y: 64.3415211 but when loaded in Oracle the bounds are automatically set to -180/180 and -90/90

      I tried to change the tolerance and the bounds in Oracle and create a new spatial index without success. Changing the bounds in MapInfo prior uploading to Oracle was unsuccessfull as well.

      Anything else could be tryed?
      Thank you

      Maxime D.
        • 1. Re: Strange behaviour in web cartographic application
          What tool are you using for viewing the data?
          Does the SRID information correlate with the coordinate system in use (8307)? (in the data as in sdo_geom_metadata)
          Does this match with the setting for your viewing tool?
          E.g., in MapX (desktop tool) there is an extra table mapinfo_mapcatalog in the mapinfo user where you have to set all information additionally to sdo_geom_metadata that the tool shows the data correctly.

          When EasyLoader sets the bounds to -180/180 res. -90/90 it seems that it believes that is a non Earth Projection, which would mean there is no geodetic projection (not CS 8307) ? Are you using the latest version of EasyLoader?
          • 2. Re: Strange behaviour in web cartographic application
            Simon Greener

            Didn't you contact me privately about something like this? No matter.
            the tolerance setted by Easyloader is X: 7.9013E-6 and Y:1.01201E-5
            These tolerances are not what Oracle says should be set for geodetic (8307) data. From the documentation...
            The tolerance value for geodetic data should not be smaller than 0.05 (5 centimeters)
            You can do one of two things:

            1. If you have SQL Developer, install GeoRaptor and then right mouse click on the table in the connect pane and select Metadata Manager. Then calculate XY values and if GeoRaptor doesn't set the tolerances to 0.05 do it manually. Then press Update.
            2. Using SQLPlus or SQL Developer's SQL Worksheet, do this:
            update user_sdo_geom_metadata 
            set diminfo = SDO_DIM_ARRAY(SDO_DIM_ELEMENT(-82.0483359,-54.6521931,0.05),
                   SRID = 8307
            where table_name = YOUR TABLE
              and column_name = YOUR SDO_GEOMETRY COLUMN NAME;
            NOTE: It is OK to have ordinate ranges different from -180..180, -90..90.

            Drop your index and rebuild.

            Should now be OK.

            If it starts to misbehave again (and the metadata has been changed) then all one could say is that perhaps the MapInfo software is modifying the metadata some how. Perhaps this is related to the MAPINFO_MAPCATALOG?
            Any MapInfo gurus know?

            • 3. Re: Strange behaviour in web cartographic application
              Thank you to both of you for your support,

              First of all I think I have mingled the origin of the problem here. I tried your suggestion, Simon, but when I change the tolerance to 0.05, the problem is worst. More polygons than before have the strange behaviour i'm talking about in the first post. I confirm also that the SRID is 8307 in metadata. Second, curiously there is many other tables used in the same application which are not affected even with the tolerance set automatically with EasyLoader.

              I suppose now that the origin of this problem could be something else. I used FME 2012 to create the tables with the MITAB writer. In some forum people are experiencing some problems with this writer as I encountered like the snap mode disable in MapInfo and strange bounds behaviour. See: https://groups.google.com/forum/?fromgroups=#!searchin/fmetalk/mapinfo$20snap/fmetalk/xD6ui8wbGSo/N8TJjXsYhiEJ

              I will try with the MFAL writer in FME and maybe it will correct the problem with the overview tool. If not, I presume that the problem is in the settings of the cartographic application itself and it would be more complicated for me to fix the bug.

              If there is some MapInfo or FME Guru that could tell if yes or no MITAB writer with bounds can generate problem in Oracle, I would appreciate.

              Thank you for your support again.

              Max Demars
              • 4. Re: Strange behaviour in web cartographic application
                Simon Greener

                If these are the bounds that the loader set:
                Then they look OK so this may not be your problem.

                You have never shown us any actual sdo_geometry data. Show us one very small geometry (ie only a handful of ordinates).

                If the bounds are correct, perhaps it is the MAPINFO_MAPCATALOG settings. What are the settings for this dataset you are having problems with? Does the DB_X_LL/DB_X_UR and DB_Y_LL/DB_Y_UR match the above? Are the settings for this table the same as the ones that are behaving?

                Looking at the referenced Google Group I would say you might be better off trying MFAL writer. However, have you tried exporting the data from MapInfo to a shapefile, then loading the resultant shapefile using FME?

                • 5. Re: Strange behaviour in web cartographic application
                  Thank you Simon for your good advices,

                  I have verified MAPINFO_MAPCATALOG boundaries and there is no problem from that side. The sdo_geom_metadata seems ok too. Unfortunately, I will have to wait few weeks to test with the MFAL writer because I am waiting for my new licence (i cant use the demo anymore...)

                  Here is a sample of geometry: