Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 9539)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Condition.java	(revision 9540)
@@ -612,4 +612,26 @@
 
         /**
+         * {@code clockwise} whether the way is closed and oriented clockwise,
+         * or non-closed and the 1st, 2nd and last node are in clockwise order.
+         * @param e MapCSS environment
+         * @return {@code true} if the way clockwise
+         * @see ExpressionFactory.Functions#is_clockwise(Environment)
+         */
+        static boolean clockwise(Environment e) {
+            return ExpressionFactory.Functions.is_clockwise(e);
+        }
+
+        /**
+         * {@code anticlockwise} whether the way is closed and oriented anticlockwise,
+         * or non-closed and the 1st, 2nd and last node are in anticlockwise order.
+         * @param e MapCSS environment
+         * @return {@code true} if the way clockwise
+         * @see ExpressionFactory.Functions#is_anticlockwise(Environment)
+         */
+        static boolean anticlockwise(Environment e) {
+            return ExpressionFactory.Functions.is_anticlockwise(e);
+        }
+
+        /**
          * {@code unclosed-multipolygon} tests whether the object is an unclosed multipolygon.
          * @param e MapCSS environment
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 9539)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 9540)
@@ -869,4 +869,36 @@
 
         /**
+         * Determines whether the way is {@link Geometry#isClockwise closed and oriented clockwise},
+         * or non-closed and the {@link Geometry#angleIsClockwise 1st, 2nd and last node are in clockwise order}.
+         *
+         * @param env the environment
+         * @return true if the way is closed and oriented clockwise
+         */
+        public static boolean is_clockwise(Environment env) {
+            if (!(env.osm instanceof Way)) {
+                return false;
+            }
+            final Way way = (Way) env.osm;
+            return way.isClosed() && Geometry.isClockwise(way)
+                    || !way.isClosed() && way.getNodesCount() > 2 && Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode());
+        }
+
+        /**
+         * Determines whether the way is {@link Geometry#isClockwise closed and oriented anticlockwise},
+         * or non-closed and the {@link Geometry#angleIsClockwise 1st, 2nd and last node are in anticlockwise order}.
+         *
+         * @param env the environment
+         * @return true if the way is closed and oriented clockwise
+         */
+        public static boolean is_anticlockwise(Environment env) {
+            if (!(env.osm instanceof Way)) {
+                return false;
+            }
+            final Way way = (Way) env.osm;
+            return way.isClosed() && !Geometry.isClockwise(way)
+                    || !way.isClosed() && way.getNodesCount() > 2 && !Geometry.angleIsClockwise(way.getNode(0), way.getNode(1), way.lastNode());
+        }
+
+        /**
          * Prints the object to the command line (for debugging purpose).
          * @param o the object
