Re: [OpenMap Users] int/float -> double?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Mon, 14 Jul 2008 11:56:49 -0400

Hi Tore,

On Jul 10, 2008, at 6:57 PM, Tore Halset wrote:

> Hello.
>
> Thanks a lot for your work! It looks really good. There will be a
> lot of work to make use of the new stuff all over, but I guess
> things can move over in increments over time.

Thanks

>
>
> Regarding LatLonPoint, will getLatitude()/getLongitude() continue to
> return float and perhaps be deprecated so that people should start
> to use getX() and getY() instead?

I was intending on keeping getLatitude()/getLongitude() for backward
compatibility. Those methods return floats, so if you need double
precision, use getX()/getY().

>
> On 9. juli. 2008, at 23.31, Don Dietrick wrote:
>
>> Float precision is still (and will be) supported if your data is
>> only accurate to that level and you want to save memory.
>
> I used to think like that, but have recently read that floats will
> only save you memory if they are used in arrays. Is that correct or
> have I misread something?
>
> http://parleys.com/display/PARLEYS/Home#slide=53;talk=13467713
> In the solution to puzzle 8."Ground Round"
> "The only time you want to use float is when you have huuuge arrays
> of them"
>
> http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html
> - look under float.
> "use a float (instead of double) if you need to save memory in large
> arrays of floating point numbers"
>
> Are you sure LatLonPoint.Float will use less memory than .Double? Or
> will this only apply to things like OMPoly that uses arrays of raw
> coordinate values?

There is a little savings from using LatLonPoint.Float objects over
LatLonPoint.Double (according to my profiler), but I agree that most
of the significant savings would come from float arrays instead of
double arrays. That was the aim of keeping floats in the projection
library API, for coordinate array handling.

> I'll be offline for two weeks starting tomorrow. Out in the
> wilderness using PaperMaps :)
>


Have fun!

- Don

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Jul 14 2008 - 11:59:11 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT