[geotk] CRS issue with WFS module

Stephane Fellah stephanef at imagemattersllc.com
Fri Oct 27 09:09:16 PDT 2017


Martin,

Yes, definitely we will test it. You plan to deploy 4.0.4 on maven repo
will work for us.
Please note that the CRS URL is truncated in the WFSFeatureStore


The code snippet that breaks is in the WFSFeatureStore.java  (line 138)

//extract the feature type -----------------------------------------
CoordinateReferenceSystem crs;
FeatureType sft;
try {
    String defaultCRS = ftt.getDefaultCRS();
    if(defaultCRS.contains("EPSG")){
        final int last = defaultCRS.lastIndexOf(':');
       * defaultCRS = "EPSG:"+defaultCRS.substring(last+1);*
    }
    crs = CRS.forCode(defaultCRS);
    if (getLongitudeFirst()) {
        crs = AbstractCRS.castOrCopy(crs).forConvention(AxesConvention.RIGHT_HANDED);
    }
    sft = requestType(typeName);
}


Simone has redeployed the WFS using the short version "EPSG:4326" to see if
the problem is solved, However, we ran into another issue with Geoserver.
The coordinates of lat/long are flipped when the short version is used on
Geoserver.
Only the preservation of the full URL will keep the order lat/long. I will
forward to you the email thread related to this problem.




Regards




On Fri, Oct 27, 2017 at 11:16 AM, Martin Desruisseaux <
martin.desruisseaux at geomatys.com> wrote:

> Hello Stephane
>
> Indeed, the srsName attribute in gml:Envelope is of type anyURI. My
> interpretation is that the "urn:ogc:def:crs:epsg:…" syntax is more adequate
> than "EPSG:…" there. I'm not sure why WFSFeatureStore uses the short
> form; maybe at the time it was written, not all servers understood the URN
> form.
>
> I can try modify Geotk 4.0.0 for using the URN form. I think (but I'm not
> sure) it would be at line 576 of GTtoSE110Transformer. If I try a change,
> would you have an opportunity to test? What would be the preferred approach?
>
>    - You checkout the source code and propose the line to edit.
>    - I deploy a 4.0.4-SNAPSHOT version (the changes in 4.0.1 to 4.0.3
>    should not affects WFS).
>
> If we get a test to work, I can deploy a 4.0.4 on
> http://maven.geotoolkit.org/ if useful.
>
>     Martin
>
>


-- 
Stephane Fellah
Chief  Knowledge Scientist
Image Matters LLC
Office: +(703) 669 5510
Cell: 703 431 9420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20171027/54eee5f9/attachment.html>


More information about the Geotoolkit mailing list