Changeset 6135 in josm


Ignore:
Timestamp:
2013-08-10T22:17:09+02:00 (11 years ago)
Author:
Don-vip
Message:

fix javadoc/warnings

Location:
trunk/src/org/openstreetmap/josm/data/projection
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/AbstractProjection.java

    r6069 r6135  
    3939    }
    4040
     41    /**
     42     * Replies the projection (in the narrow sense)
     43     * @return The projection object
     44     */
    4145    public final Proj getProj() {
    4246        return proj;
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r6003 r6135  
    2424import org.openstreetmap.josm.data.projection.proj.LambertConformalConic;
    2525import org.openstreetmap.josm.data.projection.proj.LonLat;
     26import org.openstreetmap.josm.data.projection.proj.Mercator;
    2627import org.openstreetmap.josm.data.projection.proj.Proj;
    2728import org.openstreetmap.josm.data.projection.proj.ProjFactory;
     
    6263    static {
    6364        registerBaseProjection("lonlat", LonLat.class, "core");
    64         registerBaseProjection("josm:smerc", org.openstreetmap.josm.data.projection.proj.Mercator.class, "core");
     65        registerBaseProjection("josm:smerc", Mercator.class, "core");
    6566        registerBaseProjection("lcc", LambertConformalConic.class, "core");
    6667        registerBaseProjection("somerc", SwissObliqueMercator.class, "core");
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r6093 r6135  
    7979    private NTV2SubGrid lastSubGrid;
    8080
     81    /**
     82     * Constructs a new {@code NTV2GridShiftFile}.
     83     */
    8184    public NTV2GridShiftFile() {
    8285    }
     
    9295     * @param in Grid Shift File InputStream
    9396     * @param loadAccuracy is Accuracy data to be loaded as well as shift data?
    94      * @throws Exception
     97     * @throws IOException
    9598     */
    9699    public void loadGridShiftFile(InputStream in, boolean loadAccuracy ) throws IOException {
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFileWrapper.java

    r6069 r6135  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.data.projection.datum;
    3 
    4 import static org.openstreetmap.josm.tools.I18n.tr;
    53
    64import java.io.InputStream;
     
    97
    108/**
    11  * Wrapper for NTV2GridShiftFile.
     9 * Wrapper for {@link NTV2GridShiftFile}.
    1210 *
    1311 * Loads the shift file from disk, when it is first accessed.
     12 * @since 5226
    1413 */
    1514public class NTV2GridShiftFileWrapper {
    1615
     16    /**
     17     * Used in Germany to convert coordinates between the DHDN (<i>Deutsches Hauptdreiecksnetz</i>)
     18     * and ETRS89 (<i>European Terrestrial Reference System 1989</i>) datums.
     19     * @see <a href="http://crs.bkg.bund.de/crseu/crs/descrtrans/eu-descrtrans.php?crs_id=REVfREhETiAvIEdLXzM=&op_id=REVfREhETiAoQmVUQSwgMjAwNykgdG8gRVRSUzg5">
     20     * Description of Transformation - DE_DHDN (BeTA, 2007) to ETRS89</a>
     21     */
    1722    public final static NTV2GridShiftFileWrapper BETA2007 = new NTV2GridShiftFileWrapper("resource://data/BETA2007.gsb");
     23   
     24    /**
     25     * Used in France to convert coordinates between the NTF (<i>Nouvelle triangulation de la France</i>)
     26     * and RGF93 (<i>Réseau géodésique français 1993</i>) datums.
     27     * @see <a href="http://geodesie.ign.fr/contenu/fichiers/documentation/algorithmes/notice/NT111_V1_HARMEL_TransfoNTF-RGF93_FormatGrilleNTV2.pdf">
     28     * [French] Transformation de coordonnées NTF – RGF93 / Format de grille NTv2</a>
     29     */
    1830    public final static NTV2GridShiftFileWrapper ntf_rgf93 = new NTV2GridShiftFileWrapper("resource://data/ntf_r93_b.gsb");
    1931
     
    2234    private String gridFileName;
    2335
     36    /**
     37     * Constructs a new {@code NTV2GridShiftFileWrapper}.
     38     * @param filename Path to the grid file (GSB format)
     39     */
    2440    public NTV2GridShiftFileWrapper(String filename) {
    2541        this.gridFileName = filename;
    2642    }
    2743
     44    /**
     45     * Returns the actual {@link NTV2GridShiftFile} behind this wrapper.
     46     * The grid file is only loaded once, when first accessed.
     47     * @return The NTv2 grid file
     48     */
    2849    public NTV2GridShiftFile getShiftFile() {
    2950        if (instance == null) {
    3051            try {
    3152                InputStream is = new MirroredInputStream(gridFileName);
    32                 if (is == null)
    33                     throw new RuntimeException(tr("Error: failed to open input stream for resource ''/data/{0}''.", gridFileName));
    3453                instance = new NTV2GridShiftFile();
    3554                instance.loadGridShiftFile(is, false);
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r6104 r6135  
    2828 *
    2929 * @author Peter Yuill
    30  * Modifified for JOSM :
     30 * Modified for JOSM :
    3131 * - removed the RandomAccessFile mode (Pieren)
    3232 * - read grid file by single bytes. Workaround for a bug in some VM not supporting
     
    6464     * @param bigEndian is the file bigEndian?
    6565     * @param loadAccuracy is the node Accuracy data to be loaded?
    66      * @throws Exception
     66     * @throws IOException
    6767     */
    6868    public NTV2SubGrid(InputStream in, boolean bigEndian, boolean loadAccuracy) throws IOException {
     
    289289    }
    290290
     291    /**
     292     * Returns textual details about the sub grid.
     293     * @return textual details about the sub grid
     294     */
    291295    public String getDetails() {
    292296        StringBuffer buf = new StringBuffer("Sub Grid : ");
     
    323327        try {
    324328            clone = (NTV2SubGrid)super.clone();
     329            // Do a deep clone of the sub grids
     330            if (subGrid != null) {
     331                clone.subGrid = new NTV2SubGrid[subGrid.length];
     332                for (int i = 0; i < subGrid.length; i++) {
     333                    clone.subGrid[i] = (NTV2SubGrid)subGrid[i].clone();
     334                }
     335            }
    325336        } catch (CloneNotSupportedException cnse) {
    326         }
    327         // Do a deep clone of the sub grids
    328         if (subGrid != null) {
    329             clone.subGrid = new NTV2SubGrid[subGrid.length];
    330             for (int i = 0; i < subGrid.length; i++) {
    331                 clone.subGrid[i] = (NTV2SubGrid)subGrid[i].clone();
    332             }
    333337        }
    334338        return clone;
  • trunk/src/org/openstreetmap/josm/data/projection/proj/Proj.java

    r5066 r6135  
    2323 */
    2424public interface Proj {
     25   
    2526    /**
    26      * A Human readable name of this projection.
     27     * Replies a human readable name of this projection.
     28     * @return The projection name. must not be null.
    2729     */
    2830    String getName();
    2931
    3032    /**
    31      * The Proj.4 identifier.
     33     * Replies the Proj.4 identifier.
    3234     *
    33      * (as reported by cs2cs -lp)
    34      * If no id exists, return null.
     35     * @return The Proj.4 identifier (as reported by cs2cs -lp).
     36     * If no id exists, return {@code null}.
    3537     */
    3638    String getProj4Id();
     
    3840    /**
    3941     * Initialize the projection using the provided parameters.
     42     * @param params The projection parameters
    4043     *
    4144     * @throws ProjectionConfigurationException in case parameters are not suitable
  • trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java

    r5066 r6135  
    22package org.openstreetmap.josm.data.projection.proj;
    33
    4 import static java.lang.Math.*;
    5 
     4import static java.lang.Math.PI;
     5import static java.lang.Math.abs;
     6import static java.lang.Math.asin;
     7import static java.lang.Math.atan;
     8import static java.lang.Math.atan2;
     9import static java.lang.Math.cos;
     10import static java.lang.Math.exp;
     11import static java.lang.Math.log;
     12import static java.lang.Math.pow;
     13import static java.lang.Math.sin;
     14import static java.lang.Math.sqrt;
     15import static java.lang.Math.tan;
     16import static java.lang.Math.toRadians;
    617import static org.openstreetmap.josm.tools.I18n.tr;
    718
     
    1021
    1122/**
    12  * Projection for the SwissGrid CH1903 / L03, see http://de.wikipedia.org/wiki/Swiss_Grid.
     23 * Projection for the SwissGrid CH1903 / L03, see http://en.wikipedia.org/wiki/Swiss_coordinate_system.
    1324 *
    14  * Calculations are based on formula from
     25 * Calculations were originally based on simple formula from
    1526 * http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.12749.DownloadFile.tmp/ch1903wgs84en.pdf
    1627 *
Note: See TracChangeset for help on using the changeset viewer.