This discussion is archived
5 Replies Latest reply: Sep 26, 2012 1:19 PM by 961099 RSS

Strange behaviour in web cartographic application

961099 Newbie
Currently Being Moderated
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
    761512 Newbie
    Currently Being Moderated
    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 Journeyer
    Currently Being Moderated
    Maxime,

    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),
                                SDO_DIM_ELEMENT(43.2322719,64.3415211,0.05)),
           SRID = 8307
    where table_name = YOUR TABLE
      and column_name = YOUR SDO_GEOMETRY COLUMN NAME;
    commit;
    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?

    regards
    Simon
  • 3. Re: Strange behaviour in web cartographic application
    961099 Newbie
    Currently Being Moderated
    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 Journeyer
    Currently Being Moderated
    Max,

    If these are the bounds that the loader set:
    SDO_DIM_ARRAY(SDO_DIM_ELEMENT(-82.0483359,-54.6521931,0.05),
                                SDO_DIM_ELEMENT(43.2322719,64.3415211,0.05)),
    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?

    regards
    Simon
  • 5. Re: Strange behaviour in web cartographic application
    961099 Newbie
    Currently Being Moderated
    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:

    MDSYS.SDO_GEOMETRY(2003,8307,MDSYS.SDO_POINT_TYPE(-71.2864223932284,45.5254522199789,NULL),MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(-71.3048486416316,45.506824204703,-71.2972278017967,45.5122484057135,-71.2972004467481,45.5112317737174,-71.2626768001546,45.5117104787162,-71.2540155644006,45.5110030761116,-71.2527915595326,45.5440802352548,-71.2719946803572,45.5305899579232,-71.2874303932085,45.5401907083249,-71.3056665534749,45.5259573009845,-71.3136157223832,45.5222969149547,-71.3084652064426,45.5188815017619,-71.3200535967721,45.5164741818739

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points