Hello Sisinda
Welcome!
The float precision is often insufficient for locating a point on Earth
using geographic coordinates, so using Android PointF may be risky.
However we may not need to extend the class manually neither. All the
SIS classes that use java.awt.geom are for interoperability with Java2D
and should be optional. It should be possible to ignore (not port) most
of the SIS classes that end in "2D":
* DirectPosition2D
* Envelope2D
* All MathTransform2D implementations that just extend the more
generic case.
Actually we may still needs DirectPosition2D for performance reason, but
we can just make it a standalone class (not extending any Android class)
with x and y fields in double precision. Same for Envelope2D.
Martin
Le 28/03/2017 à 11:08, Sisinda Dinusha a écrit :
> When considering android.graphics library as an alternative to the java.awt
> library, there are some classes that cannot exactly match to the awt
> library such as Point2D.Double which takes 'double' as x and y values. The
> similar class provided in Android is PointF which takes 'float' as x and y.
> Would that be a problem if a simple cast used to make this work or is it a
> better idea to extend the class manually to use double, as there might be
> some data losses when casting double to float.