Oh.. sweet chaos!<br><br>The lack of a WKB-spec with Z (and M) ordinates seems to have triggered a bunch of WKB-flavours, such as<br>- OGR&#39;s &quot;Two-and-a-half-D extensions for Simple Features&quot;<br>- FDO&#39;s FGF-format<br>
- Postgis EWKB<br><br>I found the EWKB proposal here, but probably not the latest:<br><a href="http://postgis.refractions.net/pipermail/postgis-devel/2004-December/000710.html">http://postgis.refractions.net/pipermail/postgis-devel/2004-December/000710.html</a><br>
<br>As far as I can see, it is fairly similar in structure as the SQL/MM, except for the optional SRID. The object-type ID&#39;s are of course not the same.<br><br>In addition, SQL/MM specifies CircularString/CurvePolygon/CompundCurve etc aswell, would be nice to have these implemented in GEOS aswell (PostGIS has done some work here, not sure what)<br>
<br>I got two versions of the SQL/MM spec in PDF, the earliest (2nd edtion) dates from 2002. I&#39;ll send you the newest right away.<br><br>For now, I&#39;ll try to make a simple hack on the existing WkbReader.<br><br>Would be nice with a more united WKB-world...<br>
<br><br>-- Oyvind<br><br><br><br><br><br><div class="gmail_quote">On Thu, Aug 4, 2011 at 2:24 AM, Martin Davis <span dir="ltr">&lt;<a href="mailto:mtnclimb@telus.net">mtnclimb@telus.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>

  
    
  
  <div text="#000000" bgcolor="#ffffff">
    The EWKB that JTS and GEOS implement is based on the PostGIS EWKB
    specification (which predates the SQL/MM spec, I think.)<br>
    <br>
    I don&#39;t have a good reference for the PostGIS spec - it would be
    nice if there was one online somewhere (hint, hint).<br>
    <br>
    It might be nice if JTS/GEOS supported the SQL/MM spec as well.  Do
    you have a reference available for the spec?<br>
    <br>
    Martin<div><div></div><div class="h5"><br>
    <br>
    On 8/3/2011 4:19 AM, Oyvind Idland wrote:
    </div></div><blockquote type="cite"><div><div></div><div class="h5">Hello,<br>
      <br>
      i am trying to read WKB chunks based on the iso SQL/MM part3 spec.
      However, this doesn&#39;t seem to work.<br>
      <br>
      From the WkbReader source code doc:  <br>
      &quot;This implementation supports the extended WKB standard for
      representing 3-dimensional coordinates. The presence of 3D
      coordinates is signified by setting the high bit of the wkbType
      word.&quot;<br>
      <br>
      Which extended WKB standard is being refered to here ?<br>
      <br>
      <br>
      <br>
      For example, In the SQL/MM spec, various point types are defined
      as the following unsigned values (not hex):<br>
      <br>
      &lt;wkbpoint&gt;     1<br>
      &lt;wkbpointz&gt;   3000001<br>
      &lt;wkbpointzm&gt; 2000001<br>
      &lt;wkbpointm&gt;   4000001<br>
      <br>
      However, in the WkbReader.cpp the following logic is used:<br>
      <br>
          int typeInt = dis.readInt();<br>
          int geometryType = typeInt &amp; 0xff;<br>
          ......<br>
          bool hasZ = ((typeInt &amp; 0x80000000) != 0);<br>
          if (hasZ) inputDimension = 3;<br>
          else inputDimension = 2; // doesn&#39;t handle M currently<br>
      <br>
      <br>
      <br>
      <br>
      Is there any plans to implement support for SQL/MM ?  (I can
      volunteer for a patch, if desired)<br>
      <br>
      <br>
      -- Oyvind<br>
      <br>
      </div></div><pre><fieldset></fieldset>
_______________________________________________
geos-devel mailing list
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a></pre>
      <br>
      <fieldset></fieldset>
      <br>
      <p color="#000000" align="left">No virus found in
        this message.<br>
        Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>
        Version: 10.0.1390 / Virus Database: 1518/3807 - Release Date:
        08/03/11</p>
    </blockquote>
  </div>

<br>_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/geos-devel" target="_blank">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br></blockquote></div><br>