<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">03.02.2016, 16:11, Even Rouault
kirjoitti:<br>
</div>
<blockquote cite="mid:201602031511.30484.even.rouault@spatialys.com"
type="cite">
<pre wrap="">Le mercredi 03 février 2016 14:36:14, Ari Jolma a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">I finally have the (existing) autotests passing with the new API -
basically just replacing the nCoordDimension property of OGRGeometry
with flags (for Z and M) - and a rather large set of tests for
import/export WKT and WKB with M passing.
</pre>
</blockquote>
<pre wrap="">
That's great !</pre>
</blockquote>
<br>
Yes, except that I just found out that despite of the already large
set of test WKT strings, a simple one like<br>
<br>
GEOMETRYCOLLECTION M (POINT (1 2 3))<br>
<br>
produces, when read in and printed out as ISO WKT<br>
<br>
GEOMETRYCOLLECTION Z (POINT (1 2 3))<br>
<br>
The problem is that neither OGR_G_CreateFromWkt() nor
OGRGeometryFactory::createFromWkt does not have OGRwkbVariant
eWkbVariant parameter (as OGRGeometryFactory::createFromWkb but not
OGR_G_CreateFromWkb), which would at least make the case more clear
in the code.<br>
<br>
Reading OGC common architecture (1.2.1) it seems to me that the WKT
is in fact invalid and it should be <br>
<br>
GEOMETRYCOLLECTION M (POINT M (1 2 3))<br>
<br>
Also PostGIS returns the error "
<meta http-equiv="content-type" content="text/html; charset=utf-8">
can not mix dimensionality" with the above one.<br>
<br>
However, interestingly, PostGIS accepts<br>
<br>
MULTICURVE M (CIRCULARSTRING (0 0 2,1 0 2,0 0 2),(0 0 2,1 1 2))<br>
<br>
and<br>
<br>
MULTICURVE M (CIRCULARSTRING Z (0 0 2,1 0 2,0 0 2),(0 0 2,1 1 2))<br>
<br>
although, in the latter one PostGIS converts the Z into M.<br>
<br>
I think the path I'll take will be to rather easily spit out
"corrupt data" (or a new "mixed geometries" error) for cases which
involve M.<br>
<br>
Ari<br>
<br>
</body>
</html>