Re: [OpenMap Users] Setting CADRG projection?

From: Don Dietrick <>
Date: Wed, 23 Feb 2005 10:42:38 -0500

Hi Laura,

It sounds like the CADRGLoader isn't in the ProjectionFactory. You can
call ProjectionFactory.loadDefaultProjections() to load the standard
set of projections, or set the properties for a ProjectionFactoryLoader
as specified in the default file.

- Don

On Feb 23, 2005, at 9:14 AM, Laura Paterson wrote:

> Hi.
> I saw a post about the problem fairly recently, but can't seem to find
> the solution...
> I have just moved to 4.6.2, and can't get my map to use the CADRG
> projection that I specify in the properties file.
> Here is my code:
>     System.out.println("*** proj =
> "+Environment.get(Environment.Projection));
>     Class projClass =
> ProjectionFactory.getProjClassForName(Environment.get(Environment.Proje
> ction, CADRG.CADRGName));
>     System.out.println("class proj: "+projClass);
>     if (projClass == null) {
>         projClass = CADRG.class;
>     }
>     Projection proj = ProjectionFactory.makeProjection(projClass,
>         Environment.getFloat(Environment.Latitude, 0f),
>         Environment.getFloat(Environment.Longitude, 0f),
>         Environment.getFloat(Environment.Scale,
>         envWidth, envHeight);
>     System.out.println("set proj: "+proj);
>     System.out.println("set proj: "+proj.getProjectionType());
>     System.out.println("CADRG proj: "+CADRG.CADRGType);
> And here is the output:
> *** proj = com.bbn.openmap.proj.CADRG
> class proj: class com.bbn.openmap.proj.CADRG
> set proj: Mercator[ world(829,0) radius=6378137.0 ppm=3272
> center(20.0,-20.0) scale=1.5817304E8 maxscale=1.5817304E8
> minscale=62.0 width=829 height=616]
> set proj: 2
> CADRG proj: 42
> Any ideas how to make the projection factory recognise my settings?
> Thanks,
> Laura
> This email and any files attached to it are of a confidential nature
> and intended for the exclusive use of the individual or entity to whom
> they are addressed. If you are not the intended recipient, please be
> advised that you have received this email in error and action should
> be taken to inform the originator and this email should be deleted
> immediately and any copies made should be destroyed. If you are not
> the intended recipient, any form of disclosure, distribution,
> printing, copying or any other use of this email or the information in
> it or in any attachments is strictly prohibited and may be unlawful.
> Any views, opinions or other information expressed in the email and
> any attachments are those of the originator and not given or endorsed
> by General Dynamics UK Ltd.In compliance with the various Regulations
> and Acts, please be aware that General Dynamics UK Ltd reserves the
> right to monitor all emails and email attachments, both inbound and o!
> utbound, allowing legitimate business practice to continue.In addition
> to monitoring, General Dynamics UK Ltd also provides appropriate
> Antivirus measures scanning all incoming and outgoing email and email
> attachments. However, email communications cannot be guaranteed to be
> secure or free of errors as information may be intercepted, corrupted,
> amended, lost, destroyed or contain viruses. General Dynamics UK Ltd
> do not accept liability or responsibility for any such matters or the
> consequences thereof.

Don Dietrick,
BBN Technologies, Cambridge, MA

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Feb 23 2005 - 10:43:46 EST

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