<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>There's no way right now. You could do a little work on your client side, and pull both the WKT and the SRID, then concatenate them into an output string with 'SRID=9999;...' just like your input. In the longer run, we could add EWKT and EWKB outputs. :/</div><div><br></div><div>P</div><br><div><div>On 31-Mar-09, at 6:07 PM, LiN YongHeng wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>hello Paul Ramsey and anyone,</div> <div>The function GEOSGeomToWKB_buf() doesn't include the SRID. if I want to output encodings that embed the srid, how </div> <div>can I do?<br><br></div> <div class="gmail_quote">2009/3/31 Paul Ramsey <span dir="ltr">&lt;<a href="mailto:pramsey@opengeo.org">pramsey@opengeo.org</a>></span><br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">To clarify: your first representation is nonstandard:<br> <div class="im"><br>&nbsp;SRID=5001;POINT(44 31)<br><br></div>GEOS will accept it, but it won't emit it. If you print out<br><br>&nbsp;GEOSGeomToWKT(g1)<br><br>you will see the standard representation<br><br>&nbsp;POINT(44 31)<br><br> which you'll note doesn't include the SRID.<br><br>It doesn't actually look like we support output encodings that embed<br>the srid... odd.<br><br>P<br> <div> <div></div> <div class="h5"><br>On Tue, Mar 31, 2009 at 8:42 AM, strk &lt;<a href="mailto:strk@keybit.net">strk@keybit.net</a>> wrote:<br>> On Tue, Mar 31, 2009 at 11:24:50PM +0800, LiN YongHeng wrote:<br>>> hello everyone, Please look these code:<br> >> GEOSGeom g1, g2;<br>>> g1 = GEOSGeomFromWKT("SRID=5001;POINT(44 31)");<br>>> g1srid = GEOSGetSRID(g1);<br>>> g2 = GEOSGeomFromWKT(GEOSGeomToWKT(g1));<br>>> g2srid= GEOSGetSRID(g2);<br> >> g2srid not have the same value with g1srid, which g1srid value is 5001 and<br>>> g2srid is -1. My GEOS version is "3.1.0". I don't know why? Can anyone give<br>>> me answer<br>><br>> The WKT standard doesn't include a SRID specification,<br> > so GEOSGeomToWKT won't get it. Still GEOSGeomFromWKT<br>> accepts that.<br>><br>> --strk;<br>><br>> &nbsp;Free GIS &amp; Flash consultant/developer &nbsp; &nbsp; &nbsp;() &nbsp;ASCII Ribbon Campaign<br>> &nbsp;<a href="http://foo.keybit.net/~strk/services.html" target="_blank">http://foo.keybit.net/~strk/services.html</a> &nbsp;/\ &nbsp;Keep it simple!<br> </div></div>> _______________________________________________<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> ><br></blockquote></div><br></blockquote></div><br></body></html>