Class Export

java.lang.Object
org.djutils.draw.Export

public final class Export extends Object
Export methods for djutils-draw objects.

Copyright (c) 2023-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Method Details

    • toPlot

      public static String toPlot(LineSegment2d lineSegment)
      Convert a LineSegment2d to Peter's plot format.
      Parameters:
      lineSegment - the line segment to convert
      Returns:
      the line segment in Peter's plot format
      Throws:
      NullPointerException - when lineSegment is null
    • toPlot

      public static String toPlot(PolyLine2d polyLine)
      Convert a PolyLine2d to Peter's plot format.
      Parameters:
      polyLine - the polyline to convert
      Returns:
      the polyline in Peter's plot format
      Throws:
      NullPointerException - when polyLine is null
    • toPlot

      public static String toPlot(Polygon2d polygon)
      Convert a Polygon2d into Peter's plot format.
      Parameters:
      polygon - the polygon to convert
      Returns:
      the polygon in Peter's plot format
      Throws:
      NullPointerException - when polygon is null
    • toTsv

      public static String toTsv(LineSegment2d lineSegment)
      Convert a LineSegment2d into something that a TSV parser can handle.
      Parameters:
      lineSegment - the line segment to convert
      Returns:
      the line segment in TSV format
      Throws:
      NullPointerException - when lineSegment is null
    • toTsv

      public static String toTsv(PolyLine2d polyLine)
      Convert a PolyLine2d into something that a TSV parser can handle.
      Parameters:
      polyLine - the polyline to convert
      Returns:
      the polyline in TSV format
      Throws:
      NullPointerException - when polyLine is null
    • toTsv

      public static String toTsv(Polygon2d polygon)
      Convert a Polygon2d into something that a TSV parser can handle.
      Parameters:
      polygon - the polygon to convert
      Returns:
      the polygon in TSV format
      Throws:
      NullPointerException - when polygon is null
    • toTsv

      public static String toTsv(LineSegment3d lineSegment)
      Convert a LineSegment3d into something that a TSV parser can handle.
      Parameters:
      lineSegment - the line segment to convert
      Returns:
      the line segment in TSV format
      Throws:
      NullPointerException - when lineSegment is null
    • toTsv

      public static String toTsv(PolyLine3d polyline)
      Convert a PolyLine3d into something that a TSV parser can handle.
      Parameters:
      polyline - the polyline to convert
      Returns:
      the polyline in TSV format
      Throws:
      NullPointerException - when polyline is null
    • toTsv

      public static String toTsv(Polygon3d polygon)
      Convert a Polygon3d into something that a TSV parser can handle.
      Parameters:
      polygon - the polygon to convert
      Returns:
      the polygon in TSV format
      Throws:
      NullPointerException - when polygon is null