Changeset 34399 in osm
- Timestamp:
- 2018-07-07T00:33:12+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/MicrosoftStreetside
- Files:
-
- 2 deleted
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/MicrosoftStreetside/.classpath
r34386 r34399 19 19 </attributes> 20 20 </classpathentry> 21 <classpathentry including="**/*.po" kind="src" output="bin/main" path="poSrc">22 <attributes>23 <attribute name="gradle_scope" value="main"/>24 <attribute name="gradle_used_by_scope" value="main,test"/>25 </attributes>26 </classpathentry>27 21 <classpathentry kind="src" output="bin/test" path="test/data"> 28 22 <attributes> -
applications/editors/josm/plugins/MicrosoftStreetside/build.gradle
r34358 r34399 49 49 srcDirs = ['src'] 50 50 } 51 po {52 srcDirs = ['poSrc']53 }54 51 resources { 55 52 srcDirs = ["$projectDir"] … … 73 70 debugPort = 7051 74 71 manifest { 75 // See https://floscher.github.io/gradle-josm-plugin/kdoc/current/gradle-josm-plugin/org.openstreetmap.josm.gradle.plugin.config/-josm-manifest/old-version-download-link.html 76 //oldVersionDownloadLink 13643, 'v1.5.14', new URL("https://github.com/JOSM/Mapillary/releases/download/v1.5.14/Mapillary.jar") 77 //oldVersionDownloadLink 13558, 'v1.5.12+pre13643', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.12%2Bpre13643/Mapillary.jar') 78 //oldVersionDownloadLink 12987, 'v1.5.10', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.10/Mapillary.jar') 79 //oldVersionDownloadLink 12675, 'v1.5.7', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.7/Mapillary.jar') 80 //oldVersionDownloadLink 12128, 'v1.5.5', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.5/Mapillary.jar') 81 //oldVersionDownloadLink 10824, 'v1.5.3', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.3/Mapillary.jar') 72 //oldVersionDownloadLink 10824, 'v1.5.3', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.3/Mapillary.jar') 82 73 } 83 74 i18n { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideCubemap.java
r34385 r34399 10 10 * 11 11 */ 12 public class StreetsideCubemap extends StreetsideAbstractImage /*implements Comparable<StreetsideAbstractImage>*/{ 13 14 //private static Map<String,Map<String,BufferedImage>> face2TilesMap = new HashMap<String,Map<String,BufferedImage>>(); 12 public class StreetsideCubemap extends StreetsideAbstractImage { 15 13 16 14 /** -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideImage.java
r34365 r34399 24 24 */ 25 25 public static class Rn { 26 // placeholder for nexted Rn attribute26 // placeholder for Rn attribute (undocumented streetside complex inner type) 27 27 } 28 28 … … 53 53 54 54 /** 55 * Set of traffic signs in the image.56 *//*57 private final List<ImageDetection> detections = Collections.synchronizedList(new ArrayList<>());58 */59 /**60 55 * Main constructor of the class StreetsideImage 61 56 * … … 94 89 return String.valueOf(id); 95 90 } 96 97 /*public List<ImageDetection> getDetections() {98 return detections;99 }*/100 101 /*public void setAllDetections(Collection<ImageDetection> newDetections) {102 logger.debug("Add {0} detections to image {1}", newDetections.size(), getId());103 synchronized (detections) {104 detections.clear();105 detections.addAll(newDetections);106 }107 }*/108 91 109 92 public UserProfile getUser() { … … 120 103 } 121 104 122 // TODO: implement equals @rrh123 105 @Override 124 106 public boolean equals(Object object) { … … 126 108 } 127 109 128 // TODO: implement compareTo @rrh129 110 @Override 130 111 public int compareTo(StreetsideAbstractImage image) { … … 135 116 } 136 117 137 // TODO: implement hashcode @rrh138 118 @Override 139 119 public int hashCode() { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideLayer.java
r34393 r34399 122 122 if (StreetsidePlugin.getMapView() != null) { 123 123 StreetsideMainDialog.getInstance().streetsideImageDisplay.repaint(); 124 /*StreetsideMainDialog.getInstance()125 .getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)126 .put(KeyStroke.getKeyStroke("DELETE"), "StreetsideDel");127 StreetsideMainDialog.getInstance().getActionMap()128 .put("StreetsideDel", new DeleteImageAction());*/129 130 // There is no delete image action for Streetside (Streetside functionality here removed).131 //getLocationChangeset().addChangesetListener(StreetsideChangesetDialog.getInstance());132 124 } 133 125 createHatchTexture(); … … 257 249 super.setVisible(visible); 258 250 getData().getImages().parallelStream().forEach(img -> img.setVisible(visible)); 259 if (MainApplication.getMap() != null) {260 //StreetsideFilterDialog.getInstance().refresh();261 }262 251 } 263 252 … … 301 290 } 302 291 } 292 293 // TODO: Sequence lines removed because Streetside imagery is organized 294 // such that the images are sorted by the distance from the center of 295 // the bounding box - Redefine sequences? 303 296 304 297 // Draw sequence line … … 379 372 g.drawOval(p.x - IMG_MARKER_RADIUS, p.y - IMG_MARKER_RADIUS, 2 * IMG_MARKER_RADIUS, 2 * IMG_MARKER_RADIUS); 380 373 } 381 382 383 /*if (img instanceof StreetsideImage && !((StreetsideImage) img).getDetections().isEmpty()) {384 final Path2D trafficSign = new Path2D.Double();385 trafficSign.moveTo(p.getX() - StreetsideLayer.TRAFFIC_SIGN_SIZE / 2d, p.getY() - StreetsideLayer.TRAFFIC_SIGN_HEIGHT_3RD);386 trafficSign.lineTo(p.getX() + StreetsideLayer.TRAFFIC_SIGN_SIZE / 2d, p.getY() - StreetsideLayer.TRAFFIC_SIGN_HEIGHT_3RD);387 trafficSign.lineTo(p.getX(), p.getY() + 2 * StreetsideLayer.TRAFFIC_SIGN_HEIGHT_3RD);388 trafficSign.closePath();389 g.setColor(Color.WHITE);390 g.fill(trafficSign);391 g.setStroke(new BasicStroke(1));392 g.setColor(Color.RED);393 g.draw(trafficSign);394 }*/395 374 } 396 375 … … 536 515 } 537 516 538 /**539 * Action used to delete images.540 *541 * @author nokutu542 */543 /*private class DeleteImageAction extends AbstractAction {544 545 private static final long serialVersionUID = -982809854631863962L;546 547 @Override548 public void actionPerformed(ActionEvent e) {549 if (instance != null)550 StreetsideRecord.getInstance().addCommand(551 new CommandDelete(getData().getMultiSelectedImages()));552 }553 }*/554 555 517 private static class NearestImgToTargetComparator implements Comparator<StreetsideAbstractImage> { 556 518 private final StreetsideAbstractImage target; -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java
r34349 r34399 37 37 /** Walk action */ 38 38 private static final StreetsideWalkAction WALK_ACTION = new StreetsideWalkAction(); 39 /** Upload action */40 //private static final StreetsideUploadAction UPLOAD_ACTION = new StreetsideUploadAction();41 39 42 40 static { … … 48 46 MainMenu.add(MainApplication.getMenu().dataMenu, new StreetsideJoinAction(), false); 49 47 MainMenu.add(MainApplication.getMenu().moreToolsMenu, WALK_ACTION, false); 50 //MainMenu.add(MainApplication.getMenu().imagerySubMenu, new MapObjectLayerAction(), false);51 //MainMenu.add(MainApplication.getMenu().imagerySubMenu, new MapObjectLayerAction(), false);52 48 } 53 49 } … … 90 86 )); 91 87 MainApplication.getMap().addToggleDialog(StreetsideViewerDialog.getInstance(), false); 92 //MainApplication.getMap().addToggleDialog(StreetsideHistoryDialog.getInstance(), false);93 //MainApplication.getMap().addToggleDialog(StreetsideChangesetDialog.getInstance(), false);94 //MainApplication.getMap().addToggleDialog(StreetsideFilterDialog.getInstance(), false);95 88 } 96 89 if (oldFrame != null && newFrame == null) { // map frame destroyed 97 90 StreetsideMainDialog.destroyInstance(); 98 //StreetsideHistoryDialog.destroyInstance();99 //StreetsideChangesetDialog.destroyInstance();100 //StreetsideFilterDialog.destroyInstance();101 91 ImageInfoPanel.destroyInstance(); 102 92 CubemapBuilder.destroyInstance(); … … 120 110 return null; 121 111 } 122 123 /** 124 * @return the {@link StreetsideUploadAction} for the plugin 125 */ 126 /*public static StreetsideUploadAction getUploadAction() { 127 return UPLOAD_ACTION; 128 }*/ 129 130 /** 131 * @return the {@link StreetsideZoomAction} for the plugin 132 */ 133 /*public static StreetsideZoomAction getZoomAction() { 134 return ZOOM_ACTION; 135 }*/ 136 } 112 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideSequence.java
r34358 r34399 7 7 8 8 import org.openstreetmap.josm.plugins.streetside.model.UserProfile; 9 10 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideUtils;11 9 12 10 /** … … 67 65 } 68 66 69 // TODO: Are all my sequences only set with id values? (no LatLon/Cas?) @rrh70 67 public StreetsideSequence(String id) { 71 68 this.id = id; … … 88 85 * @param images The set of {@link StreetsideAbstractImage} objects to be added. 89 86 */ 90 @SuppressWarnings("unchecked")91 87 public synchronized void add(final Collection<? extends StreetsideAbstractImage> images) { 92 Collection<? extends StreetsideAbstractImage> res = images;93 res = StreetsideUtils.sortImagesInSequence((List<StreetsideAbstractImage>) images);94 88 this.images.addAll(images); 95 89 images.forEach(img -> img.setSequence(this)); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideDownloadAction.java
r34393 r34399 28 28 private static final long serialVersionUID = 4426446157849005029L; 29 29 30 // TODO: I18n "Open Streeside Layer" 31 public static final Shortcut SHORTCUT = Shortcut.registerShortcut("Streetside", /*tr(*/"Open Streetside layer"/*)*/, KeyEvent.VK_COMMA, Shortcut.SHIFT); 30 public static final Shortcut SHORTCUT = Shortcut.registerShortcut("Streetside", "Open Streetside layer", KeyEvent.VK_COMMA, Shortcut.SHIFT); 32 31 33 32 final static Logger logger = Logger.getLogger(StreetsideDownloadAction.class); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideExportAction.java
r34365 r34399 29 29 import org.openstreetmap.josm.tools.ImageProvider; 30 30 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 31 import org.openstreetmap.josm.tools.Logging;32 31 import org.openstreetmap.josm.tools.Shortcut; 33 32 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cache/CacheUtils.java
r34365 r34399 11 11 import org.openstreetmap.josm.plugins.streetside.StreetsideImage; 12 12 import org.openstreetmap.josm.plugins.streetside.cubemap.CubemapBuilder; 13 import org.openstreetmap.josm.tools.Logging;14 13 15 14 /** … … 85 84 break; 86 85 case FULL_IMAGE: 87 // TODO: is this still useful? @rrh 86 // not used (relic from Mapillary) 87 break; 88 88 case CUBEMAP: 89 89 if(img.getId()==null) { … … 98 98 } 99 99 } 100 101 /**102 * Downloads the picture of the given image. Does nothing when it is already103 * in cache.104 *105 * @param cm106 * The cubemap to be downloaded.107 * @param pic108 * The picture type to be downloaded (full quality, thumbnail, both, or cubemap.)109 */110 /*public static void downloadCubemapFront(StreetsideImage cm, PICTURE pic) {111 switch (pic) {112 case CUBEMAP:113 for (int i = 0; i < 6; i++) {114 for (int j = 0; j < 4; j++) {115 for (int k = 0; k < 4; k++) {116 String cubeface = CubemapUtils.getFaceNumberForCount(i);117 String tileNr = CubemapUtils.rowCol2StreetsideCellAddressMap118 .get(Integer.toString(j) + Integer.toString(k));119 long tileId = Long.parseLong(cm.getId() + cubeface + tileNr);120 121 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_FRONT, ignoreDownload);122 123 }124 }125 }126 break;127 default:128 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_FRONT, ignoreDownload);129 break;130 }131 }*/132 133 /*public static void downloadCubemapRight(StreetsideImage cm, PICTURE pic) {134 switch (pic) {135 case CUBEMAP:136 for (int i = 0; i < 6; i++) {137 for (int j = 0; j < 4; j++) {138 for (int k = 0; k < 4; k++) {139 String cubeface = CubemapUtils.getFaceNumberForCount(i);140 String tileNr = CubemapUtils.rowCol2StreetsideCellAddressMap141 .get(Integer.toString(j) + Integer.toString(k));142 long tileId = Long.parseLong(cm.getId() + cubeface + tileNr);143 144 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_RIGHT, ignoreDownload);145 146 }147 }148 }149 break;150 default:151 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_RIGHT, ignoreDownload);152 break;153 }154 }*/155 156 /*public static void downloadCubemapBack(StreetsideImage cm, PICTURE pic) {157 switch (pic) {158 case CUBEMAP:159 for (int i = 0; i < 6; i++) {160 for (int j = 0; j < 4; j++) {161 for (int k = 0; k < 4; k++) {162 String cubeface = CubemapUtils.getFaceNumberForCount(i);163 String tileNr = CubemapUtils.rowCol2StreetsideCellAddressMap164 .get(Integer.toString(j) + Integer.toString(k));165 long tileId = Long.parseLong(cm.getId() + cubeface + tileNr);166 167 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_BACK, ignoreDownload);168 169 }170 }171 }172 break;173 default:174 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_BACK, ignoreDownload);175 break;176 }177 }*/178 179 /*public static void downloadCubemapLeft(StreetsideImage cm, PICTURE pic) {180 switch (pic) {181 case CUBEMAP:182 for (int i = 0; i < 6; i++) {183 for (int j = 0; j < 4; j++) {184 for (int k = 0; k < 4; k++) {185 String cubeface = CubemapUtils.getFaceNumberForCount(i);186 String tileNr = CubemapUtils.rowCol2StreetsideCellAddressMap187 .get(Integer.toString(j) + Integer.toString(k));188 long tileId = Long.parseLong(cm.getId() + cubeface + tileNr);189 190 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_LEFT, ignoreDownload);191 192 }193 }194 }195 break;196 default:197 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_LEFT, ignoreDownload);198 break;199 }200 }*/201 202 /*public static void downloadCubemapUp(StreetsideImage cm, PICTURE pic) {203 switch (pic) {204 case CUBEMAP:205 for (int i = 0; i < 6; i++) {206 for (int j = 0; j < 4; j++) {207 for (int k = 0; k < 4; k++) {208 String cubeface = CubemapUtils.getFaceNumberForCount(i);209 String tileNr = CubemapUtils.rowCol2StreetsideCellAddressMap210 .get(Integer.toString(j) + Integer.toString(k));211 long tileId = Long.parseLong(cm.getId() + cubeface + tileNr);212 213 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_UP, ignoreDownload);214 215 }216 }217 }218 break;219 default:220 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_UP, ignoreDownload);221 break;222 }223 }*/224 225 /*public static void downloadCubemapDown(StreetsideImage cm, PICTURE pic) {226 switch (pic) {227 case CUBEMAP:228 for (int i = 0; i < 6; i++) {229 for (int j = 0; j < 4; j++) {230 for (int k = 0; k < 4; k++) {231 String cubeface = CubemapUtils.getFaceNumberForCount(i);232 String tileNr = CubemapUtils.rowCol2StreetsideCellAddressMap233 .get(Integer.toString(j) + Integer.toString(k));234 long tileId = Long.parseLong(cm.getId() + cubeface + tileNr);235 236 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_DOWN, ignoreDownload);237 238 }239 }240 }241 break;242 default:243 submit(cm.getId(), StreetsideCache.Type.CUBEMAP_DOWN, ignoreDownload);244 break;245 }246 }*/247 100 248 101 /** … … 266 119 } 267 120 268 private static class IgnoreDownload implements ICachedLoaderListener {121 private static class IgnoreDownload implements ICachedLoaderListener { 269 122 270 @Override 271 public void loadingFinished(CacheEntry arg0, CacheEntryAttributes arg1, LoadResult arg2) { 272 // Ignore download 273 } 123 @Override 124 public void loadingFinished(CacheEntry arg0, CacheEntryAttributes arg1, LoadResult arg2) { 125 // Ignore download 126 } 127 } 274 128 } 275 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cache/StreetsideCache.java
r34317 r34399 52 52 */ 53 53 public StreetsideCache(final String id, final Type type) { 54 //ICacheAccess<String,BufferedImageCacheEntry>,TileJobOptions,ThreadPoolExecutor55 // TODO: StreetsideCache.java:53: error: no suitable constructor found for JCSCachedTileLoaderJob(CacheAccess<String,BufferedImageCacheEntry>,int,int,HashMap<String,String>)56 // [javac] super(Caches.ImageCache.getInstance().getCache(), 50000, 50000, new HashMap<String,String>());57 // [javac] ^58 // [javac] constructor JCSCachedTileLoaderJob.JCSCachedTileLoaderJob(ICacheAccess<String,BufferedImageCacheEntry>,TileJobOptions,ThreadPoolExecutor) is not applicable59 // [javac] (actual and formal argument lists differ in length)60 // [javac] constructor JCSCachedTileLoaderJob.JCSCachedTileLoaderJob(ICacheAccess<String,BufferedImageCacheEntry>,TileJobOptions) is not applicable61 // [javac] (actual and formal argument lists differ in length)62 63 //super(Caches.ImageCache.getInstance().getCache(), 50000, 50000, new HashMap<String,String>());64 //super(Caches.ImageCache.getInstance().getCache(),TileJobOptions,ThreadpoolExecutor)65 //TileJobOptions tjo = ;66 54 super(Caches.ImageCache.getInstance().getCache(),new TileJobOptions(50000, 50000, new HashMap<String,String>(),50000l)); 67 55 … … 70 58 url = null; 71 59 } else { 72 //this.id = id + (type == Type.FULL_IMAGE ? ".FULL_IMAGE" : ".THUMBNAIL");73 // Add an "01" to the Streetside imageId in order to get a frontal thumbnail image for the display74 60 this.id = id; 75 61 url = VirtualEarth.streetsideTile(id, type == Type.THUMBNAIL); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CameraTransformer.java
r34317 r34399 11 11 import javafx.scene.transform.Translate; 12 12 13 // necessary because JavaFX is not an official part of Java 8 (access) 13 14 @SuppressWarnings("restriction") 14 15 public class CameraTransformer extends Group { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapBuilder.java
r34393 r34399 3 3 4 4 import java.awt.image.BufferedImage; 5 import java.text.MessageFormat; 5 6 import java.util.ArrayList; 6 7 import java.util.HashMap; … … 22 23 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties; 23 24 import org.openstreetmap.josm.tools.I18n; 25 import org.slf4j.helpers.MessageFormatter; 24 26 25 27 import javafx.scene.image.Image; 26 28 import javafx.scene.image.ImageView; 27 29 30 // JavaFX access in Java 8 28 31 @SuppressWarnings("restriction") 29 32 public class CubemapBuilder implements ITileDownloadingTaskListener, StreetsideDataListener { … … 76 79 long runTime = (System.currentTimeMillis()-startTime)/1000; 77 80 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 78 logger.debug( "Completed downloading tiles for " + newImage.getId() + " in " + runTime + " seconds.");81 logger.debug(MessageFormat.format("Completed downloading tiles for {0} in {1} seconds.", newImage.getId() , runTime)); 79 82 } 80 83 } … … 121 124 122 125 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 123 logger.debug( "Completed tile downloading task " + ff.get() + " in " + (startTime - System.currentTimeMillis())/ 1000 + " seconds.");126 logger.debug(MessageFormat.format("Completed tile downloading task {0} in {1} seconds.", ff.get(), (startTime - System.currentTimeMillis())/ 1000)); 124 127 } 125 128 } … … 141 144 for (Future<String> ff : results) { 142 145 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 143 logger.debug( "Completed tile downloading task " + ff.get() + " in " +144 (startTime - System.currentTimeMillis())/ 1000 + " seconds.");146 logger.debug(MessageFormat.format("Completed tile downloading task {0} in {1} seconds.",ff.get(), 147 (startTime - System.currentTimeMillis())/ 1000)); 145 148 } 146 149 } … … 156 159 157 160 if (StreetsideProperties.DEBUGING_ENABLED.get()) { 158 logger.debug( "Tile imagery downloading tasks completed in " + runTime/1000000);161 logger.debug(MessageFormat.format("Tile imagery downloading tasks completed in {0} seconds.", runTime/1000000)); 159 162 } 160 163 … … 180 183 if (tileCount == (CubemapUtils.NUM_SIDES * maxCols * maxRows)) { 181 184 if (StreetsideProperties.DEBUGING_ENABLED.get()) { 182 logger.debug( tileCount + " tile images ready for building cumbemap faces for cubemap " +183 CubemapBuilder.getInstance().getCubemap().getId()) ;185 logger.debug(MessageFormat.format("{0} tile images ready for building cumbemap faces for cubemap {1}.", tileCount, 186 CubemapBuilder.getInstance().getCubemap().getId())); 184 187 } 185 188 … … 269 272 if (StreetsideProperties.DEBUGING_ENABLED.get()) { 270 273 logger.debug( 271 "Completed downloading, assembling and setting cubemap imagery for cubemap " + cubemap.getId() + " in "272 + runTime + " sceconds."274 MessageFormat.format("Completed downloading, assembling and setting cubemap imagery for cubemap {0} in {1} seconds.", cubemap.getId(), 275 runTime) 273 276 ); 274 277 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/CubemapUtils.java
r34393 r34399 9 9 import org.apache.log4j.Logger; 10 10 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties; 11 import org.openstreetmap.josm.tools.I18n;12 11 13 12 public class CubemapUtils { … … 110 109 } 111 110 112 // TODO: leading zeros added in StreetsideURL now113 //sb.append("0");114 111 res = sb.reverse().toString(); 115 112 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/GraphicsUtils.java
r34393 r34399 5 5 import java.awt.image.AffineTransformOp; 6 6 import java.awt.image.BufferedImage; 7 import java.text.MessageFormat; 7 8 8 9 import org.apache.log4j.Logger; 9 10 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties; 10 import org.openstreetmap.josm.tools.I18n;11 import org.openstreetmap.josm.tools.Logging;12 11 13 12 import javafx.application.Platform; … … 68 67 for (int i = 0; i < rows; i++) { 69 68 for (int j = 0; j < cols; j++) { 70 // TODO: this makes the image a mirror image. why!?! 71 img.createGraphics().drawImage(tiles[num], chunkWidth * j, (chunkHeight * i), null); 69 // TODO: unintended mirror image created with draw call - requires 70 // extra reversal step - fix! 71 img.createGraphics().drawImage(tiles[num], chunkWidth * j, (chunkHeight * i), null); 72 72 73 // TODO: remove file test! 74 /*try { 75 ImageIO.write(img, "jpeg", new File("/Users/renerr18/Desktop/TileImagesTest/tile16b" + Long.valueOf(System.currentTimeMillis()).toString() + "createGraphicsAfter.jpeg")); 76 //ImageIO.write(res[i], "jpeg", outputfileAfter); 77 } catch (IOException e) { 78 // TODO Auto-generated catch block 79 e.printStackTrace(); 80 }*/ 73 int width = StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get() ? 1014 : 510; 74 int height = StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get() ? 1014 : 510; 81 75 82 int width = StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get()?1014:510; 83 int height = StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get()?1014:510; 76 // BufferedImage for mirror image 77 res = new BufferedImage( 78 StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get() ? 1014 : 510, 79 StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get() ? 1014 : 510, BufferedImage.TYPE_INT_ARGB); 84 80 85 // BufferedImage for mirror image 86 res = new BufferedImage(StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get()?1014:510, StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get()?1014:510, 87 BufferedImage.TYPE_INT_ARGB); 81 // Create mirror image pixel by pixel 82 for (int y = 0; y < height; y++) { 83 for (int lx = 0, rx = width - 1; lx < width; lx++, rx--) { 84 // lx starts from the left side of the image 85 // rx starts from the right side of the image 86 // lx is used since we are getting pixel from left side 87 // rx is used to set from right side 88 // get source pixel value 89 int p = img.getRGB(lx, y); 88 90 89 // Create mirror image pixel by pixel 90 for (int y = 0; y < height; y++) 91 { 92 for (int lx = 0, rx = width - 1; lx < width; lx++, rx--) 93 { 94 // lx starts from the left side of the image 95 // rx starts from the right side of the image 96 // lx is used since we are getting pixel from left side 97 // rx is used to set from right side 98 // get source pixel value 99 int p = img.getRGB(lx, y); 91 // set mirror image pixel value 92 res.setRGB(rx, y, p); 93 } 94 } 95 num++; 96 } 97 } 100 98 101 // set mirror image pixel value 102 res.setRGB(rx, y, p); 103 } 104 } 105 num++; 106 } 107 } 108 109 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 110 logger.debug("Image concatenated in " + (System.currentTimeMillis()-start) + " millisecs."); 111 } 112 return res; 99 if (StreetsideProperties.DEBUGING_ENABLED.get()) { 100 logger 101 .debug(MessageFormat.format("Image concatenated in {0} seconds.", (System.currentTimeMillis() - start) / 1000)); 102 } 103 return res; 113 104 } 114 105 … … 137 128 138 129 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 139 logger.debug( "Images cropped in " + (System.currentTimeMillis()-start) + " millisecs.");130 logger.debug(MessageFormat.format("Images cropped in {0}", (System.currentTimeMillis()-start) + " millisecs.")); 140 131 } 141 132 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cubemap/TileDownloadingTask.java
r34393 r34399 3 3 4 4 import java.awt.image.BufferedImage; 5 import java.text.MessageFormat; 5 6 import java.util.List; 6 7 import java.util.Objects; … … 14 15 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties; 15 16 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideURL; 16 import org.openstreetmap.josm.tools.I18n;17 import org.openstreetmap.josm.tools.Logging;18 17 19 18 import us.monoid.web.Resty; … … 117 116 long endTime = System.currentTimeMillis(); 118 117 long runTime = (endTime-startTime)/1000; 119 logger.debug( "Loaded image for " + tileId + " in " + runTime + " seconds");118 logger.debug(MessageFormat.format("Loaded image for {0} in {1} seconds.", tileId, runTime)); 120 119 } 121 120 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/StreetsideMainDialog.java
r34365 r34399 39 39 import org.openstreetmap.josm.tools.I18n; 40 40 import org.openstreetmap.josm.tools.ImageProvider; 41 import org.openstreetmap.josm.tools.Logging;42 41 43 42 /** … … 290 289 } 291 290 } 292 // TODO: handle/convert/remove "imported images" 293 } /*else if (image instanceof StreetsideImportedImage) { 294 final StreetsideImportedImage streetsideImage = (StreetsideImportedImage) image; 295 try { 296 streetsideImageDisplay.setImage(streetsideImage.getImage(), null); 297 } catch (final IOException e) { 298 logger.error(e); 299 } 300 }*/ 291 } 301 292 updateTitle(); 302 293 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/StreetsidePreferenceSetting.java
r34365 r34399 59 59 60 60 private final JCheckBox displayHour = 61 // TODO tr( RRH62 // i18n: Checkbox label in JOSM settings63 61 new JCheckBox(I18n.tr("Display hour when the picture was taken"), StreetsideProperties.DISPLAY_HOUR.get()); 64 62 private final JCheckBox format24 = 65 // TODO tr( RRH66 // i18n: Checkbox label in JOSM settings67 63 new JCheckBox(I18n.tr("Use 24 hour format"), StreetsideProperties.TIME_FORMAT_24.get()); 68 64 private final JCheckBox moveTo = 69 // TODO tr( RRH70 // i18n: Checkbox label in JOSM settings71 65 new JCheckBox(I18n.tr("Move to picture''s location with next/previous buttons"), StreetsideProperties.MOVE_TO_IMG.get()); 72 66 private final JCheckBox hoverEnabled = 73 // TODO tr( RRH74 // i18n: Checkbox label in JOSM settings75 67 new JCheckBox(I18n.tr("Preview images when hovering its icon"), StreetsideProperties.HOVER_ENABLED.get()); 76 68 private final JCheckBox cutOffSeq = 77 // TODO tr( RRH78 // i18n: Checkbox label in JOSM settings79 69 new JCheckBox(I18n.tr("Cut off sequences at download bounds"), StreetsideProperties.CUT_OFF_SEQUENCES_AT_BOUNDS.get()); 80 70 private final JCheckBox imageLinkToBlurEditor = 81 71 new JCheckBox( 82 // TODO tr( RRH83 // i18n: Checkbox label in JOSM settings84 72 I18n.tr("When opening Streetside image in web browser, show the blur editor instead of the image viewer"), 85 73 StreetsideProperties.IMAGE_LINK_TO_BLUR_EDITOR.get() 86 74 ); 87 75 private final JCheckBox developer = 88 // TODO tr( RRH89 // i18n: Checkbox label in JOSM settings90 76 new JCheckBox(I18n.tr("Enable experimental beta-features (might be unstable)"), StreetsideProperties.DEVELOPER.get()); 91 77 private final SpinnerNumberModel preFetchSize = new SpinnerNumberModel( … … 113 99 loginPanel.setBackground(StreetsideColorScheme.TOOLBAR_DARK_GREY); 114 100 JLabel brandImage = new JLabel(); 115 // TODO: change icons RRH116 101 try (InputStream is = StreetsidePreferenceSetting.class.getResourceAsStream("/images/streetside-logo-white.png")) { 117 102 if (is != null) { … … 139 124 140 125 JPanel downloadModePanel = new JPanel(); 141 // TODO tr( RRH142 126 downloadModePanel.add(new JLabel(I18n.tr("Download mode"))); 143 127 downloadModePanel.add(downloadModeComboBox); … … 152 136 153 137 final JPanel preFetchPanel = new JPanel(); 154 // TODO: tr( RRH155 // i18n: Spinner label in JOSM settings156 138 preFetchPanel.add(new JLabel(I18n.tr("Number of images to be pre-fetched (forwards and backwards)"))); 157 139 final JSpinner spinner = new JSpinner(preFetchSize); … … 189 171 loginPanel.remove(loginButton); 190 172 loginPanel.add(logoutButton, 3); 191 // TODO tr( RRH192 173 loginLabel.setText(I18n.tr("You are logged in as ''{0}''.", username)); 193 174 loginPanel.revalidate(); … … 199 180 loginPanel.remove(logoutButton); 200 181 loginPanel.add(loginButton, 3); 201 // TODO: tr( RRH202 182 loginLabel.setText(I18n.tr("You are currently not logged in.")); 203 183 loginPanel.revalidate(); … … 249 229 OAuthPortListener portListener = new OAuthPortListener(callback); 250 230 portListener.start(); 251 /*try { 252 // TODO: change URL RRH 253 StreetsideUtils.browse(StreetsideURL.MainWebsite.connect("http://localhost:"+OAuthPortListener.PORT+'/')); 254 } catch (IOException e) { 255 logger.error(e); 256 }*/ 231 // user authentication not supported for Streetside (Mapillary relic) 257 232 } 258 233 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/StreetsideViewerDialog.java
r34393 r34399 9 9 import org.openstreetmap.josm.gui.dialogs.ToggleDialog; 10 10 import org.openstreetmap.josm.plugins.streetside.gui.imageinfo.StreetsideViewerPanel; 11 import org.openstreetmap.josm.tools.I18n;12 11 13 12 /** … … 22 21 private static final long serialVersionUID = -8983900297628236197L; 23 22 24 // TODO: I18n support in all languages? 25 private static final String BASE_TITLE = /*I18n.marktr(*/"360° Streetside Viewer"/*)*/; 23 private static final String BASE_TITLE = "360° Streetside Viewer"; 26 24 27 25 private static StreetsideViewerDialog instance; … … 34 32 private StreetsideViewerDialog() { 35 33 // TODO: I18n support in all languages? 36 super( /*I18n.tr(*/StreetsideViewerDialog.BASE_TITLE/*)*/, "streetside-viewer", /*I18n.tr(*/"Open Streetside Viewer window"/*)*/,34 super(StreetsideViewerDialog.BASE_TITLE, "streetside-viewer", "Open Streetside Viewer window", 37 35 null, 200, true, StreetsidePreferenceSetting.class); 38 36 streetsideViewerPanel = new StreetsideViewerPanel(); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/dialog/ChooseGeoImageLayersDialog.java
r34365 r34399 6 6 import java.awt.Container; 7 7 import java.awt.FlowLayout; 8 import java.awt.GraphicsEnvironment;9 8 import java.util.ArrayList; 10 9 import java.util.List; 11 import java.util.Objects;12 import java.util.stream.Collectors;13 10 14 11 import javax.swing.AbstractListModel; … … 23 20 import javax.swing.UIManager; 24 21 25 import org.openstreetmap.josm.gui.Notification;26 22 import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer; 27 23 import org.openstreetmap.josm.gui.util.GuiHelper; 28 import org.openstreetmap.josm.plugins.streetside.StreetsideImportedImage;29 import org.openstreetmap.josm.plugins.streetside.StreetsideLayer;30 import org.openstreetmap.josm.plugins.streetside.StreetsidePlugin;31 import org.openstreetmap.josm.plugins.streetside.StreetsideSequence;32 24 import org.openstreetmap.josm.tools.I18n; 33 25 import org.openstreetmap.josm.tools.ImageProvider; … … 58 50 buttonPanel.add(cancelButton); 59 51 final JButton importButton = new JButton(I18n.tr("Import"), new ImageProvider("copy").get()); 60 /*importButton.addActionListener(e -> { 61 list.getSelectedValuesList().parallelStream().map(gil -> { 62 StreetsideSequence seq = new StreetsideSequence(); 63 seq.add( 64 gil.getImages().parallelStream() 65 .map(img -> { 66 try { 67 return StreetsideImportedImage.createInstance(img); 68 } catch (IllegalArgumentException iae) { 69 final String message = I18n.tr("Could not import a geotagged image to the Streetside layer!"); 70 logger.warn(I18n.tr(message, iae)); 71 if (!GraphicsEnvironment.isHeadless()) { 72 new Notification(message).setIcon(StreetsidePlugin.LOGO.get()).show(); 73 } 74 return null; 75 } 76 }) 77 .filter(Objects::nonNull) 78 .sorted((o1, o2) -> (int) Math.signum(o1.getCd() - o2.getCd())) // order by capture date timestamp (ascending) 79 .collect(Collectors.toList()) 80 ); 81 return seq; 82 }).forEach(seq -> { 83 StreetsideLayer.getInstance().getData().addAll(seq.getImages(), false); 84 // TODO: @rrh 85 //StreetsideImportAction.recordChanges(seq.getImages()); 86 }); 87 StreetsideLayer.invalidateInstance(); 88 dispose(); 89 });*/ 52 53 // Streetside does not support importing images (Mapillary relic) 54 importButton.setEnabled(false); 55 90 56 buttonPanel.add(importButton); 91 57 c.add(buttonPanel, BorderLayout.SOUTH); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/ImageInfoHelpPopup.java
r34393 r34399 44 44 mainText.setContentType("text/html"); 45 45 mainText.setFont(SelectableLabel.DEFAULT_FONT); 46 // TODO: Translate into all supported languages47 46 mainText.setText( 48 47 "<html><div style='width:250px'>" + 49 /*I18n.tr(*/"The Streetside plugin now uses a separate panel to display extra information (like the image key) and actions for the currently selected Streetside image (like viewing it in a browser)."/*)*/+48 "The Streetside plugin now uses a separate panel to display extra information (like the image key) and actions for the currently selected Streetside image (like viewing it in a browser)." + 50 49 "<br><br>" + 51 /*I18n.tr(*/"It can be activated by clicking the left button at the bottom of this message or the button in the toolbar on the left, which uses the same icon."/*)*/+50 "It can be activated by clicking the left button at the bottom of this message or the button in the toolbar on the left, which uses the same icon." + 52 51 "</div></html>" 53 52 ); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/ImageInfoPanel.java
r34394 r34399 93 93 JPanel imgButtons = new JPanel(); 94 94 imgButtons.add(new StreetsideButton(imgLinkAction, true)); 95 imgButtons.add(new StreetsideButton( null/*addStreetsideTagAction*/, true));95 imgButtons.add(new StreetsideButton(addStreetsideTagAction, true)); 96 96 seqKeyValue = new SelectableLabel(); 97 97 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java
r34393 r34399 3 3 4 4 import java.awt.BorderLayout; 5 import java.text.MessageFormat; 5 6 6 7 import javax.swing.JCheckBox; … … 22 23 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideURL; 23 24 import org.openstreetmap.josm.tools.I18n; 24 import org.openstreetmap.josm.tools.Logging;25 25 26 26 public final class StreetsideViewerPanel extends JPanel … … 86 86 JPanel privacyLink = new JPanel(); 87 87 88 // TODO: I18n for all languages? 89 imgLinkAction = new WebLinkAction(/*I18n.tr(*/"Report a privacy concern with this image"/*)*/, null); 88 imgLinkAction = new WebLinkAction("Report a privacy concern with this image", null); 90 89 privacyLink.add(new StreetsideButton(imgLinkAction, true)); 91 90 checkPanel.add(privacyLink, BorderLayout.PAGE_END); 92 91 93 //add(checkPanel, BorderLayout.PAGE_START);94 92 add(threeSixtyDegreeViewerPanel, BorderLayout.CENTER); 95 93 … … 134 132 )); 135 133 136 //imgIdValue.setEnabled(newImage instanceof StreetsideImage); 137 //final String newImageId = newImage instanceof StreetsideImage ? ((StreetsideImage) newImage).getId(): null; 138 final String newImageId = CubemapBuilder.getInstance().getCubemap() !=null ? CubemapBuilder.getInstance().getCubemap().getId() : newImage instanceof StreetsideImage ? ((StreetsideImage) newImage).getId(): null;; 134 final String newImageId = CubemapBuilder.getInstance().getCubemap() !=null ? CubemapBuilder.getInstance().getCubemap().getId() : newImage instanceof StreetsideImage ? ((StreetsideImage) newImage).getId(): null; 139 135 if (newImageId != null) { 140 136 final String bubbleId = CubemapUtils.convertQuaternary2Decimal(newImageId); … … 144 140 145 141 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 146 logger.debug( /*I18n.tr(*/"Privacy link set for Streetside image " + bubbleId + " quadKey " + newImageId/*)*/);142 logger.debug(MessageFormat.format("Privacy link set for Streetside image {0} quadKey {1}", bubbleId, newImageId)); 147 143 } 148 144 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/ThreeSixtyDegreeViewerPanel.java
r34393 r34399 195 195 }); 196 196 197 /*scene.widthProperty().addListener(new ChangeListener<Number>() {198 @Override public void changed(ObservableValue<? extends Number> observableValue, Number oldSceneWidth, Number newSceneWidth) {199 System.out.println("Width: " + newSceneWidth);200 }201 202 @Override203 public void changed(ObservableValue<? extends Number> observable, Number oldSceneWidth, Number newSceneWidth) {204 draw();205 }206 });*/207 /*scene.heightProperty().addListener(new ChangeListener<Number>() {208 @Override public void changed(ObservableValue<? extends Number> observableValue, Number oldSceneHeight, Number newSceneHeight) {209 //System.out.println("Height: " + newSceneHeight);210 draw();211 }212 });*/213 214 197 root.getChildren().addAll(cubemapBox, subGroup); 215 198 root.setAutoSizeChildren(true); … … 224 207 225 208 private static Scene createDefaultScene() { 226 // TODO: default scene with message? @rrh227 228 209 // Load Cubemap box AFTER camera is initialized 229 //final double size = 100000D;230 210 231 211 TextArea textArea = new TextArea(); … … 330 310 }); 331 311 332 /*scene.widthProperty().addListener(new ChangeListener<Number>() {333 @Override public void changed(ObservableValue<? extends Number> observableValue, Number oldSceneWidth, Number newSceneWidth) {334 System.out.println("Width: " + newSceneWidth);335 }336 337 @Override338 public void changed(ObservableValue<? extends Number> observable, Number oldSceneWidth, Number newSceneWidth) {339 draw();340 }341 });*/342 /*scene.heightProperty().addListener(new ChangeListener<Number>() {343 @Override public void changed(ObservableValue<? extends Number> observableValue, Number oldSceneHeight, Number newSceneHeight) {344 //System.out.println("Height: " + newSceneHeight);345 draw();346 }347 });*/348 349 312 root.getChildren().addAll(cubemapBox, subGroup); 350 313 root.setAutoSizeChildren(true); … … 355 318 Platform.setImplicitExit(false); 356 319 357 //return scene; 358 359 defaultScene = new Scene(vbox, 200, 100); 320 defaultScene = new Scene(vbox, 200, 100); 360 321 return defaultScene; 361 322 } … … 379 340 camera.setFieldOfView(42); 380 341 camera.setTranslateZ(-cameraDistance); 381 // cameraTransform.ry.setAngle(-45.0);382 // cameraTransform.rx.setAngle(-10.0);383 // add a Point Light for better viewing of the grid coordinate system384 342 final PointLight light = new PointLight(Color.WHITE); 385 343 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/BoundsDownloadRunnable.java
r34393 r34399 7 7 import java.net.URL; 8 8 import java.net.URLConnection; 9 import java.text.MessageFormat; 9 10 import java.util.function.Function; 10 11 … … 15 16 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties; 16 17 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideURL.APIv3; 17 import org.openstreetmap.josm.tools.I18n;18 18 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes; 19 import org.openstreetmap.josm.tools.Logging;20 19 21 20 public abstract class BoundsDownloadRunnable implements Runnable { … … 34 33 URL nextURL = getUrlGenerator().apply(bounds); 35 34 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 36 logger.debug( "nextURL: " + nextURL.toString());35 logger.debug(MessageFormat.format("nextURL: {0}", nextURL.toString())); 37 36 } 38 37 try { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/ImageDetailsDownloadRunnable.java
r34358 r34399 22 22 } 23 23 24 // TODO: image infos for 360 degree viewer? @rrh25 24 @Override 26 25 public void run(final URLConnection con) throws IOException { 27 // TODO: modifiy decoder to handle Streetside image info. @rrh26 // TODO: Enable ImageInfo support in decoder for Streetside 28 27 /*try (JsonReader reader = Json.createReader(new BufferedInputStream(con.getInputStream()))) { 29 28 JsonImageDetailsDecoder.decodeImageInfos(reader.readObject(), data); -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnable.java
r34393 r34399 48 48 StreetsideSequence seq = new StreetsideSequence(StreetsideSequenceIdGenerator.generateId()); 49 49 50 // TODO: how can LatLon and heading / camera angles (he attribute) be set for a sequence?51 // and does it make sense? @rrh52 53 50 List<StreetsideImage> bubbleImages = new ArrayList<>(); 54 51 … … 94 91 image.setPi(node.path("pi").asDouble()); 95 92 image.setPr(node.path("pr").asLong()); 96 // TODO: inner class @rrh97 // image.setRn(node.path("rn").asText());98 93 image.setRo(node.path("ro").asDouble()); 99 94 … … 106 101 // Initialize four-tiled cubemap faces (four images per cube side with 18-length 107 102 // Quadkey) 108 // if (StreetsideProperties.CUBEFACE_SIZE.get().intValue() == 4) {109 103 if (!StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get()) { 110 104 StreetsideImage tile = new StreetsideImage(String.valueOf(image.getId() + Integer.valueOf(i))); … … 113 107 // Initialize four-tiled cubemap faces (four images per cub eside with 20-length 114 108 // Quadkey) 115 // if (StreetsideProperties.CUBEFACE_SIZE.get().intValue() == 16) {116 109 if (StreetsideProperties.SHOW_HIGH_RES_STREETSIDE_IMAGERY.get()) { 117 110 for (int j = 0; j < 4; j++) { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/StreetsideDownloader.java
r34365 r34399 28 28 /** Possible download modes. */ 29 29 public enum DOWNLOAD_MODE { 30 // i18n: download mode for Streetside images31 30 VISIBLE_AREA("visibleArea", I18n.tr("everything in the visible area")), 32 // i18n: download mode for Streetside images 31 33 32 OSM_AREA("osmArea", I18n.tr("areas with downloaded OSM-data")), 34 // i18n: download mode for Streetside images 33 35 34 MANUAL_ONLY("manualOnly", I18n.tr("only when manually requested")); 36 35 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/io/download/StreetsideSquareDownloadRunnable.java
r34365 r34399 9 9 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideUtils; 10 10 import org.openstreetmap.josm.tools.I18n; 11 import org.openstreetmap.josm.tools.Logging;12 11 13 12 public class StreetsideSquareDownloadRunnable implements Runnable { … … 39 38 } 40 39 41 // TODO: Revamp image details for Streetside RRH42 // Asynchronously load the rest of the image details43 40 Thread imgDetailsThread = new Thread(new ImageDetailsDownloadRunnable(StreetsideLayer.getInstance().getData(), bounds)); 44 41 imgDetailsThread.start(); 45 42 46 // TODO: Do we support detections? RRH 47 /*Thread detectionsThread = new Thread(new DetectionsDownloadRunnable(StreetsideLayer.getInstance().getData(), bounds)); 48 detectionsThread.start();*/ 43 // Image detections are not currently supported for Streetside (Mapillary code removed) 49 44 50 45 try { 51 46 imgDetailsThread.join(); 52 //detectionsThread.join();53 47 } catch (InterruptedException e) { 54 48 logger.warn(I18n.tr("Streetside download interrupted (probably because of closing the layer).", e)); … … 60 54 StreetsideUtils.updateHelpText(); 61 55 StreetsideLayer.invalidateInstance(); 62 //StreetsideFilterDialog.getInstance().refresh();63 56 StreetsideMainDialog.getInstance().updateImage(); 64 57 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/CubemapBox.java
r34317 r34399 30 30 */ 31 31 @SuppressWarnings("restriction") 32 public class CubemapBox extends Group{ 33 34 public enum CubemapBoxImageType{ 35 MULTIPLE, SINGLE 36 } 37 38 private final Affine affine = new Affine(); 39 40 private final ImageView 41 front = new ImageView(), 42 right = new ImageView(), 43 back = new ImageView(), 44 left = new ImageView(), 45 up = new ImageView(), 46 down = new ImageView(); 47 48 { 49 front.setId(CubemapUtils.CubemapFaces.FRONT.getValue()); 50 right.setId(CubemapUtils.CubemapFaces.RIGHT.getValue()); 51 back.setId(CubemapUtils.CubemapFaces.BACK.getValue()); 52 left.setId(CubemapUtils.CubemapFaces.LEFT.getValue()); 53 up.setId(CubemapUtils.CubemapFaces.UP.getValue()); 54 down .setId(CubemapUtils.CubemapFaces.DOWN.getValue()); 55 56 } 57 private final ImageView[] views = new ImageView[]{ 58 front, 59 right, 60 back, 61 left, 62 up, 63 down 32 public class CubemapBox extends Group { 33 34 public enum CubemapBoxImageType { 35 MULTIPLE, SINGLE 36 } 37 38 private final Affine affine = new Affine(); 39 40 private final ImageView front = new ImageView(), right = new ImageView(), back = new ImageView(), 41 left = new ImageView(), up = new ImageView(), down = new ImageView(); 42 43 { 44 front.setId(CubemapUtils.CubemapFaces.FRONT.getValue()); 45 right.setId(CubemapUtils.CubemapFaces.RIGHT.getValue()); 46 back.setId(CubemapUtils.CubemapFaces.BACK.getValue()); 47 left.setId(CubemapUtils.CubemapFaces.LEFT.getValue()); 48 up.setId(CubemapUtils.CubemapFaces.UP.getValue()); 49 down.setId(CubemapUtils.CubemapFaces.DOWN.getValue()); 50 51 } 52 private final ImageView[] views = new ImageView[] { front, right, back, left, up, down }; 53 54 private Image frontImg, rightImg, backImg, leftImg, upImg, downImg, singleImg; 55 56 // private WritableImage convertedImage; 57 58 private final PerspectiveCamera camera; 59 private AnimationTimer timer; 60 private final CubemapBoxImageType imageType; 61 62 public CubemapBox(Image singleImg, double size, PerspectiveCamera camera) { 63 super(); 64 imageType = CubemapBoxImageType.SINGLE; 65 66 this.singleImg = singleImg; 67 this.size.set(size); 68 this.camera = camera; 69 70 getTransforms().add(affine); 71 72 loadImageViews(); 73 74 getChildren().addAll(views); 75 } 76 77 // private constructor to prevent instantiation 78 public CubemapBox(double size, PerspectiveCamera camera) { 79 super(); 80 imageType = CubemapBoxImageType.SINGLE; 81 82 this.size.set(size); 83 this.camera = camera; 84 85 getTransforms().add(affine); 86 87 loadImageViews(); 88 89 getChildren().addAll(views); 90 } 91 92 public CubemapBox( 93 Image frontImg, Image rightImg, Image backImg, Image leftImg, Image upImg, Image downImg, double size, 94 PerspectiveCamera camera 95 ) { 96 super(); 97 imageType = CubemapBoxImageType.MULTIPLE; 98 99 this.frontImg = frontImg; 100 this.rightImg = rightImg; 101 this.backImg = backImg; 102 this.leftImg = leftImg; 103 this.upImg = upImg; 104 this.downImg = downImg; 105 this.size.set(size); 106 this.camera = camera; 107 108 loadImageViews(); 109 110 getTransforms().add(affine); 111 112 getChildren().addAll(views); 113 114 startTimer(); 115 } 116 117 public void loadImageViews() { 118 119 for (ImageView iv : views) { 120 iv.setSmooth(true); 121 iv.setPreserveRatio(true); 122 } 123 124 validateImageType(); 125 } 126 127 private void layoutViews() { 128 129 for (ImageView v : views) { 130 v.setFitWidth(getSize()); 131 v.setFitHeight(getSize()); 132 } 133 134 back.setTranslateX(-0.5 * getSize()); 135 back.setTranslateY(-0.5 * getSize()); 136 back.setTranslateZ(-0.5 * getSize()); 137 138 front.setTranslateX(-0.5 * getSize()); 139 front.setTranslateY(-0.5 * getSize()); 140 front.setTranslateZ(0.5 * getSize()); 141 front.setRotationAxis(Rotate.Z_AXIS); 142 front.setRotate(-180); 143 front.getTransforms().add(new Rotate(180, front.getFitHeight() / 2, 0, 0, Rotate.X_AXIS)); 144 front.setTranslateY(front.getTranslateY() - getSize()); 145 146 up.setTranslateX(-0.5 * getSize()); 147 up.setTranslateY(-1 * getSize()); 148 up.setRotationAxis(Rotate.X_AXIS); 149 up.setRotate(-90); 150 151 down.setTranslateX(-0.5 * getSize()); 152 down.setTranslateY(0); 153 down.setRotationAxis(Rotate.X_AXIS); 154 down.setRotate(90); 155 156 left.setTranslateX(-1 * getSize()); 157 left.setTranslateY(-0.5 * getSize()); 158 left.setRotationAxis(Rotate.Y_AXIS); 159 left.setRotate(90); 160 161 right.setTranslateX(0); 162 right.setTranslateY(-0.5 * getSize()); 163 right.setRotationAxis(Rotate.Y_AXIS); 164 right.setRotate(-90); 165 166 } 167 168 /** 169 * for single image creates viewports and sets all views(image) to singleImg for multiple... sets images per view. 170 */ 171 private void validateImageType() { 172 switch (imageType) { 173 case SINGLE: 174 loadSingleImageViewports(); 175 break; 176 case MULTIPLE: 177 setMultipleImages(); 178 break; 179 } 180 } 181 182 private void loadSingleImageViewports() { 183 layoutViews(); 184 double width = singleImg.getWidth(), height = singleImg.getHeight(); 185 186 // simple check to see if cells will be square 187 if (width / 4 != height / 3) { 188 throw new UnsupportedOperationException("Image does not comply with size constraints"); 189 } 190 double cellSize = singleImg.getWidth() - singleImg.getHeight(); 191 192 recalculateSize(cellSize); 193 194 double topx = cellSize, topy = 0, 195 196 botx = cellSize, boty = cellSize * 2, 197 198 leftx = 0, lefty = cellSize, 199 200 rightx = cellSize * 2, righty = cellSize, 201 202 fwdx = cellSize, fwdy = cellSize, 203 204 backx = cellSize * 3, backy = cellSize; 205 206 // add top padding x+, y+, width-, height 207 up.setViewport(new Rectangle2D(topx, topy, cellSize, cellSize)); 208 209 // add left padding x, y+, width, height- 210 left.setViewport(new Rectangle2D(leftx, lefty, cellSize - 1, cellSize - 1)); 211 212 // add front padding x+, y+, width-, height 213 front.setViewport(new Rectangle2D(fwdx, fwdy, cellSize, cellSize)); 214 215 // add right padding x, y+, width, height- 216 right.setViewport(new Rectangle2D(rightx, righty, cellSize, cellSize)); 217 218 // add back padding x, y+, width, height- 219 back.setViewport(new Rectangle2D(backx + 1, backy - 1, cellSize - 1, cellSize - 1)); 220 221 // add bottom padding x+, y, width-, height- 222 down.setViewport(new Rectangle2D(botx, boty, cellSize, cellSize)); 223 224 for (ImageView v : views) { 225 v.setImage(singleImg); 226 } 227 } 228 229 private void recalculateSize(double cell) { 230 double factor = Math.floor(getSize() / cell); 231 setSize(cell * factor); 232 } 233 234 public synchronized void setImage(BufferedImage img, int position) { 235 views[position].setImage(GraphicsUtils.convertBufferedImage2JavaFXImage(img)); 236 237 } 238 239 private void setMultipleImages() { 240 GraphicsUtils.PlatformHelper.run(() -> { 241 layoutViews(); 242 front.setImage(frontImg); 243 right.setImage(rightImg); 244 back.setImage(backImg); 245 left.setImage(leftImg); 246 up.setImage(upImg); 247 down.setImage(downImg); 248 249 }); 250 } 251 252 public void startTimer() { 253 timer = new AnimationTimer() { 254 @Override 255 public void handle(long now) { 256 Transform ct = (camera != null) ? camera.getLocalToSceneTransform() : null; 257 if (ct != null) { 258 affine.setTx(ct.getTx()); 259 affine.setTy(ct.getTy()); 260 affine.setTz(ct.getTz()); 261 } 262 } 64 263 }; 65 66 private Image 67 frontImg, rightImg, backImg, leftImg, upImg, downImg, singleImg; 68 69 //private WritableImage convertedImage; 70 71 private final PerspectiveCamera camera; 72 private AnimationTimer timer; 73 private final CubemapBoxImageType imageType; 74 75 public CubemapBox(Image singleImg, double size, PerspectiveCamera camera) { 76 super(); 77 imageType = CubemapBoxImageType.SINGLE; 78 79 this.singleImg = singleImg; 80 this.size.set(size); 81 this.camera = camera; 82 83 getTransforms().add(affine); 84 85 loadImageViews(); 86 87 getChildren().addAll(views); 88 } 89 90 // private constructor to prevent instantiation 91 public CubemapBox(double size, PerspectiveCamera camera) { 92 super(); 93 imageType = CubemapBoxImageType.SINGLE; 94 95 this.size.set(size); 96 this.camera = camera; 97 98 getTransforms().add(affine); 99 100 loadImageViews(); 101 102 getChildren().addAll(views); 103 } 104 105 public CubemapBox(Image frontImg, Image rightImg, Image backImg, Image leftImg, Image upImg, Image downImg, double size, PerspectiveCamera camera) { 106 super(); 107 imageType = CubemapBoxImageType.MULTIPLE; 108 109 this.frontImg = frontImg; 110 this.rightImg = rightImg; 111 this.backImg = backImg; 112 this.leftImg = leftImg; 113 this.upImg = upImg; 114 this.downImg = downImg; 115 this.size.set(size); 116 this.camera = camera; 117 118 loadImageViews(); 119 120 getTransforms().add(affine); 121 122 getChildren().addAll(views); 123 124 startTimer(); 125 } 126 127 public void loadImageViews(){ 128 129 for(ImageView iv : views){ 130 iv.setSmooth(true); 131 iv.setPreserveRatio(true); 132 } 133 134 validateImageType(); 135 } 136 137 private void layoutViews() { 138 139 for(ImageView v : views){ 140 v.setFitWidth(getSize()); 141 v.setFitHeight(getSize()); 142 } 143 144 back.setTranslateX(-0.5 * getSize()); 145 back.setTranslateY(-0.5 * getSize()); 146 back.setTranslateZ(-0.5 * getSize()); 147 148 front.setTranslateX(-0.5 * getSize()); 149 front.setTranslateY(-0.5 * getSize()); 150 front.setTranslateZ(0.5 * getSize()); 151 front.setRotationAxis(Rotate.Z_AXIS); 152 front.setRotate(-180); 153 front.getTransforms().add(new Rotate(180,front.getFitHeight() / 2, 0,0, Rotate.X_AXIS)); 154 front.setTranslateY(front.getTranslateY() - getSize()); 155 156 up.setTranslateX(-0.5 * getSize()); 157 up.setTranslateY(-1 * getSize()); 158 up.setRotationAxis(Rotate.X_AXIS); 159 up.setRotate(-90); 160 161 down.setTranslateX(-0.5 * getSize()); 162 down.setTranslateY(0); 163 down.setRotationAxis(Rotate.X_AXIS); 164 down.setRotate(90); 165 166 left.setTranslateX(-1 * getSize()); 167 left.setTranslateY(-0.5 * getSize()); 168 left.setRotationAxis(Rotate.Y_AXIS); 169 left.setRotate(90); 170 171 right.setTranslateX(0); 172 right.setTranslateY(-0.5 * getSize()); 173 right.setRotationAxis(Rotate.Y_AXIS); 174 right.setRotate(-90); 175 176 } 177 /** 178 * for single image creates viewports and sets all views(image) to singleImg 179 * for multiple... sets images per view. 180 */ 181 private void validateImageType(){ 182 switch(imageType){ 183 case SINGLE: 184 loadSingleImageViewports(); 185 break; 186 case MULTIPLE: 187 // TODO: implement single and double properly @rrh 188 setMultipleImages(); 189 break; 190 } 191 } 192 // TODO: change layout - Streetside cubemaps are structured as follows: @rrh 193 /** 194 * 01-front, 02-right, 03-back, 10-left, 11-up, 12-down 195 * 196 * ____ ____ ____ ____ ____ ____ 197 * |fwd |rght|back|left|top |bot | 198 * |____|____|____|____|____|____| 199 * 200 */ 201 202 private void loadSingleImageViewports(){ 264 timer.start(); 265 } 266 267 /* 268 * Properties 269 */ 270 private final DoubleProperty size = new SimpleDoubleProperty() { 271 @Override 272 protected void invalidated() { 273 switch (imageType) { 274 case SINGLE: 203 275 layoutViews(); 204 double width = singleImg.getWidth(), 205 height = singleImg.getHeight(); 206 207 //simple check to see if cells will be square 208 if(width / 4 != height / 3){ 209 throw new UnsupportedOperationException("Image does not comply with size constraints"); 210 } 211 double cellSize = singleImg.getWidth() - singleImg.getHeight(); 212 213 recalculateSize(cellSize); 214 215 double 216 topx = cellSize, topy = 0, 217 218 botx = cellSize, boty = cellSize * 2, 219 220 leftx = 0, lefty = cellSize, 221 222 rightx = cellSize * 2, righty = cellSize, 223 224 fwdx = cellSize, fwdy = cellSize, 225 226 backx = cellSize * 3, backy = cellSize; 227 228 //add top padding x+, y+, width-, height 229 up.setViewport(new Rectangle2D(topx , topy , cellSize, cellSize )); 230 231 //add left padding x, y+, width, height- 232 left.setViewport(new Rectangle2D(leftx , lefty , cellSize - 1, cellSize - 1)); 233 234 //add front padding x+, y+, width-, height 235 front.setViewport(new Rectangle2D(fwdx , fwdy, cellSize , cellSize)); 236 237 //add right padding x, y+, width, height- 238 right.setViewport(new Rectangle2D(rightx, righty , cellSize , cellSize )); 239 240 //add back padding x, y+, width, height- 241 back.setViewport(new Rectangle2D(backx + 1, backy - 1, cellSize - 1, cellSize - 1)); 242 243 //add bottom padding x+, y, width-, height- 244 down.setViewport(new Rectangle2D(botx, boty, cellSize , cellSize)); 245 246 for(ImageView v : views){ 247 v.setImage(singleImg); 248 } 249 } 250 251 252 253 private void recalculateSize(double cell){ 254 double factor = Math.floor(getSize() / cell); 255 setSize(cell * factor); 256 } 257 258 public synchronized void setImage(BufferedImage img, int position) { 259 views[position].setImage(GraphicsUtils.convertBufferedImage2JavaFXImage(img)); 260 261 } 262 263 264 private void setMultipleImages() { 265 GraphicsUtils.PlatformHelper.run(() -> { 266 layoutViews(); 267 front.setImage(frontImg); 268 right.setImage(rightImg); 269 back.setImage(backImg); 270 left.setImage(leftImg); 271 up.setImage(upImg); 272 down.setImage(downImg); 273 274 }); 275 } 276 277 public void startTimer(){ 278 timer = new AnimationTimer() { 279 @Override 280 public void handle(long now) { 281 Transform ct = (camera != null) ? camera.getLocalToSceneTransform() : null; 282 if(ct != null){ 283 affine.setTx(ct.getTx()); 284 affine.setTy(ct.getTy()); 285 affine.setTz(ct.getTz()); 286 } 287 } 288 }; 289 timer.start(); 290 } 291 292 /* 293 Properties 294 */ 295 private final DoubleProperty size = new SimpleDoubleProperty(){ 296 @Override 297 protected void invalidated() { 298 switch(imageType){ 299 case SINGLE: 300 layoutViews(); 301 break; 302 case MULTIPLE: 303 break; 304 } 305 306 } 307 }; 308 309 public final double getSize() { 310 return size.get(); 311 } 312 313 public final void setSize(double value) { 314 size.set(value); 315 } 316 317 public DoubleProperty sizeProperty() { 318 return size; 319 } 320 321 public ImageView[] getViews() { 322 return views; 323 } 276 break; 277 case MULTIPLE: 278 break; 279 } 280 281 } 282 }; 283 284 public final double getSize() { 285 return size.get(); 286 } 287 288 public final void setSize(double value) { 289 size.set(value); 290 } 291 292 public DoubleProperty sizeProperty() { 293 return size; 294 } 295 296 public ImageView[] getViews() { 297 return views; 298 } 324 299 } -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideURL.java
r34393 r34399 7 7 import java.net.URLEncoder; 8 8 import java.nio.charset.StandardCharsets; 9 import java.text.MessageFormat; 9 10 import java.util.ArrayList; 10 11 import java.util.Arrays; … … 45 46 } 46 47 47 /*public static URL getUser(String key) {48 return StreetsideURL.string2URL(APIv3.BASE_URL, "users/", key, StreetsideURL.queryString(null));49 }50 51 *//**52 * @return the URL where you can create, get and approve changesets53 *//*54 public static URL submitChangeset() {55 return StreetsideURL.string2URL(APIv3.BASE_URL, "changesets", APIv3.queryString(null));56 }57 58 public static URL searchDetections(Bounds bounds) {59 return StreetsideURL.string2URL(APIv3.BASE_URL, "detections", APIv3.queryString(bounds));60 }61 62 public static URL searchImages(Bounds bounds) {63 return StreetsideURL.string2URL(APIv3.BASE_URL, "images", APIv3.queryStreetsideString(bounds));64 }*/65 66 48 public static URL searchStreetsideImages(Bounds bounds) { 67 49 return StreetsideURL.string2URL(StreetsideURL.STREETSIDE_BASE_URL, APIv3.queryStreetsideString(bounds)); 68 50 } 69 70 /*public static URL searchMapObjects(final Bounds bounds) {71 return StreetsideURL.string2URL(APIv3.BASE_URL, "objects", APIv3.queryString(bounds));72 }*/73 51 74 52 public static URL searchStreetsideSequences(final Bounds bounds) { … … 147 125 StringBuilder modifiedId = new StringBuilder(); 148 126 149 // TODO: make code more elegant150 127 if (thumbnail) { 151 128 // pad thumbnail imagery with leading zeros … … 175 152 URL url = StreetsideURL.string2URL(VirtualEarth.BASE_URL_PREFIX + modifiedId.toString() + VirtualEarth.BASE_URL_SUFFIX); 176 153 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 177 logger.debug( "Tile task URL " + url.toString() + " invoked.");154 logger.debug(MessageFormat.format("Tile task URL {0} invoked.", url.toString())); 178 155 } 179 156 return url; … … 182 159 183 160 public static final class MainWebsite { 184 //private static final String BASE_URL = "https://www.mapillary.com/";185 161 186 162 private MainWebsite() { … … 221 197 } 222 198 223 /**224 * Gives you the URL which the user should visit to initiate the OAuth authentication process225 * @param redirectURI the URI to which the user will be redirected when the authentication is finished.226 * When this is <code>null</code>, it's omitted from the query string.227 * @return the URL that the user should visit to start the OAuth authentication228 */229 /*public static URL connect(String redirectURI) {230 final HashMap<String, String> parts = new HashMap<>();231 if (redirectURI != null && redirectURI.length() >= 1) {232 parts.put("redirect_uri", redirectURI);233 }234 parts.put("response_type", "token");235 parts.put("scope", "user:read public:upload public:write");236 return StreetsideURL.string2URL(MainWebsite.BASE_URL, "connect", StreetsideURL.queryString(parts));237 }238 239 public static URL mapObjectIcon(String key) {240 return StreetsideURL.string2URL(MainWebsite.BASE_URL, "developer/api-documentation/images/traffic_sign/" + key + ".png");241 }*/242 199 } 243 200 … … 270 227 } 271 228 }); 229 break; 272 230 273 231 case 4: … … 292 250 return res.stream().toArray(URL[]::new); 293 251 } 294 295 /**296 * @return the URL where you'll find the upload secrets as JSON297 */298 /*public static URL uploadSecretsURL() {299 return StreetsideURL.string2URL(StreetsideURL.BASE_API_V2_URL, "me/uploads/secrets", StreetsideURL.queryString(null));300 }*/301 252 302 253 /** … … 321 272 322 273 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 323 logger.debug( "queryString result: " + ret.toString());274 logger.debug(MessageFormat.format("queryString result: {0}", ret.toString())); 324 275 } 325 276 … … 348 299 349 300 if(StreetsideProperties.DEBUGING_ENABLED.get()) { 350 logger.debug( "queryStreetsideBoundsString result: " + ret.toString());301 logger.debug(MessageFormat.format("queryStreetsideBoundsString result: {0}", ret.toString())); 351 302 } 352 303 -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/api/JsonDecoder.java
r34365 r34399 17 17 import org.openstreetmap.josm.data.coor.LatLon; 18 18 import org.openstreetmap.josm.tools.I18n; 19 import org.openstreetmap.josm.tools.Logging;20 19 21 20 public final class JsonDecoder { -
applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/api/JsonImageDetectionDecoder.java
r34365 r34399 26 26 } 27 27 28 // TODO: Image detections? Keep? @rrh29 28 public static ImageDetection decodeImageDetection(final JsonObject json) { 30 29 if (json == null || !"Feature".equals(json.getString("type", null))) { -
applications/editors/josm/plugins/MicrosoftStreetside/test/README
r34386 r34399 1 1 2 This directory includes the test resources for the streetside plugin.2 This directory includes the test resources for the Microsoft Streetside plugin. 3 3 4 4
Note:
See TracChangeset
for help on using the changeset viewer.