private static boolean isSegmentInvalid(boolean allowEdges, int x1, int y1, int x2, int y2, int extent) {
      boolean crossesTile = segmentCrossesTile(getSide(x1, y1, 0, extent), getSide(x2, y2, 0, extent));
      if (allowEdges) {
        return crossesTile && slanted(x1, y1, x2, y2);
      } else {
        return crossesTile;
      }
    }
Returns {@code false} if the segment from a point in {@code side1} to {@code side2} is definitely outside of the
rectangle, or true if it might cross the inside where {@code side1} and {@code side2} are from
{@link #getSide(int, int, int, int)}.
planetiler-core/src/main/java/com/onthegomap/planetiler/VectorTile.java