Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java	(revision 24653)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/LoadPdfDialog.java	(revision 24654)
@@ -137,4 +137,5 @@
 	private JCheckBox splitOnShapeClosedCheck;
 	private JCheckBox splitOnSingleSegmentCheck;
+	private JCheckBox splitOnOrthogonalCheck;
 
 
@@ -254,4 +255,5 @@
 		this.splitOnShapeClosedCheck = new JCheckBox(tr("Shape closed"));
 		this.splitOnSingleSegmentCheck = new JCheckBox(tr("Single segments"));
+		this.splitOnOrthogonalCheck = new JCheckBox(tr("Orthogonal shapes"));
 
 		JPanel configPanel = new JPanel(new GridBagLayout());
@@ -308,4 +310,6 @@
 		c.gridx = 1; c.gridy = 8; c.gridwidth = 1;
 		configPanel.add(this.splitOnColorChangeCheck, c);
+		c.gridx = 2; c.gridy = 8; c.gridwidth = 1;
+		configPanel.add(this.splitOnOrthogonalCheck, c);
 
 
@@ -767,5 +771,5 @@
 		monitor.setTicks(95);
 		monitor.setCustomText(tr("Finalizing layers"));
-		data.splitLayersByPathKind(this.splitOnShapeClosedCheck.isSelected(), this.splitOnSingleSegmentCheck.isSelected());
+		data.splitLayersByPathKind(this.splitOnShapeClosedCheck.isSelected(), this.splitOnSingleSegmentCheck.isSelected(), this.splitOnOrthogonalCheck.isSelected());
 		data.finish();
 
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/OrthogonalShapesFilter.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/OrthogonalShapesFilter.java	(revision 24654)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/OrthogonalShapesFilter.java	(revision 24654)
@@ -0,0 +1,45 @@
+package pdfimport;
+
+import java.awt.geom.Point2D;
+
+public class OrthogonalShapesFilter {
+	private double tolerance;
+
+	public OrthogonalShapesFilter(double toleranceDegrees) {
+		tolerance = Math.toRadians(toleranceDegrees);
+	}
+	
+	public boolean isOrthogonal(PdfPath path) {
+		
+		if (path.points.size() < 3)
+			return false;
+		
+		int targetPos = path.isClosed() ? path.points.size(): path.points.size() - 1;
+		
+		for(int pos = 1; pos < targetPos; pos++) {
+			Point2D p1 = path.points.get(pos -1);
+			Point2D p2 = path.points.get(pos);
+			Point2D p3 = pos+1 == path.points.size() ? path.points.get(1) : path.points.get(pos+1);
+			
+			double angle1 = Math.atan2(p2.getY() - p1.getY(),p2.getX() - p1.getX());
+			double angle2 = Math.atan2(p3.getY() - p2.getY(),p3.getX() - p2.getX());
+			
+			double angleDifference = angle1 - angle2;
+			while (angleDifference < 0) angleDifference += Math.PI;
+
+			//test straight angles
+			boolean hasGoodVariant = false;
+			
+			for (int quadrant = 0; quadrant <= 4; quadrant ++) { 
+				double difference = angleDifference - Math.PI / 2 * quadrant;
+				if (Math.abs(difference) <= tolerance)
+					hasGoodVariant = true;
+			}
+			
+			if (!hasGoodVariant)
+				return false;
+		}
+		
+		return true;
+	}
+}
Index: applications/editors/josm/plugins/pdfimport/src/pdfimport/PathOptimizer.java
===================================================================
--- applications/editors/josm/plugins/pdfimport/src/pdfimport/PathOptimizer.java	(revision 24653)
+++ applications/editors/josm/plugins/pdfimport/src/pdfimport/PathOptimizer.java	(revision 24654)
@@ -164,8 +164,8 @@
 	}
 
-	public void splitLayersByPathKind(boolean closed, boolean single) {
+	public void splitLayersByPathKind(boolean closed, boolean single, boolean orthogonal) {
 		List<LayerContents> newLayers = new ArrayList<LayerContents>();
 		for(LayerContents l: this.layers) {
-			List<LayerContents> splitResult = splitBySegmentKind(l, closed, single);
+			List<LayerContents> splitResult = splitBySegmentKind(l, closed, single, orthogonal);
 
 			for(LayerContents ll: splitResult) {
@@ -583,23 +583,44 @@
 	}
 
-	private List<LayerContents> splitBySegmentKind(LayerContents layer, boolean closed, boolean single)
+	private List<LayerContents> splitBySegmentKind(LayerContents layer, boolean closed, boolean single, boolean orthogonal)
 	{
 		if (!closed && !single) {
-			return Collections.singletonList(layer);
-		}
+			return Collections.singletonList(layer);			
+		}
+		
+		OrthogonalShapesFilter of = new OrthogonalShapesFilter(10);
 
 		List<PdfPath> singleSegmentPaths = new ArrayList<PdfPath>();
 		List<PdfPath> multiSegmentPaths = new ArrayList<PdfPath>();
 		List<PdfPath> closedPaths = new ArrayList<PdfPath>();
+		List<PdfPath> orthogonalPaths = new ArrayList<PdfPath>();
+		List<PdfPath> orthogonalClosedPaths = new ArrayList<PdfPath>();
 
 		for(PdfPath path: layer.paths) {
-			if (path.points.size() <= 3 && single) {
+			boolean pathOrthgonal = orthogonal && of.isOrthogonal(path);
+			boolean pathUnclosed = !path.isClosed() && closed;
+			boolean pathSingleSegment = path.points.size() <= 3 && single;
+			
+			if (pathSingleSegment) {
 				singleSegmentPaths.add(path);
 			}
-			else if (!path.isClosed() && closed) {
-				multiSegmentPaths.add(path);
+			else if (pathUnclosed) {
+				
+				if (pathOrthgonal) {
+					orthogonalPaths.add(path);
+				}
+				else {
+					multiSegmentPaths.add(path);
+				}
 			}
 			else {
-				closedPaths.add(path);
+				if (pathOrthgonal) {
+					orthogonalClosedPaths.add(path);	
+				}
+				else
+				{
+					closedPaths.add(path);
+				}
+				
 			}
 		}
@@ -618,4 +639,19 @@
 			LayerContents l = new LayerContents();
 			l.paths = singleSegmentPaths;
+			l.info = layer.info.copy();
+			layers.add(l);
+		}
+		
+
+		if (orthogonalPaths.size() > 0) {
+			LayerContents l = new LayerContents();
+			l.paths = orthogonalPaths;
+			l.info = layer.info.copy();
+			layers.add(l);
+		}
+		
+		if (orthogonalClosedPaths.size() > 0) {
+			LayerContents l = new LayerContents();
+			l.paths = orthogonalClosedPaths;
 			l.info = layer.info.copy();
 			layers.add(l);
