On Sun, Apr 14, 2013 at 3:39 PM, Rahkonen Jukka
<jukka.rahko...@mmmtike.fi>wrote:
> Hi,
>
> I made two tests:
> 1) With PostGIS 2.1
> select encode(ST_AsBinary(ST_GeomFromText('MULTIPOLYGON(((0 0, 10 20, 30
> 40, 0 0), (1 1, 2 2, 3 3, 1 1)),
> ((100 100, 110 110, 120 120, 100 100)))')), 'hex')
> Query gives the same WKB that you used in JTS bug #3610843, that is
>
> "0106000000020000000103000000020000000400000000000000000000000000000000000000000000000000244000000000000034400000000000003e4000000000000044400000000000000000000000000000000004000000000000000000f03f000000000000f03f0000000000000040000000000000004000000000000008400000000000000840000000000000f03f000000000000f03f01030000000100000004000000000000000000594000000000000059400000000000805b400000000000805b400000000000005e400000000000005e4000000000000059400000000000005940"
>
> 2) With Spatialite
> select
> GeomFromWKB(x'0106000000020000006903000000020000000400000000000000000000000000000000000000000000000000244000000000000034400000000000003E4000000000000044400000000000000000000000000000000004000000000000000000F03F000000000000F03F0000000000000040000000000000004000000000000008400000000000000840000000000000F03F000000000000F03F69030000000100000004000000000000000000594000000000000059400000000000805B400000000000805B400000000000005E400000000000005E4000000000000059400000000000005940')
> Query creates a multipolygon geometry.
>
>
Jukka, these two WKB hex strings differ around the 20th character:
01060000000200000001030
01060000000200000069030
The second one is the one I retrieved from spatialite. When I try to
parse the second one with Postgis (1.5.3), I get an error:
select
ST_GeomFromWkb(decode('0106000000020000006903000000020000000400000000000000000000000000000000000000000000000000244000000000000034400000000000003E4000000000000044400000000000000000000000000000000004000000000000000000F03F000000000000F03F0000000000000040000000000000004000000000000008400000000000000840000000000000F03F000000000000F03F69030000000100000004000000000000000000594000000000000059400000000000805B400000000000805B400000000000005E400000000000005E4000000000000059400000000000005940',
'hex'));
ERROR: invalid WKB type
HINT: You must specify a valid OGC WKT geometry type such as POINT,
LINESTRING or POLYGON
I haven't manually verified the WKB, but it might be that spatialite is
generating an invalid WKB, and JTS 1.12 was more forgiving about it than
1.13 is.
-lreeder
> Therefore it looks like the WKB is ok. But I do not understand that if
> PostGIS gives exactly the same WKB, how it is possible that OpenJUMP works
> with PostGIS but not with Spatialite through DB Query plugin?
>
> -Jukka Rahkonen-
>
>
>
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel