Modify

Opened 8 years ago

Closed 18 months ago

Last modified 18 months ago

#13097 closed defect (fixed)

[PATCH] Angle snapping impossible with WGS84 projection

Reported by: vandalfsen@… Owned by: team
Priority: normal Milestone: 22.12
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Select WGS84 as projection system.
  2. In drawing mode activate angle snapping (angle in status bar turns green).
  3. Select a reference section by right click.

What is the expected result?

The possible angles in which to draw are limited.

What happens instead?

No reference section can be selected, so angle snapping is impossible. Switching to UTM projection is a possible workaround.

Please provide any additional information below. Attach a screenshot if possible.

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-06-04 17:28:58 +0200 (Sat, 04 Jun 2016)
Build-Date:2016-06-04 15:31:27
Revision:10327
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10327 nl) Windows XP 32-Bit
Memory Usage: 192 MB / 245 MB (83 MB allocated, but free)
Java version: 1.8.0_91-b14, Oracle Corporation, Java HotSpot(TM) Client VM
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=%UserProfile%\Local Settings\Application Data\Sun\Java\Deployment\cache\6.0\56\1ee8cfb8-54f745d3, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.splashport=2608, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp, -Djnlpx.jvm=<java.home>\bin\javaw.exe, -Djnlpx.vmargs=LURqYXZhLnV0aWwuQXJyYXlzLnVzZUxlZ2FjeU1lcmdlU29ydD10cnVlAC1Eam5scC5hcHBsaWNhdGlvbi5ocmVmPWh0dHBzOi8vam9zbS5vcGVuc3RyZWV0bWFwLmRlL2Rvd25sb2FkL2pvc20uam5scAA=]
Dataset consistency test: No problems found

Plugins:
- Mapillary (32158)
- apache-commons (32309)
- apache-http (32309)
- turnrestrictions (32158)
- undelete (32309)
- utilsplugin2 (32158)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
- https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1

Last errors/warnings:
- W: java.net.SocketTimeoutException: Read timed out
- W: java.net.SocketTimeoutException: Read timed out
- E: java.lang.NegativeArraySizeException
- E: java.lang.NegativeArraySizeException
- E: java.lang.NegativeArraySizeException

Attachments (0)

Change History (4)

comment:1 by taylor.smock, 18 months ago

Milestone: 22.12
Summary: Angle snapping impossible with WGS84 projection[PATCH] Angle snapping impossible with WGS84 projection

This turns out to be a very easy fix:

  • src/org/openstreetmap/josm/actions/mapmode/DrawSnapHelper.java

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
    diff --git a/src/org/openstreetmap/josm/actions/mapmode/DrawSnapHelper.java b/src/org/openstreetmap/josm/actions/mapmode/DrawSnapHelper.java
    a b  
    2424import org.openstreetmap.josm.data.osm.Node;
    2525import org.openstreetmap.josm.data.osm.Way;
    2626import org.openstreetmap.josm.data.osm.WaySegment;
     27import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    2728import org.openstreetmap.josm.gui.MainApplication;
    2829import org.openstreetmap.josm.gui.MapView;
    2930import org.openstreetmap.josm.gui.MapViewState;
     
    439440        double de = p.east()-e0;
    440441        double dn = p.north()-n0;
    441442        double l = de*pe+dn*pn;
    442         double delta = MainApplication.getMap().mapView.getDist100Pixel()/20;
     443        double delta = MainApplication.getMap().mapView.getDist100Pixel() / (20 * ProjectionRegistry.getProjection().getMetersPerUnit());
    443444        if (!absoluteFix && l < delta) {
    444445            active = false;
    445446            return p;

comment:2 by taylor.smock, 18 months ago

Resolution: fixed
Status: newclosed

In 18612/josm:

Fix #13097: Angle snapping impossible with WGS84 projection

comment:3 by taylor.smock, 18 months ago

Milestone: 22.1222.11

comment:4 by taylor.smock, 18 months ago

Milestone: 22.1122.12

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.