Hi Jukke,

Just patched spatialite driver in OpenJUMP.
Can you try different geometry types, and if possible, with different byte order ?
Not sure what happens wih geometry M and geometry ZM.

Michaël

Le 16/02/2016 13:40, Rahkonen Jukka (MML) a écrit :

Hi,

I can confirm that with the patched jts jar I can read XYZ geometries from GeoPackage database. Points, lines, and polygons tested. It would be very nice to get even a patched temporary read-only support for OGC style XYZ geometries into OpenJUMP soon without a need to wait until JTS will support them.

-Jukka Rahkonen-

Michaël Michaud wrote:

Thanks Jukka,

I was not aware of this difference between postgis wkb and ogc wkb.
Now, it is clear why I've never had problem with postgis 3D wkb and why there is problem with geopackage driver.

We'll have to make some suggestion to MD for JTS, but we have some options there. JTS can manage 2D coordinates (very well), 3D coordinates (just holding information), and even 4D geometries (poorly = 4th dimension is generally lost after geometry processing)
JTS has not clear semantic for Z, M, ZM.

In the attached prototype, I made the simplest patch I could do :
if geometry type is > 1000, consider it is a 3D geometry (may be buggy for geometryZM which is 4D)
another option would be :
if geometry type is > 1000 and < 2000, consider it is a 3D geometry and throw an error over 2000

For wkb writer, it is another problem as we cannot write postgis wkb AND ogc wkb at the same time. We'll have to add an option to the writer. We have to discuss that with MD.

Please, let me know if the attached proto resolve the problem (you have to add .jar and drop it in /lib folder in replacement of jts-1.14.0.jar).

As official JTS-1.14 has just been released and 1.15 is probably far ahead, we can also circumvent the problem by changing the wkb byte array in the geopackage reader so that it conforms to postgis wkb. It would need to extract and transform the four geometry type bytes. Not too difficult, but a bit convoluted

Michaël

Le 11/02/2016 11:26, Rahkonen Jukka (MML) a écrit :

    Hi,

    Pasting this thread
    https://lists.osgeo.org/pipermail/geos-devel/2013-December/006757.html
    for making it easier to find from the OpenJUMP archives what is
    the difference between XYZ  geometries as they appear in OGC WKT
    and in the PostGIS EWKB. Adding also some keywords from the
    original error:

    unknown wkb type 235

    It seems that the fix requires enhancement to JTS WKBReader/Writer
    for making it possible to the OGC style XYZ, XYM, and XYZM WKB.

    Quotation from JTS 1.14 source file
    
https://sourceforge.net/p/jts-topo-suite/code/HEAD/tree/trunk/jts/java/src/com/vividsolutions/jts/io/WKBWriter.java

    * This implementation also supports the <b>Extended WKB</b>

     * standard. Extended WKB allows writing 3-dimensional coordinates

    * and including the geometry SRID value.

     * The presence of 3D coordinates is signified

    * by setting the high bit of the <tt>wkbType</tt> word.

    * The presence of an SRID is signified

     * by setting the third bit of the <tt>wkbType</tt> word.

    * EWKB format is upward compatible with the original SFS WKB format.

    If you will write to JTS list you could perhaps suggest to at
    least add here and there in the code and javadocs a clear notice
    telling that only 2D OGC WKB is supported.

    -Jukka Rahkonen-




    
------------------------------------------------------------------------------

    Site24x7 APM Insight: Get Deep Visibility into Application Performance

    APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month

    Monitor end-to-end web transactions and take corrective actions now

    Troubleshoot faster and improve end-user experience. Signup Now!

    http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140




    _______________________________________________

    Jump-pilot-devel mailing list

    Jump-pilot-devel@lists.sourceforge.net
    <mailto:Jump-pilot-devel@lists.sourceforge.net>

    https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140


_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to