Hi Michaël,

Please find attached one GeoPackage blob that OpenJUMP does not convert.  It is 
of type POLYGON Z, thus 1003 and 03ea as hexadecimal.

I am not good in reading bits and bytes but I have tried.

Bytes 1-3:
47 50 00
"GP" and "0" Means that file is Geopackage, version 1

Byte 4: 05
This is a lag byte with bit values 0 0 0 0 0 1 0 1
Of those flags bits 5-7 "010" makes number "2", which means that envelope is 
[minx, maxx, miny, maxy, minz, maxz] and it takes 48 bytes. Remember this.

Bytes 5-8:
fb 0b 00 00
SRID, value as decimal number "3067"

Bytes 9-56
48 bytes used for the envelope

Bytes 57 ->
WKB
starts 00 01 eb 03 ...
In reversed order "03 eb" is 1003 as decimal, which means "wkbPolygonZ" which 
is correct.


Regards,

-Jukka-




Lähettäjä: Michaël Michaud [mailto:[email protected]]
Lähetetty: 9. helmikuuta 2016 10:13
Vastaanottaja: [email protected]
Aihe: Re: [JPP-Devel] Parsing XYZ geometries from Geopackage

Hi Jukka,

GeoPackage geometry is read with JTS WKBReader which is supposed to handle 3D 
geometries.
I think it cannot read ZM though.
The WKB type returned in the error message is the geometry type truncated to 
the 2 last bytes,
z information is held in a separate boolean variable for every type > 128.
Maybe the reading of the wkb part does not start exactly where it should. Or 
maybe there is an
endianness problem.
In the example of stackoverflow, I would say that the input wkb is actually not 
valid (I would write
wkb type as 03ea0000, not ea030000), but I may be wrong.

Michaël
Le 08/02/2016 23:40, Rahkonen Jukka (MML) a écrit :
Hi,

I tried to open a GeoPackage file through the new Spatialite datastore but got 
just JTS errors like "unknown wkb type 235". I discovered soon that my data had 
also Z-coordinates and this Stackoverflow question 
http://stackoverflow.com/questions/29142663/parse-wkb-string-using-jts-topology-suite
 handles the same issue. But don't we have some support for 3d geometries in 
WKB range 1001-1007 in other places of OpenJUMP?

The full list of WKB types from page 66 of "OpenGIS® Implementation Standard 
for Geographic information - Simple feature access - Part 1: Common 
architecture" is as follows:

enum WKBGeometryType {
wkbPoint = 1,
wkbLineString = 2,
wkbPolygon = 3,
wkbTriangle = 17
wkbMultiPoint = 4,
wkbMultiLineString = 5,
wkbMultiPolygon = 6,
wkbGeometryCollection = 7,
wkbPolyhedralSurface = 15,
wkbTIN = 16
wkbPointZ = 1001,
wkbLineStringZ = 1002,
wkbPolygonZ = 1003,
wkbTrianglez = 1017
wkbMultiPointZ = 1004,
wkbMultiLineStringZ = 1005,
wkbMultiPolygonZ = 1006,
wkbGeometryCollectionZ = 1007,
wkbPolyhedralSurfaceZ = 1015,
wkbTINZ = 1016
wkbPointM = 2001,
wkbLineStringM = 2002,
wkbPolygonM = 2003,
wkbTriangleM = 2017
wkbMultiPointM = 2004,
wkbMultiLineStringM = 2005,
wkbMultiPolygonM = 2006,
wkbGeometryCollectionM = 2007,
wkbPolyhedralSurfaceM = 2015,
wkbTINM = 2016
wkbPointZM = 3001,
wkbLineStringZM = 3002,
wkbPolygonZM = 3003,
wkbTriangleZM = 3017
wkbMultiPointZM = 3004,
wkbMultiLineStringZM = 3005,
wkbMultiPolygonZM = 3006,
wkbGeometryCollectionZM = 3007,
wkbPolyhedralSurfaceZM = 3015,
wkbTinZM = 3016,
}

-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

[email protected]<mailto:[email protected]>

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

GPûj¼t“˜¨û@u“Rü@ÁÊ¡í<YAä>YAëRü@s<YAu“Rü@ÁÊ¡í<YAj¼t“˜¨û@ä>YAÀµû@ä>YAÕû@ä>YA@ôû@ä>YA€ü@ä>YAÀ2ü@ä>YARü@ä>YARü@g>YARü@ê=YARü@m=YARü@ð<YARü@s<YA
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to