On Tuesday, August 26, 2003, at 02:39 PM, Catania, Luke A ERDC-TEC-VA
wrote:
> Don,
>
> Since the built in navigation capability uses a zoom box that lets the
> user click a center point and drag while it automatically draws the
> box for you I presume it is set to match the height and width
> proportions of the map window. With my added capability, I specify my
> box by entering the lower left and upper right coordinates, so would
> that be something that was not really tested in OpenMap since it is
> not a capability that is built in.
I remember testing it with the drawing tool drawing free rectangles as
well as with the navigation mouse mode.
> In Using Arc Explorer, I notice it lets you click a point and drag and
> create you own rectangle size. Was there some rational that went
> behind letting OpenMap draw the AOI for you and not letting you draw
> it yourself.
Sure, it was to prevent confusion. With the way we did it, you know
what is going to be on the map when the projection is changed. If you
allow the AOI to be freely defined, you usually end up with more stuff
on one side of the map or another.
- Don
> -----Original Message-----
> From: Don Dietrick [mailto:dietrick@bbn.com]
> Sent: Tuesday, August 26, 2003 2:29 PM
> To: Catania, Luke A ERDC-TEC-VA
> Cc: OpenMap Email List (E-mail)
> Subject: Re: [OpenMap Users] ProjMath.getScale
>
>
> On Tuesday, August 26, 2003, at 12:52 PM, Catania, Luke A ERDC-TEC-VA
> wrote:
>
> > Don,
> >
> > Looks like the last part of the email was cut off.
>
> Oh, sorry. Not sure what happened.
>
> >
> > "With the CADRG projection, you also have to deal with the".
>
> zone boundaries. But the getScale() method should be handling that.
>
> > Setting the center first does not do anything to help getting more of
> > the AOI within the window, but I did change it.
>
> Last time I tested it, the getScale should be returning the maximum
> scale where both points are on the map. There is a border around the
> map window that may be covering up a pixel or two, but otherwise it
> should be working.
>
> I usually test this with height and width proportions that are pretty
> similar to the map window. I wonder if there is a bug in the algorithm
> that leads to more errors if the h/w proportions of the AOI are much
> different than the h/w proportions of the projection.
>
> > If this I something that is normal to any GIS package, then I guess
> > there is no real issue, since people will be used to, but I would
> > think it would zoom out further if the AOI displayed does not
> actually
> > encompass your entire AOI you selected. I use Arc Explorer and
> > whatver AOI I zoom to it will at least show that and more depending
> on
> > the shape of the rubber banded area I select.
>
> I think that should be the behavior with OpenMap, too.
>
> - Don
>
> >
> > Luke
> >
> > -----Original Message-----
> > From: Don Dietrick [mailto:dietrick@bbn.com]
> > Sent: Tuesday, August 26, 2003 10:18 AM
> > To: Catania, Luke A ERDC-TEC-VA
> > Cc: OpenMap Email List (E-mail)
> > Subject: Re: [OpenMap Users] ProjMath.getScale
> >
> >
> > On Monday, August 25, 2003, at 03:40 PM, Catania, Luke A ERDC-TEC-VA
> > wrote:
> >
> > > First let me say, that, I presume zooming to a box represented
> > exactly
> > > by two corner points is not possible due to the fact that we are
> not
> > > dealing with a flat world with distance from latitude to latitude
> and
> > > longitude to longitude not being the same.
> >
> > I think it depends more on the projection type you are zooming in
> over,
> > and how the dimensions of the viewable area compare to the
> > coordianates. Cylindrical projections let you specify lat/lon
> > boundaries, but the width/height of the viewable area might have
> these
> > points be set in a little from the corners.
> >
> > > I have implemented two new Coordinate panels for the CoordDialog
> > > class. As in the existing panels, where there is the ability to
> enter
> > > a point in either decimal degrees or in DMS depending upon the tab
> > you
> > > select, my additions allow a user to specify an AOI by entering in
> > > lower left and upper right coordinates either in decimal degrees or
> > > DMS. I calculate the center by averaging the coordinates. And I
> > > calculate the new scale using the corner coordinates and the
> getScale
> > > method. My code to center and scale is:
> > >
> > > Proj projection = (Proj)map.getProjection();
> > > float newScale =
> > > com.bbn.openmap.proj.ProjMath.getScale(llLatLonPoint,
> > >
> urLatLonPoint,
> > > projection);
> > > projection.setScale(newScale);
> > > projection.setCenter(lat, lon);
> >
> > I'd set the center of the projection first, before I calculated the
> new
> > scale.
> >
> > - Don
> >
> >
> > > map.setProjection(projection);
> > >
> > >
> > > When I enter the AOI coordinates and apply, my map is centered
> > > properly, but not necessarily zoomed to show all of the AOI.
> > >
> > > For example, if my AOI is:
> > > UrLat 43.0
> > > UrLon 23.0
> > > LlLat: 40.0
> > > LlLon: 20.0
> > >
> > > the map shows all of 20 -23 in longitude plus more outside that
> > range,
> > > but is just inside the 40-43 range. Not that big of a deal, but in
> > the
> > > case of:
> > >
> > > UrLat 44.0
> > > UrLon 23.0
> > > LlLat: 38.0
> > > LlLon: 20.0
> > >
> > > My map zooms to cover just inside 18-25 Lon and 39.5 - 42.5 Lat,
> so I
> > > do not get an AOI that includes all 38 - 43 in Lat. Is that that
> all
> > > caused by the projection. I am using CADRG, if I tried LLXY, which
> > > then includes the AOI I entered from lower lat to upper lat, but
> > goes
> > > from 16-26 in long.
> > >
> > > I do not know much about projections, but I presume this again is
> all
> > > due to the fact that we are not dealing with a flat world with
> > > distance from latitude to latitude and longitude to longitude not
> > > being the same. So how does new scale work.
> > >
> > > I just want to make sure it is not a bug I have introduced in my
> code
> > > and I at least want all of the AOI included even if it includes
> more
> > > outside my AOI.
> >
> > With the CADRG projection, you also have to deal with the
> >
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > Don Dietrick, BBN Technologies, dietrick@bbn.com
> > 10 Moulton Street, Cambridge, MA 02138
> > 617-873-3031 [fax]-2794
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> >
> >
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Don Dietrick, BBN Technologies, dietrick@bbn.com
> 10 Moulton Street, Cambridge, MA 02138
> 617-873-3031 [fax]-2794
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, BBN Technologies, dietrick@bbn.com
10 Moulton Street, Cambridge, MA 02138
617-873-3031 [fax]-2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [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 Tue Aug 26 17:32:46 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT