⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 projection.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
字号:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/proj/Projection.java,v $// $RCSfile: Projection.java,v $// $Revision: 1.4.2.1 $// $Date: 2004/10/14 18:27:38 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.proj;import java.awt.Point;import java.awt.Image;import java.util.ArrayList;import com.bbn.openmap.LatLonPoint;/** * Projection interface to the OpenMap projection library. * <p> * This is a READONLY interface to the projection object. See the * <code>Proj</code> class for read/write access. * <p> * A projection is an object that is maintained by the map, and * represents a abstract "view" of the data. The projection has the * properties of x-width, * y-height, scale (in pixels/meters), and * latitude/longitude center point. * <p> *  * <h4>Projection Notes/Assumptions:</h4> * <ul> * <li>At the center point of the projection, North is to the top of * the screen. <br> * <li><a href="#poly_restrictions">LatLon Polygon Restrictions. </a> * <br> * <li><a href="#line_restrictions">LatLon Line Restrictions. </a> * <br> * </ul> * <p> *  * <h4>Implementation Notes:</h4> * <ul> * <li>This methods in this interface are safe to use among different * threads, BUT the underlying classes may not be. Use with care. * </ul> * <p> *  * <h4>Bibliography:</h4> * <br> * Many of the specific projection equations were taken from <i>Map * Projections --A Working Manual </i>, by John Synder. * <p> *  * @see Proj * @see Cylindrical * @see Mercator * @see CADRG * @see Azimuth * @see Orthographic *   */public interface Projection extends java.io.Serializable {    /**     * Get the scale.     *      * @return float scale     */    public float getScale();    /**     * Get the maximum scale.     *      * @return float maxscale     */    public float getMaxScale();    /**     * Get the minimum scale.     *      * @return float minscale     */    public float getMinScale();    /**     * Get the center LatLonPoint.     *      * @return center point     */    public LatLonPoint getCenter();    /**     * Get the width of the map.     *      * @return int width.     */    public int getWidth();    /**     * Get the height of the map.     *      * @return int height.     */    public int getHeight();    /**     * Get the type of projection.     *      * @return int type     */    public int getProjectionType();    /**     * Get the projection ID string.     *      * @return String projID     */    public String getProjectionID();    /**     * Get the upper left (northwest) point of the projection.     * <p>     * Returns the upper left point (or closest equivalent) of the     * projection based on the center point and height and width of     * screen.     * <p>     * This is trivial for most cylindrical projections, but much more     * complicated for azimuthal projections.     *      * @return LatLonPoint     */    public LatLonPoint getUpperLeft();    /**     * Get the lower right (southeast) point of the projection.     * <p>     * Returns the lower right point (or closest equivalent) of the     * projection based on the center point and height and width of     * screen.     * <p>     * This is trivial for most cylindrical projections, but much more     * complicated for azimuthal projections.     *      * @return LatLonPoint     */    public LatLonPoint getLowerRight();    /**     * Checks if a LatLonPoint is plot-able.     * <p>     * Call this to check and see if a LatLonPoint can be plotted.     * This is meant to be used for checking before projecting and     * rendering Point objects (bitmaps or text objects tacked at a     * LatLonPoint for instance).     *      * @param llpoint LatLonPoint     * @return boolean     */    public boolean isPlotable(LatLonPoint llpoint);    /**     * Checks if a LatLonPoint is plot-able.     * <p>     * Call this to check and see if a LatLonPoint can be plotted.     * This is meant to be used for checking before projecting and     * rendering Point objects (bitmaps or text objects tacked at a     * LatLonPoint for instance).     *      * @param lat float latitude in decimal degrees     * @param lon float longitude in decimal degrees     * @return boolean     */    public boolean isPlotable(float lat, float lon);    /**     * Forward project a LatLonPoint into XY space.     *      * @param llpoint LatLonPoint     * @return Point (new)     */    public Point forward(LatLonPoint llpoint);    /**     * Forward projects a LatLonPoint into XY space and return a     * Point.     *      * @param llp LatLonPoint to be projected     * @param pt Resulting XY Point     * @return Point pt     */    public Point forward(LatLonPoint llp, Point pt);    /**     * Forward project lat,lon coordinates into xy space.     *      * @param lat float latitude in decimal degrees     * @param lon float longitude in decimal degrees decimal degrees     * @return Point (new)     */    public Point forward(float lat, float lon);    /**     * Forward projects lat,lon coordinates into XY space and returns     * a Point.     *      * @param lat float latitude in decimal degrees     * @param lon float longitude in decimal degrees     * @param pt Resulting XY Point     * @return Point pt     */    public Point forward(float lat, float lon, Point pt);    /**     * Forward projects lat,lon coordinates into XY space and returns     * a Point.     *      * @param lat float latitude in radians     * @param lon float longitude in radians     * @param pt Resulting XY Point     * @param isRadian placeholder argument indicating that lat,lon     *        arguments are in radians (can be true or false)     * @see #forward(float,float,Point)     * @return Point pt     */    public Point forward(float lat, float lon, Point pt, boolean isRadian);    /**     * Inverse project a Point.     *      * @param point XY Point     * @return LatLonPoint (new)     */    public LatLonPoint inverse(Point point);    /**     * Inverse project a point with llpt.     *      * @param point x,y Point     * @param llpt resulting LatLonPoint     * @return LatLonPoint llpt     */    public LatLonPoint inverse(Point point, LatLonPoint llpt);    /**     * Inverse project x,y coordinates.     *      * @param x     * @param y     * @return LatLonPoint (new)     */    public LatLonPoint inverse(int x, int y);    /**     * Inverse project x,y coordinates into a LatLonPoint.     *      * @param x integer x coordinate     * @param y integer y coordinate     * @param llpt LatLonPoint     * @return LatLonPoint llpt     * @see Proj#inverse(Point)     */    public LatLonPoint inverse(int x, int y, LatLonPoint llpt);    /**     * Pan the map/projection.     * <ul>     * <li><code>pan(

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -