@Override
    protected Geometry computeLine() throws GeometryException {
      try {
        CoordinateSequence coords = nodeLocations.getWayGeometry(nodeIds);
        return GeoUtils.JTS_FACTORY.createLineString(coords);
      } catch (IllegalArgumentException e) {
        throw new GeometryException("osm_invalid_line", "Error building line for way " + id() + ": " + e);
      }
    }
A {@link LineString} or {@link Polygon} created from an OSM way.
<p>
Unclosed rings are always interpreted as linestrings. Closed rings can be interpreted as either a polygon or a
linestring unless {@code area=yes} tag prevents them from being a linestring or {@code area=no} tag prevents them
from being a polygon.
planetiler-core/src/main/java/com/onthegomap/planetiler/reader/osm/OsmReader.java