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

fix javadoc/warnings

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

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.