RE: [OpenMap Users] Discovering the minimum scale at which an RPF layer will show

From: Laura Paterson <laura.paterson_at_generaldynamics.uk.com>
Date: Mon, 7 Mar 2005 14:29:36 -0000

Hi Don,

Thank you for your reply.

> You can ask the RpfLayer for it's RpfCoverageProvider, and then ask it
> for it's coverage over a specific area. Those coverages will tell you
> what scale you need to view that data. The coverage will viewable at
> that scale * or / by the scaleFactor of that value.

Ok, I have tried that, but it doesn't quite do what I am looking for. Here
is the code that I used:

                    for (int i = 0; i < layers.length; i++) {
                        if (layers[i] instanceof RpfLayer) {

                            RpfLayer rpf = (RpfLayer)layers[i];
                            RpfFrameProvider fProvider =
rpf.getFrameProvider();
                            Vector cvgs =
fProvider.getCoverage((float)minLat, (float)minLon, (float)maxLat,
(float)maxLon, (CADRG)proj);
                            for (int j=0; j<cvgs.size(); j++) {
                                RpfCoverageBox box =
(RpfCoverageBox)cvgs.get(j);
                                System.out.println(layers[i].getName() + "
scale from coverage = "+box.scale);
                                minScale = Math.min(minScale, box.scale);
                            }
                        }
                    }


Unfortunately there area never any coverages for this bounding box, because
it covers such a small area...
I tried replacing the Vecor cvgs line with : Vector cvgs =
rpf.getCoverageBoxes(); However, this Vector is always empty.

I guess what am looking for (ideally!) is to be able to specify a point,
and ask at what scales will this point have rpf coverage. Is there anything
in the API that can help me achive this?

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
outbound, 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.

--
[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 Mar 07 2005 - 09:33:57 EST

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