Opened 4 years ago

Closed 18 months ago

Last modified 18 months ago

#550 closed defect (fixed)

SECORE to ignore GML xmlsd during equality checks

Reported by: pcampalani Owned by: bphamhuu
Priority: minor Milestone: 9.0.x
Component: secore Version: development
Keywords: equality xmlsd Cc: dmisev
Complexity: Medium

Description

SECORE can return false to an equality check when the xmlsd is slightly different.
Although this can make sense, it also makes the equality check a little less robust in cases like:

http://localhost:8090/def/equal?
   1=http://www.opengis.net/def/crs/EPSG/0/4326&
   2=http://localhost:8090/def/crs/EPSG/0/4326

where true is supposed to be returned.

Change History (6)

comment:1 Changed 4 years ago by pcampalani

The current response in the reference URL above is:

<comparisonResult xmlns="http://www.opengis.net/crs-nts/1.0" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd">
  <equal>false</equal>
  <reason>
    <![CDATA[
      [different] Expected namespace URI 'http://www.opengis.net/gml' but was 'null' - comparing <GeodeticCRS...> at /GeodeticCRS[1] to <GeodeticCRS...> at /GeodeticCRS[1]
    ]]>
  </reason>
</comparisonResult>

Since the two definitions define a different gml:xmlsd:

Last edited 4 years ago by pcampalani (previous) (diff)

comment:2 Changed 18 months ago by bphamhuu

As Dimitar has suggested before, so I will take this ticket and try to understand SECORE.

comment:3 Changed 18 months ago by bphamhuu

  • Owner changed from dmisev to bphamhuu
  • Status changed from new to assigned

comment:4 Changed 18 months ago by bphamhuu

Hi Dimitar (Piero also if you see this message),

it looks like this ticket has been fixed before as when I tried to compare 2 GML from opengis.net and SECORE version, it returns "true".

http://localhost:8080/def/equal?1=http://www.opengis.net/def/crs/EPSG/0/4326&2=http://localhost:8080/def/crs/EPSG/0/4326
<comparisonResult xmlns="http://www.opengis.net/crs-nts/1.0" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd">
<equal>true</equal>
</comparisonResult>

or

http://localhost:8080/def/equal?1=http://localhost:8080/def/crs/EPSG/0/3857&2=http://www.opengis.net/def/crs/EPSG/0/3857

With a information about I cannot debug SECORE yesterday.

When try to use Netbean to debug SECORE, it is mess up with URL (when using GlassFish? set context-root to "/" by glassfish-web.xml) so I added a if condition and now its behavior is the same as war file deploying by Make install.

Context-root will help URL like "http://localhost:8080/def" instead of "http://localhost:8080/secore-web/def".

 if (!"".equals(req.getContextPath())) # this will not remove "/def" if root context is "/"
    {
      StringUtil.SERVLET_CONTEXT = req.getContextPath();
      // as it has "/def/def" when deployed without debug then it needs to remove 1 "/def"
      uri = StringUtil.removeDuplicateDef(uri);
    }    

I've found this when debug war file creating by "make install" with Netbeans attach debugger and compare with debug secore-web project by Netbeans.

comment:5 Changed 18 months ago by dmisev

  • Resolution set to fixed
  • Status changed from assigned to closed

Ok let's close this ticket then.

Can you put the unrelated information somewhere in the secore dev guide?

comment:6 Changed 18 months ago by bphamhuu

Note: See TracTickets for help on using tickets.