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

From: Don Dietrick <dietrick_at_bbn.com>
Date: Mon, 7 Mar 2005 09:59:48 -0500

Hi Laura,

The code you have is exactly what you want to use. I guess I don't
understand the difference between asking for coverage for a point, and
your problem with having the bounding box in the query being too small.
  It seems like they would both provide the same answer.

Has the RpfLayer been added to the map? The RpfTocHandler doesn't read
the A.TOC file until it needs to display something, so it probably
wouldn't know anything until then.

- Don


On Mar 7, 2005, at 9:29 AM, Laura Paterson wrote:

> 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"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Mar 07 2005 - 10:00:14 EST

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