Changeset 34515 in osm for applications/editors/josm


Ignore:
Timestamp:
2018-08-18T17:56:03+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/gpsblam
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/gpsblam/.project

    r32286 r34515  
    1616                        </arguments>
    1717                </buildCommand>
     18                <buildCommand>
     19                        <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
     20                        <arguments>
     21                        </arguments>
     22                </buildCommand>
    1823        </buildSpec>
    1924        <natures>
    2025                <nature>org.eclipse.jdt.core.javanature</nature>
     26                <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
    2127        </natures>
    2228</projectDescription>
  • applications/editors/josm/plugins/gpsblam/build.xml

    r33776 r34515  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="12636"/>
     7    <property name="plugin.main.version" value="14153"/>
    88
    9     <!--
    10     **********************************************************
    11     ** include targets that all plugins have in common
    12     **********************************************************
     9    <!-- Configure these properties (replace "..." accordingly).
     10         See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
    1311    -->
     12    <property name="plugin.author" value="Russell Edwards"/>
     13    <property name="plugin.class" value="org.openstreetmap.josm.plugins.gpsblam.GPSBlamPlugin"/>
     14    <property name="plugin.description" value="Analyse a set of GPS points to obtain its centre and direction of spread."/>
     15    <property name="plugin.icon" value="images/mapmode/gpsblam_mode.png"/>
     16    <property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/GPSBlam"/>
     17    <!--<property name="plugin.early" value="..."/>-->
     18    <!--<property name="plugin.requires" value="..."/>-->
     19    <!--<property name="plugin.stage" value="..."/>-->
     20
     21    <!-- ** include targets that all plugins have in common ** -->
    1422    <import file="../build-common.xml"/>
    15  
    16     <!--
    17     **********************************************************
    18     ** dist - creates the plugin jar
    19     **********************************************************
    20     -->
    21     <target name="dist" depends="compile,revision">
    22         <echo message="creating ${ant.project.name}.jar ... "/>
    23         <copy todir="${plugin.build.dir}/resources">
    24             <fileset dir="resources"/>
    25         </copy>
    26         <copy todir="${plugin.build.dir}/images">
    27             <fileset dir="images"/>
    28         </copy>
    29         <copy todir="${plugin.build.dir}/data">
    30             <fileset dir="data"/>
    31         </copy>
    32         <copy todir="${plugin.build.dir}">
    33             <fileset dir=".">
    34                 <include name="README"/>
    35                 <include name="LICENSE"/>
    36             </fileset>
    37         </copy>
    38         <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}" manifestencoding="UTF-8">
    39             <!--
    40             ************************************************
    41             ** configure these properties. Most of them will be copied to the plugins
    42             ** manifest file. Property values will also show up in the list available
    43             ** plugins: https://josm.openstreetmap.de/wiki/Plugins.
    44             **
    45             ************************************************
    46             -->
    47             <manifest>
    48                 <attribute name="Author" value="Russell Edwards"/>
    49                 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.gpsblam.GPSBlamPlugin"/>
    50                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    51                 <attribute name="Plugin-Description" value="Analyse a set of GPS points to obtain its centre and direction of spread."/>
    52                 <attribute name="Plugin-Icon" value="images/mapmode/gpsblam_mode.png"/>
    53                 <attribute name="Plugin-Link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/GPSBlam"/>
    54                 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
    55                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    56             </manifest>
    57         </jar>
    58     </target>
     23
    5924</project>
  • applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java

    r33776 r34515  
    99import java.util.LinkedList;
    1010
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.data.coor.CachedLatLon;
    1312import org.openstreetmap.josm.data.gpx.GpxTrack;
     
    1514import org.openstreetmap.josm.data.gpx.WayPoint;
    1615import org.openstreetmap.josm.data.projection.Projection;
     16import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    1717import org.openstreetmap.josm.gui.MainApplication;
    1818import org.openstreetmap.josm.gui.layer.GpxLayer;
     
    3030    GPSBlamInputData(Point p1, Point p2, int radius) {
    3131        Collection<Layer> layers = MainApplication.getLayerManager().getLayers();
    32         Projection projection = Main.getProjection();
     32        Projection projection = ProjectionRegistry.getProjection();
    3333        for (Layer l : layers) {
    3434            if (l.isVisible() && l instanceof GpxLayer) {
    35                 for (GpxTrack track : ((GpxLayer)l).data.tracks) {
     35                for (GpxTrack track : ((GpxLayer) l).data.tracks) {
    3636                    for (GpxTrackSegment segment: track.getSegments()) {
    3737                        for (WayPoint wayPoint : segment.getWayPoints()) {
     
    6969                                    this.add(cll, wayPoint);
    7070                                }
    71                             } // end if circular else line based selection
    72                         } // end loop over wayponts in segment
    73                     } // end loop over segments in track
    74                 } // end loop over tracks in layer
    75             } // end if layer visible
    76         } // end loop over layers
    77     } // end constructor
     71                            }
     72                        }
     73                    }
     74                }
     75            }
     76        }
     77    }
    7878
    7979    private void add(CachedLatLon cll, WayPoint wayPoint) {
    8080        this.add(cll);
    8181        Calendar day = new GregorianCalendar();
    82         day.setTimeInMillis((long)wayPoint.time*1000);
     82        day.setTimeInMillis((long) (wayPoint.time*1000d));
    8383        day.set(Calendar.HOUR_OF_DAY, 0);
    8484        day.set(Calendar.MINUTE, 0);
  • applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamMarker.java

    r33776 r34515  
    1111import java.awt.geom.Point2D;
    1212
    13 import org.openstreetmap.josm.Main;
    1413import org.openstreetmap.josm.data.coor.CachedLatLon;
    1514import org.openstreetmap.josm.data.coor.EastNorth;
    1615import org.openstreetmap.josm.data.projection.Projection;
     16import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    1717import org.openstreetmap.josm.gui.MapView;
    1818
     
    2323    private static final double FAC = 2.45; // 2.45 gives 95% CI for 2D
    2424
    25     /** construct a blammarker by analysis of selected GPS points */
     25    /**
     26     * Construct a blammarker by analysis of selected GPS points
     27     * @param inputData input data
     28     */
    2629    GPSBlamMarker(GPSBlamInputData inputData) {
    27         Projection projection = Main.getProjection();
     30        Projection projection = ProjectionRegistry.getProjection();
    2831        // get mean east, north
    2932        double meanEast=0.0, meanNorth=0.0;
     
    6770
    6871        // save latlon coords of the mean and the ends of the crosshairs
    69         Projection proj = Main.getProjection();
     72        Projection proj = ProjectionRegistry.getProjection();
    7073        mean = new CachedLatLon(proj.eastNorth2latlon(new EastNorth(meanEast, meanNorth)));
    7174        hair1Coord1 = new CachedLatLon(proj.eastNorth2latlon(
     
    8891
    8992    void paint(Graphics2D g, MapView mv) {
    90         Projection projection = Main.getProjection();
     93        Projection projection = ProjectionRegistry.getProjection();
    9194        g.setColor(Color.GREEN);
    9295        g.setPaintMode();
Note: See TracChangeset for help on using the changeset viewer.