[gdal-dev] strange output in reading points of linear ring

Mohammed Rashad mohammedrashadkm at gmail.com
Fri Jan 28 10:57:09 EST 2011


   OGRPolygon *polygon = (OGRPolygon *) poGeometry;



            OGRLinearRing  *extring = polygon->getExteriorRing();
                for(int i=0;i<extring->getNumPoints();i++)
                {
                         cout << extring->getX(i) << ":::::" <<
extring->getY(i) << endl;
                 }

the shapefile is in UTM projection
the above said code gives me error . here is the output

......
.............
.................................

-269341:::::2.7739e+06
-270188:::::2.77958e+06
-267595:::::2.78341e+06
-266748:::::2.78775e+06
-265868:::::2.78773e+06
-262193:::::2.78899e+06
-260416:::::2.79265e+06
-258088:::::2.79378e+06
-257291:::::2.79542e+06
-257241:::::2.79553e+06
-256359:::::2.79637e+06
-254724:::::2.79808e+06
-253177:::::2.79897e+06
-252022:::::2.79541e+06
-252103:::::2.79144e+06
-248101:::::2.79034e+06
-246005:::::2.79466e+06
-244207:::::2.79732e+06
-240802:::::2.79897e+06
-238885:::::2.80189e+06
-239955:::::2.80502e+06
-240802:::::2.80936e+06

................................
.................
......
-240802:::::2.80936e+06 how to get rid of e+06 and convert it to double
-- 
Rashad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110128/499cbe00/attachment.html


More information about the gdal-dev mailing list