RE: [OpenMap Users] Double v.s. Floats in Openmap

From: Joel Garringer <Joelg@enduropls.com>
Date: Wed Mar 10 2004 - 12:05:37 EST

What I did was to create UTM and LatLon classes that used doubles
internally. I then created an overloaded "forward(lat, lon)" method on
the Mercator class that accepted doubles rather than floats.

This was enough for me to be able to calculate with and project points
based on doubles. The difference in the final drawing was pretty
dramatic.

I didn't touch any of the constructors or set scale methods on the Proj,
Projection, or Mercator classes. Maybe these would matter in some cases,
but in our testing it was enough to just have the points and the
projection methods using doubles.

The main thing that I was really concerned about, but that ended up not
seeming to matter (at least visually for the purposes I was making the
change) were all of the projection values like scaled_radius, ctrLon,
asinh_of_tanCtrLat that are floats and they are calculated from floats
and changing them would run pretty deep into the projection classes.

Like I said, maybe these or similar floating point class members would
cause problems in cases other than mine. In our case it was night and
day between before and after floats with only some superficial changes
to the classes involved. I have a couple of screen shots that illustrate
this if anyone is interested.

-----Original Message-----
From: owner-openmap-users@bbn.com [mailto:owner-openmap-users@bbn.com]
On Behalf Of Laura Paterson
Sent: Wednesday, March 10, 2004 9:42 AM
To: openmap-users@bbn.com
Subject: RE: [OpenMap Users] Double v.s. Floats in Openmap

We are currently having the same problem, in that floats are just not
providing the accurancy that our project requires.

We are currently looking into modifying or extending the OpenMap classes
without breaking backwards compatibility. We haven't started work on
this
yet, just doing a bit of research on ways around it.

Any thoughts anyone may have would be welcome. Also, if anybody has
done
work in this area before, do they have any suggestions?

Regards,

Laura

-----Original Message-----
From: owner-openmap-users@bbn.com [mailto:owner-openmap-users@bbn.com]On
Behalf Of Joel Garringer
Sent: 10 March 2004 14:46
To: openmap-users@bbn.com
Subject: [OpenMap Users] Double v.s. Floats in Openmap

We use the LatLon and UTM points for some calculations where we project
points that need to have a margin of error of about a foot. We then need
to draw these points on a mercator projection.

Basically, the floats just weren't accurate enough. Has anyone else run
into this problem?

We have modified a few of the OpenMap classes to make it possible to use
doubles rather than floats for these features, but I wanted to make sure
that I wasn't missing something.

Thanks.

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe
openmap-users"]
General Dynamics United Kingdom Limited
Registered in England and Wales No. 1911653
Registered Office: 100 New Bridge Street, London, EC4V 6JA 
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe
openmap-users"]
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Mar 10 12:06:25 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT