Closed ajanett closed 6 years ago
@ajanett Thanks a lot for your contribution!
During verification of this pull request I created issue #46. Unfortunately parsing of the crs definitions from the specification fails for all CRS except 4326.
@lgoltz You are welcome.
It is unfortunately, not totally unexpected that crs definition parsing is having issues... from what I found, the WKT parsers seem to be rather sensitive, and it is terribly easy for that parse to fail. Hence, this is why I put in some detailed error reporting on exactly which WTK the parse failed on.
It is also pretty much impossible to actually "compare" WTKs, which this test ultimately wants to do. The WKT classes do not provide for an equality test with another WKT; and looking up and trying to compare equality of the portions of the WKT doesn't work either. I did try all of that.
My recommendation is inform the NSG that the software capabilities necessary to support this test are not mature enough - and it would take some significant effort to mature them. About all we could really do with any accuracy is: a) test the SRS ID numbers and ensure they meet the NSG required subset. and perhaps b) parse the WKT and fail the test if the WKT is not "parseable" - which still would mean the test will fail for all CRS except 4326 at this time.
Replace geotools references with geotoolkit capabilities. This removes the dependency on gt-reference, (and thereby removing the dependency on gt-metadata because it is a dependency of gt-reference). We know that gt-metadata causes problems when included as a dependency because it conflicts with other ets- packages. This should help with issue (although there may be other test packages that still include gt-metadata): https://github.com/opengeospatial/ets-wfs20/issues/97
Verify all references used for CRS tests are correct, changing to the consistent and hopefully the better references. While addressing the dependencies, verified all functions used for CRS tests are making use of the same dependency library and that that dependency is consistent with the factory finder - which for some reason has to come from a different dependency but at least it now is the correct factory finder dependency for this particular set of coordinate system dependencies. This corrects the issue: https://github.com/opengeospatial/ets-gpkg12-nsg/issues/35
Updated CRS tests to include capture of WKT parse problems. The code performing the CRS tests was revised to accurately report WKT parse problems vs. issues with the WKT in the GeoPackage being different than the WKT specified. The code also notes that there are limitations. The WKT has several variants and details that could be included causing a failure for non-equivalence to the specification. Since the current WKT libraries do not allow for a generalized comparison, there is not much we can do about it without extensive development to handle WKT variations and comparison. See issue: https://github.com/opengeospatial/ets-gpkg12-nsg/issues/34 and https://github.com/opengeospatial/ets-gpkg12-nsg/issues/27
Updated SQL string verify for string operation optimizations. This update takes advantage of a performance enhancement that was added to the gpkg12 and will also help here.