Ignore:
Timestamp:
2016-07-04T14:18:17+02:00 (10 years ago)
Author:
donvip
Message:

checkstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SVGParser.java

    r30737 r32556  
    1 // License: GPL. v2 and later. Copyright 2008-2009 by Pieren <pieren3@gmail.com> and others
     1// License: GPL. For details, see LICENSE file.
    22package cadastre_fr;
    33
     
    77 * This class is not intended to be a real SVG parser. It's also not using existing
    88 * xml parsers. It's just extracting the required strings from an SVG file coming
    9  * from the French land registry cadastre.gouv.fr 
     9 * from the French land registry cadastre.gouv.fr
    1010 *
    1111 */
     
    2929            try {
    3030                String str = svg.substring(s, e);
    31                 String [] viewBox = str.split(" ");
     31                String[] viewBox = str.split(" ");
    3232                double[] dbox = new double[4];
    33                 for (int i = 0; i<4; i++)
    34                     dbox[i] = Double.parseDouble(viewBox[i]);
     33                for (int i = 0; i < 4; i++) {
     34                    dbox[i] = Double.parseDouble(viewBox[i]);
     35                }
    3536                return dbox;
    3637            } catch (Exception ex) {
     
    4041        return null;
    4142    }
    42    
     43
    4344    /**
    4445     * Closed SVG paths are finishing with a "Z" at the end of the moves list.
    45      * @param svg
    46      * @return
    4746     */
    48     public String [] getClosedPaths(String svg) {
     47    public String[] getClosedPaths(String svg) {
    4948        ArrayList<String> path = new ArrayList<>();
    5049        int i = 0;
     
    5352            int e = svg.indexOf(cClosedPathEnd, s);
    5453            if (s != -1 && e != -1) {
    55                 String onePath = svg.substring(s, e); 
     54                String onePath = svg.substring(s, e);
    5655                if (onePath.indexOf("Z") != -1) // only closed SVG path
    5756                    path.add(onePath);
Note: See TracChangeset for help on using the changeset viewer.