[Git][debian-gis-team/jmapviewer][master] 7 commits: Update branch in gbp.conf & Vcs-Git URL.

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Sun Aug 10 06:34:36 BST 2025



Bas Couwenberg pushed to branch master at Debian GIS Project / jmapviewer


Commits:
083cb337 by Bas Couwenberg at 2025-04-26T05:43:26+02:00
Update branch in gbp.conf & Vcs-Git URL.

- - - - -
241a8306 by Bas Couwenberg at 2025-04-26T05:43:45+02:00
New upstream version 2.25+dfsg
- - - - -
78fc58e8 by Bas Couwenberg at 2025-04-26T05:43:46+02:00
Update upstream source from tag 'upstream/2.25+dfsg'

Update to upstream version '2.25+dfsg'
with Debian dir 26d64323deaa5384284f896f82918e1c35c1c377
- - - - -
3dc1d8b8 by Bas Couwenberg at 2025-04-26T05:44:21+02:00
New upstream release.

- - - - -
4bc0d1cc by Bas Couwenberg at 2025-04-26T05:57:40+02:00
Set distribution to experimental.

- - - - -
3a54b221 by Bas Couwenberg at 2025-08-10T07:31:31+02:00
Revert "Update branch in gbp.conf & Vcs-Git URL."

This reverts commit 083cb337f75f8c2f78ac9f3dd2628fd974b0f42e.

- - - - -
897dd0bd by Bas Couwenberg at 2025-08-10T07:31:42+02:00
Move from experimental to unstable.

- - - - -


3 changed files:

- build.xml
- debian/changelog
- src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java


Changes:

=====================================
build.xml
=====================================
@@ -182,7 +182,7 @@
         <!-- This stanza is necessary since the maven resolver doesn't read repo settings from the pom.xml file -->
         <!-- resolver.repositories makes it global -->
         <mvn:remoterepos id="resolver.repositories">
-            <mvn:remoterepo id="JOSM-central" url="https://josm.openstreetmap.de/nexus/content/repositories/central/" />
+            <mvn:remoterepo id="JOSM-central" url="https://josm.openstreetmap.de/repository/public/" />
         </mvn:remoterepos>
         <mvn:resolve>
             <mvn:path refid="testlib.classpath" classpath="test"/>


=====================================
debian/changelog
=====================================
@@ -1,9 +1,16 @@
-jmapviewer (2.24+dfsg-2) UNRELEASED; urgency=medium
+jmapviewer (2.25+dfsg-1) unstable; urgency=medium
 
+  * Move from experimental to unstable.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sun, 10 Aug 2025 07:31:35 +0200
+
+jmapviewer (2.25+dfsg-1~exp1) experimental; urgency=medium
+
+  * New upstream release.
   * Bump Standards-Version to 4.7.2, no changes.
   * Fix old FSF address in copyright file.
 
- -- Bas Couwenberg <sebastic at debian.org>  Thu, 20 Mar 2025 06:07:46 +0100
+ -- Bas Couwenberg <sebastic at debian.org>  Sat, 26 Apr 2025 05:57:22 +0200
 
 jmapviewer (2.24+dfsg-1) unstable; urgency=medium
 


=====================================
src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
=====================================
@@ -29,6 +29,7 @@ import org.openstreetmap.gui.jmapviewer.interfaces.TemplatedTileSource;
  * <li>{y} - substituted with Y tile number</li>
  * <li>{!y} - substituted with Yahoo Y tile number</li>
  * <li>{-y} - substituted with reversed Y tile number</li>
+ * <li>{quad} - Microsoft style quadkey</li>
  * <li>{apikey} - substituted with API key retrieved for the imagery id</li>
  * <li>{switch:VAL_A,VAL_B,VAL_C,...} - substituted with one of VAL_A, VAL_B, VAL_C. Usually
  *                                  used to specify many tile servers</li>
@@ -44,15 +45,17 @@ public class TemplatedTMSTileSource extends TMSTileSource implements TemplatedTi
     private static final Pattern PATTERN_Y       = Pattern.compile("\\{y}");
     private static final Pattern PATTERN_Y_YAHOO = Pattern.compile("\\{!y}");
     private static final Pattern PATTERN_NEG_Y   = Pattern.compile("\\{-y}");
+    private static final Pattern PATTERN_QUAD    = Pattern.compile("\\{quad}");
     private static final Pattern PATTERN_SWITCH  = Pattern.compile("\\{switch:([^}]+)}");
     private static final Pattern PATTERN_HEADER  = Pattern.compile("\\{header\\(([^,]+),([^}]+)\\)}");
     private static final Pattern PATTERN_API_KEY = Pattern.compile("\\{apikey}");
-    private static final Pattern PATTERN_PARAM  = Pattern.compile("\\{((?:\\d+-)?z(?:oom)?(:?[+-]\\d+)?|x|y|!y|-y|switch:([^}]+))}");
+    private static final Pattern PATTERN_PARAM  = Pattern.compile("\\{((?:\\d+-)?z(?:oom)?(:?[+-]\\d+)?|x|y|!y|-y|quad|switch:([^}]+))}");
 
     // CHECKSTYLE.ON: SingleSpaceSeparator
 
     private static final Pattern[] ALL_PATTERNS = {
-            PATTERN_HEADER, PATTERN_ZOOM, PATTERN_X, PATTERN_Y, PATTERN_Y_YAHOO, PATTERN_NEG_Y, PATTERN_SWITCH, PATTERN_API_KEY
+            PATTERN_HEADER, PATTERN_ZOOM, PATTERN_X, PATTERN_Y, PATTERN_Y_YAHOO, PATTERN_NEG_Y, PATTERN_SWITCH, PATTERN_API_KEY,
+            PATTERN_QUAD
     };
 
     private Random rand;
@@ -155,6 +158,9 @@ public class TemplatedTMSTileSource extends TMSTileSource implements TemplatedTi
             case "switch:":
                 replacement = getRandomPart(randomParts);
                 break;
+            case "quad": // PATTERN_QUAD
+                replacement = xyzToQuadKey(tilex, tiley, zoom);
+                break;
             default:
                 // handle switch/zoom here, as group will contain parameters and switch will not work
                 if (PATTERN_ZOOM.matcher("{" + matcher.group(1) + "}").matches()) {
@@ -171,6 +177,29 @@ public class TemplatedTMSTileSource extends TMSTileSource implements TemplatedTi
         return url.toString().replace(" ", "%20");
     }
 
+    /**
+     * Convert an x y z coordinate to a quadkey
+     * @param x The x coordinate
+     * @param y The y coordinate
+     * @param z The z coordinate
+     * @return The quadkey
+     */
+    private static String xyzToQuadKey(int x, int y, int z) {
+        final char[] string = new char[z];
+        for (int i = z; i > 0; i--) {
+            char digit = '0';
+            final int mask = 1 << (i - 1);
+            if ((x & mask) != 0) {
+                digit++;
+            }
+            if ((y & mask) != 0) {
+                digit += 2;
+            }
+            string[z - i] = digit;
+        }
+        return String.valueOf(string);
+    }
+
     protected String getRandomPart(final String[] parts) {
         return parts[rand.nextInt(parts.length)];
     }



View it on GitLab: https://salsa.debian.org/debian-gis-team/jmapviewer/-/compare/6018074c63220f1b014076a35637588b733c53a9...897dd0bddd13bdfd9b47cd5f9debde32a60b555a

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/jmapviewer/-/compare/6018074c63220f1b014076a35637588b733c53a9...897dd0bddd13bdfd9b47cd5f9debde32a60b555a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20250810/f107fff1/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list