Changeset 13622 in josm


Ignore:
Timestamp:
2018-04-12T23:10:28+02:00 (11 days ago)
Author:
Don-vip
Message:

see #16129 - fix Equidistant Cylindrical projection

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

Legend:

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

    r13598 r13622  
    66import org.openstreetmap.josm.data.Bounds;
    77import org.openstreetmap.josm.data.projection.ProjectionConfigurationException;
     8import org.openstreetmap.josm.tools.Utils;
    89
    910/**
     
    3435    private double cosStandardParallel;
    3536
    36     /**
    37      * Standard parallel parameter.
    38      * Set to 0° for the {@code PlateCarree} case.
    39      */
    40     private double standardParallel;
    41 
    4237    @Override
    4338    public String getName() {
     
    5348    public void initialize(ProjParameters params) throws ProjectionConfigurationException {
    5449        super.initialize(params);
    55         if (params.lat1 != null) {
    56             standardParallel = Math.abs(params.lat1);
    57             cosStandardParallel = Math.cos(standardParallel);
     50        if (params.lat_ts != null) {
     51            cosStandardParallel = Math.cos(Utils.toRadians(Math.abs(params.lat_ts)));
    5852        } else {
    5953            // standard parallel is the equator (Plate Carree or Equirectangular)
    60             standardParallel = 0;
    6154            cosStandardParallel = 1.0;
    6255        }
  • trunk/src/org/openstreetmap/josm/data/projection/proj/ProjParameters.java

    r13598 r13622  
    2121    public Double lat2;
    2222
    23     // Polar Stereographic and Mercator
     23    // Polar Stereographic, Mercator and Equidistant Cylindrical
    2424    /** {@link Param#lat_ts} */
    2525    public Double lat_ts;
Note: See TracChangeset for help on using the changeset viewer.