On 11-01-28 10:57 AM, Mohammed Rashad wrote:
    OGRPolygon *polygon = (OGRPolygon *) poGeometry;


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

................................
.................
......
-240802:::::2.80936e+06 how to get rid of e+06 and convert it to double

Rashad,

That is a c++ stream's formatting question, not a gdal-dev question.  I
would suggest you review the formatting options for the stream class:

  http://www.cplusplus.com/reference/iostream/ostream/

In particular pay attention to the "field width" and "display precision"
values.  Also I see something about scientific vs. fixed format in the setf()
method:

  http://www.cplusplus.com/reference/iostream/ios_base/setf/

Personally I hate the way formatting works with the C++ stream classes
but I'm very old fashioned.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to