Index: /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/HouseNumberInputDialog.java
===================================================================
--- /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/HouseNumberInputDialog.java	(revision 36483)
+++ /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/HouseNumberInputDialog.java	(revision 36484)
@@ -95,5 +95,5 @@
         super(MainApplication.getMainFrame(),
                 tr("Terrace a house"),
-                new String[] {tr("OK"), tr("Cancel")},
+                new String[] {tr("Long side"), tr("Short side"), tr("Cancel")},
                 true
         );
@@ -107,5 +107,5 @@
         JPanel content = getInputPanel();
         setContent(content);
-        setButtonIcons("ok", "cancel");
+        setButtonIcons("ok", "ok", "cancel");
         getJContentPane();
         initialize();
Index: /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/HouseNumberInputHandler.java
===================================================================
--- /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/HouseNumberInputHandler.java	(revision 36483)
+++ /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/HouseNumberInputHandler.java	(revision 36484)
@@ -129,7 +129,10 @@
                         message);
 
-        JButton okButton = getButton(dialog, "OK");
-        if (okButton != null)
-            okButton.setEnabled(isOk);
+        JButton longSideButton = getButton(dialog, tr("Long side"));
+        if (longSideButton != null)
+            longSideButton.setEnabled(isOk);
+        JButton shortSideButton = getButton(dialog, tr("Short side"));
+        if (shortSideButton != null)
+            shortSideButton.setEnabled(isOk);
         if (isOk) {
 
@@ -272,5 +275,5 @@
         if (e.getSource() instanceof JButton) {
             JButton button = (JButton) e.getSource();
-            if (tr("OK").equals(button.getActionCommand()) && button.isEnabled()) {
+            if (tr("Long side").equals(button.getActionCommand()) && button.isEnabled()) {
                 if (validateInput()) {
                     saveValues();
@@ -288,5 +291,27 @@
                         streetName(),
                         doHandleRelation(),
-                        doKeepOutline(), buildingType());
+                        doKeepOutline(), buildingType(),
+                        false);
+
+                    this.dialog.setVisible(false);
+                }
+            } else if (tr("Short side").equals(button.getActionCommand()) && button.isEnabled()) {
+                if (validateInput()) {
+                    saveValues();
+
+                    terracerAction.terraceBuilding(
+                        outline,
+                        init,
+                        street,
+                        associatedStreet,
+                        segments(),
+                        dialog.lo.getText(),
+                        dialog.hi.getText(),
+                        stepSize(),
+                        housenumbers,
+                        streetName(),
+                        doHandleRelation(),
+                        doKeepOutline(), buildingType(),
+                        true);
 
                     this.dialog.setVisible(false);
Index: /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java
===================================================================
--- /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java	(revision 36483)
+++ /applications/editors/josm/plugins/terracer/src/org/openstreetmap/josm/plugins/terracer/TerracerAction.java	(revision 36484)
@@ -216,5 +216,5 @@
             // Don't open the dialog
             terraceBuilding(outline, init, street, associatedStreet, 0, null, null, 0,
-                    housenumbers, streetname, associatedStreet != null, false, "yes");
+                    housenumbers, streetname, associatedStreet != null, false, "yes", false);
         } else {
             String title = trn("Change {0} object", "Change {0} objects", sel.size(), sel.size());
@@ -301,8 +301,9 @@
      * @param keepOutline If the outline way should be kept
      * @param buildingValue The value for {@code building} key to add
+     * @param invertSide If true, splits on the short side instead of the long side
      */
     public void terraceBuilding(final Way outline, Node init, Way street, Relation associatedStreet, Integer segments,
                 String start, String end, int step, List<Node> housenumbers, String streetName, boolean handleRelations,
-                boolean keepOutline, String buildingValue) {
+                boolean keepOutline, String buildingValue, boolean invertSide) {
         final int nb;
         Integer to;
@@ -327,5 +328,5 @@
 
         // now find which is the longest side connecting the first node
-        Pair<Way, Way> interp = findFrontAndBack(outline);
+        Pair<Way, Way> interp = findFrontAndBack(outline, invertSide);
 
         final boolean swap = init != null && (init.equals(interp.a.lastNode()) || init.equals(interp.b.lastNode()));
@@ -597,7 +598,9 @@
      *
      * @param w The way to analyse.
+     * @param invertSide If true, forces the use of the alternative (adjacent) pair
+     *                   of sides, effectively rotating the split axis.
      * @return A pair of ways (front, back) pointing in the same directions.
      */
-    private static Pair<Way, Way> findFrontAndBack(Way w) {
+    private static Pair<Way, Way> findFrontAndBack(Way w, boolean invertSide) {
         // calculate the "side-ness" score for each segment of the way
         double[] sideness = calculateSideness(w);
@@ -624,4 +627,11 @@
         if (sideLength(w, side1) > sideLength(w, side1 + 1)
                 && Math.abs(sideness[side1] - sideness[(side1 + 1) % (w.getNodesCount() - 1)]) < 0.001) {
+            side1 = (side1 + 1) % (w.getNodesCount() - 1);
+            side2 = (side2 + 1) % (w.getNodesCount() - 1);
+        }
+
+        // if inverted, shift the selection to the adjacent segments to use the
+        // alternative pair of sides (e.g. top/bottom instead of left/right).
+        if (invertSide) {
             side1 = (side1 + 1) % (w.getNodesCount() - 1);
             side2 = (side2 + 1) % (w.getNodesCount() - 1);
@@ -791,9 +801,9 @@
          * The value to sort
          */
-        public final double x;
+        private final double x;
         /**
          * The index in the original array
          */
-        public final int i;
+        private final int i;
 
         SortWithIndex(double a, int b) {
Index: /applications/editors/josm/plugins/terracer/test/unit/org/openstreetmap/josm/plugins/terracer/ReverseTerraceActionTest.java
===================================================================
--- /applications/editors/josm/plugins/terracer/test/unit/org/openstreetmap/josm/plugins/terracer/ReverseTerraceActionTest.java	(revision 36483)
+++ /applications/editors/josm/plugins/terracer/test/unit/org/openstreetmap/josm/plugins/terracer/ReverseTerraceActionTest.java	(revision 36484)
@@ -52,5 +52,5 @@
         dataSet.setSelected(way2);
         new TerracerAction().terraceBuilding(way2, null, null, null, 5,
-                "80", "88", 2, Collections.emptyList(), null, false, false, "apartments");
+                "80", "88", 2, Collections.emptyList(), null, false, false, "apartments", false);
         final List<Way> addressedWays = dataSet.getWays().stream().filter(w -> w != way1)
                 .sorted(Comparator.comparingLong(w -> -w.getUniqueId())).collect(Collectors.toList());
