Mike, while converting the wkb's might be a workaround, wouldn't it be cleaner and more helpful, to check the JTS sources and develop a patch for them?
..ede On 17.02.2016 23:58, Michaël Michaud wrote: > You are right. I will deactivate reading of ZM geometries. I will be better > to have nothing. > > I get the same behaviour as yuo from geometry collections. I'll try to have a > deeper look. > Also the yellow message sometimes show up for other geometries with M if the > previous import already throwed an exception... > > Michaël > > Le 17/02/2016 23:41, Rahkonen Jukka (MML) a écrit : >> >> Hi, >> >> I got basically same results. I do not agree with simple geometries and ZM, >> for example linestingZM (1 2 3 200, 4 5 6 200) becomes >> >> LINESTRING (1 2 3, 200 4 5). And I have something odd with 2D >> geometrycollection. OJ reads the feature but it does not show on the map and >> there is a message at lower left corner “Unknown WKB type 233”. However, I >> can copy the WKT from attribute table and paste it into another layer and >> then the geometry becomes visible. >> >> I agree that JTS is the right place for the fix. There may be something to >> look in the WKT part of JTS as well. For example GDAL has just been changed >> to output ISO style WKT like “POINT Z(1 2 3)”. Read more from >> https://trac.osgeo.org/gdal/wiki/rfc61_support_for_measured_geometries and >> https://trac.osgeo.org/gdal/wiki/MeasuredGeometriesInDrivers >> >> I wonder how well JUMP JML format supports XYZ, XYM, and XYZM geometries. >> >> -Jukka Rahkonen- >> >> *Lähettäjä:*Michaël Michaud [mailto:m.michael.mich...@orange.fr] >> *Lähetetty:* 18. helmikuuta 2016 0:14 >> *Vastaanottaja:* jump-pilot-devel@lists.sourceforge.net >> *Aihe:* Re: [JPP-Devel] OJ reads XYZ in PostGIS style EWKB, not in OGC style >> WKB >> >> Hi Jukka, >> >> Here are some results (thanks for the test database). >> >> - Simple geometries 2D, Z, M, ZM are read correctly (Z, M and ZM are >> interpreted the same way = 3D coordinates) >> - MultiGeometries and GeometryCollections are read correctly in 2D, but are >> not read if there is Z, M or ZM. >> >> Explanation : I made a simple patch to change the geometry type in wkb (byte >> 1 to 4). Unfortunately, in geometry collections, geometry type is repeated >> in front of each single geometry. Patching spatialite driver to change them >> all is not reasonable (it means re-implementing a significative part of the >> wkb parser). >> I will let it as is and try to work with Martin Davis to have it included >> fully in JTS in the future. >> >> Michaël >> >> Le 17/02/2016 16:49, Rahkonen Jukka (MML) a écrit : >> >> Sorry Michaël, I noticed that I used the version of OpenJUMP with >> a hacked JTS instead of the version with patched spatialite driver >> (r4823). My observations below are useless. >> >> -Jukka- >> >> *Lähettäjä:*Rahkonen Jukka (MML) >> [mailto:jukka.rahko...@maanmittauslaitos.fi] >> *Lähetetty:* 17. helmikuuta 2016 17:34 >> *Vastaanottaja:* OpenJump develop and use >> *Aihe:* Re: [JPP-Devel] OJ reads XYZ in PostGIS style EWKB, not in >> OGC style WKB >> >> Hi Michaël, >> >> Here is a test database that should contain one feature of each >> geometrytype which are valid in GeoPackage: >> >> http://latuviitta.org/downloads/gpkg_geometrytype_test.gpkg >> >> Just the byte order that comes from my Windows/Intel, >> unfortunately. You can create the same database with SQL script >> http://latuviitta.org/downloads/make_gpkg.txtbut it requires >> mod_spatialite with all the dependencies. Script can also be run >> from the SQL window of spatialite-gui but it may also help to just >> have a look at the script with bare eyes because all the >> geometries which are written into GeoPackage are there as WKT. >> >> I had time for only a quick test. To start testing was by the way >> amazingly easy because with the new Spatialite datastore I could >> select all the layers at the same time and open them into an OJ >> project. >> >> Geometries with Z seem to be mostly readable except >> GEOMETRYCOLLECTION Z. It looks like most or all ZM geometries >> behave badly. >> >> -Jukka- >> >> *Lähettäjä:*Michaël Michaud [mailto:m.michael.mich...@orange.fr] >> *Lähetetty:* 17. helmikuuta 2016 14:48 >> *Vastaanottaja:* jump-pilot-devel@lists.sourceforge.net >> <mailto:jump-pilot-devel@lists.sourceforge.net> >> *Aihe:* Re: [JPP-Devel] OJ reads XYZ in PostGIS style EWKB, not in >> OGC style WKB >> >> 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.htmlfor >> 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 >> <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 >> <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 > ------------------------------------------------------------------------------ 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