Hi all,
I'm working on bringing support for M measurements in WFS. Some parallel work related with this is happening on JTS:
* https://github.com/locationtech/jts/pull/293
* https://github.com/locationtech/jts/pull/291
If I understood the JTS situation correctly, currently is already possible to store the M measurements values in
JTS geometries (XYZM or XYM), but is up to the client code to identify them and handle them. The main goal of the
changes above is to create a cleaner \ explicit JTS API, i.e. make it easier for client code to understand what
type of coordinates are available and make it easier to access the relevant ordinates.
I'm not aware of JTS release schedule, but I guess these changes will land on the next major release ? Which means
that they will not be available for us to use in GT\GS anytime soon. I would like to have the M support for WFS to
land on master before the next GeoServe 2.14.x release, i.e. it need to land on master next week at most.
Not using the new JTS API means that we will need to store the number of measures in the geometry user data.
This would be aligned with the new JTS API approach, quoting Jody comment on one of the pull request above:
I ended up having CoordianteSequence.getDimension() as described in the conversation above, and
CoordianteSequence.getMeasures() being the number of measures (so if we have XYZM dimension is 4 and measures is 1.
... so when the new JTS API becomes available we just need to switch to get the measures value from the JTS API
instead of the user data.
That said, supporting M measurements in WFS will require:
1. correctly read geometries with measurements from data sources
2. correctly encode the measurements in the output formats
3. correctly handling measurements when doing certain operations, e.g. re-projections
The following issue in GeoServer as an interesting discussion about this:
https://osgeo-org.atlassian.net/browse/GEOS-8858
Using PostGIS and GML 3.2. as an example:
1. we will need to take into account the possibility of a measurement value when decoding geometries from postgis:
https://github.com/geotools/geotools/blob/master/modules/plugin/jdbc/jdbc-postgis/src/main/java/org/geotools/data/postgis/WKBReader.java#L194-L197
2. the correct geometry type (LINESTRINGM, LINESTRINGZM, etc ...) can be obtained from the database metadata
3. vouch for the M measurement when encoding coordinates, e.g. linestring encoding for GML 3.2
https://github.com/geotools/geotools/blob/master/modules/extension/xsd/xsd-gml2/src/main/java/org/geotools/gml2/simple/GMLWriter.java#L287-L301
In point 1 or 2 we will store in the user data the measurements number and use it in point 3.
Comments on this are welcome
Cheers,
Nuno Oliveira
--
Regards,
Nuno Oliveira
GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information.
Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
Con riferimento alla normativa sul trattamento dei dati
personali (Reg. UE 2016/679 - Regolamento generale sulla
protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto,
gli eventuali allegati, etc.) è un dato la cui conoscenza
è riservata al/i solo/i destinatario/i indicati dallo
scrivente. Se il messaggio Le è giunto per errore, è
tenuta/o a cancellarlo, ogni altra operazione è illecita.
Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to
which it is addressed and may contain information that
is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European
Regulation 2016/679 “GDPR” - copying, dissemination or
use of this e-mail or the information herein by anyone
other than the intended recipient is prohibited. If you
have received this email by mistake, please notify
us immediately by telephone or e-mail.