I'd always assumed that the order the axes are stored in the database was
irrelevant to the end user and the datastore should honour the CRS
requested. I've certainly never needed to force an axis order when using
PostGIS stores.

Do you have a specific case where this isn't working that we can see?

Ian

On Tue, 3 May 2022 at 05:07, Glenn Walbran via GeoTools-Devel <
geotools-devel@lists.sourceforge.net> wrote:

> Hello Geotools developers
>
> I've recently noticed that when reading data from PostGIS with
> PostgisNGDataStoreFactory the feature source has a CRS with a YX axis order.
>
> My understanding is that PostGIS uses an XY axis order.
>
> This is of course having a bad affect on the location of those features.
>
> My plan was to override createCRS() in PostGISDialect and call CRS.decode
> with forceXY set. This is a simple enough fix but I thought I'd canvas
> views from the developer group first. It looks like there would be quite a
> bit of churn in the tests go along with this change.
>
> My assumption is that other users of PostgisNGDataStoreFactory get the
> right result by setting the global forceXY properties, but sadly that isn't
> an option in my case.
>
> Regards
>
> Glenn
> --
> *Glenn Walbran*
> Software Developer
>
> Catalyst IT - Expert Open Source Solutions
> Mob: +64 21 211 1301 | Tel: +64 4 499 2267 | www.catalyst.net.nz
>
> [image: Catalyst Logo]
>
> CONFIDENTIALITY NOTICE: This email is intended for the named recipients
> only. It may contain privileged, confidential or copyright information. If
> you are not the named recipient, any use, reliance upon, disclosure or
> copying of this email or its attachments is unauthorised. If you have
> received this email in error, please reply via email or call +64 4 499 2267.
> _______________________________________________
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>


-- 
Ian Turton
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to