<div>hello anybody ,<br>I have seen the source code, which have writen the SRID, just like below codes. Why don't you say that the output not contain<br>the SRID? but the fact that the output don't contain the SRID, so</div>
<div>I really puzzle about this.</div>
<div>-------------------------------Source Code---------------------------------------</div>
<div>void<br>WKBWriter::writePolygon(const Polygon &g) <br>{<br> writeByteOrder();<br> <br> writeGeometryType(WKBConstants::wkbPolygon, g.getSRID());<br> writeSRID(g.getSRID());<br> <br> int nholes = g.getNumInteriorRing();<br>
writeInt(nholes+1);<br> const LineString* ls = g.getExteriorRing();<br> assert(ls);<br> const CoordinateSequence* cs=ls->getCoordinatesRO();<br> assert(cs);<br> writeCoordinateSequence(*cs, true);<br> for (int i=0; i<nholes; i++)<br>
{<br> ls = g.getInteriorRingN(i);<br> assert(ls);<br> cs = ls->getCoordinatesRO();<br> assert(cs);<br> writeCoordinateSequence(*cs, true);<br> }<br>}<br>-------------------------------Source Code---------------------------------------<br>
</div>
<div class="gmail_quote">2009/3/31 strk <span dir="ltr"><<a href="mailto:strk@keybit.net">strk@keybit.net</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">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></div>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> Free GIS & Flash consultant/developer () ASCII Ribbon Campaign<br>
<a href="http://foo.keybit.net/~strk/services.html" target="_blank">http://foo.keybit.net/~strk/services.html</a> /\ Keep it simple!<br></blockquote></div><br>