Hi Andrea,
please see my answers bellow :)
On 07/31/2018 01:53 PM, Andrea Aime wrote:
I believe it would be nice/useful to have information about the M at the
GeometryDescriptor level,
like done in this commit for the dimensions:
https://github.com/geotools/geotools/commit/a9c4b52c0404ec0357d0006ce8900c209875ec9a
but during a discussion you reported that the info is not always available
and/or we might have
a mix of mesured and non measured geometries, could you elaborate?
Yes the goal is to have the information about the available measurements in the
user data of the geometry descriptor, similar to the dimension information [1],
is this aligned with what you were thinking ?
Data stores like PostGIS and shapefiles allow us to be explicit about the
existence
of a measurement, e.g. using geometry types like PointM or LineStringM, so we
can infer the number of available measurements by looking at the meta-data,
but that may not be the case for all the other supported data stores ...
For the cases where is not possible to infer the number of measurements
automatically
we will need to allow the user to provide it explicitly when configuring the
layer. Note that
this may also be needed for use cases where the user was not explicit about the
geometry type.
For the moment I'm focusing \ supporting only the use cases where we can infer
it automatically.
[1]
https://github.com/geotools/geotools/blob/master/modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCFeatureSource.java#L330
On Tue, Jul 31, 2018 at 2:11 PM Nuno Oliveira <[email protected]
<mailto:[email protected]>> wrote:
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.
This would be a new method in a GeoTools "trait" interface that only some
CoordinateSequences would
implement?
Yes, so basically when reading the geometry from the data source (e.g. PostGIS
[2]) we will store the
information about the available measurements in the geometry user data, then we
will use the new
getMeasures() utility method in the CoordianteSequence trait to get the
information when needed, e.g.
when encoding the geometry to GML 3.2 [3].
[2]
https://github.com/geotools/geotools/blob/master/modules/plugin/jdbc/jdbc-postgis/src/main/java/org/geotools/data/postgis/WKBReader.java#L181-L211
[3]
https://github.com/geotools/geotools/blob/master/modules/extension/xsd/xsd-gml2/src/main/java/org/geotools/gml2/simple/GMLWriter.java#L287-L301
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
Have a look here:
https://github.com/geotools/geotools/blob/9fbd02a320fa19d563972808d226a0a0445a5b13/modules/library/api/src/main/java/org/geotools/geometry/jts/DefaultCoordinateSequenceTransformer.java#L61
Ah yes the re-projections, I hope this class concentrates must of the code used
to re-project the coordinates sequences ...
The following issue in GeoServer as an interesting discussion about this:
https://osgeo-org.atlassian.net/browse/GEOS-8858
Yep, some output formats are allergic to M and we'd have to decide if to
return it as a vendor extension (much like the way
we handle 2.5D data declaring a 2D CRS) and others allow loopholes but again
not all clients might understand.
Ideally that configuration should be per layer basis, i.e. if M are available
select all the output formats that should output it.
My main doubt is how to make that information reach the for example the GML
encoder ... a thread local ? Alternatives here
are welcome :)
Cheers
Andrea
== GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf
Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU)
phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
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./
--
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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel