code: public static MultiPoint locateAlong(Geometry geom,
                                           double segmentLengthFraction,
                                           double offsetDistance) {
          if (geom == null) {
              return null;
          }
          if (geom.getDimension() == 0) {
              return null;
          }
          Set<Coordinate> result = new HashSet<Coordinate>();
          for (int i = 0; i < geom.getNumGeometries(); i++) {
              Geometry subGeom = geom.getGeometryN(i);
              if (subGeom instanceof Polygon) {
                  // Ignore hole
                  result.addAll(computePoints(((Polygon) subGeom).getExteriorRing().getCoordinates(),
                          segmentLengthFraction, offsetDistance));
              } else if (subGeom instanceof LineString) {
                  result.addAll(computePoints(subGeom.getCoordinates(),
                          segmentLengthFraction, offsetDistance));
              }
          }
          return geom.getFactory().createMultiPoint(
                  result.toArray(new Coordinate[0]));
      }
docs: Returns a MULTIPOINT containing points along the line segments of the
  given geometry matching the specified segment length fraction and offset
  distance.
  
  @param geom Geometry
  @param segmentLengthFraction Segment length fraction
  @param offsetDistance Offset distance
  @return A MULTIPOINT containing points along the line segments of the
  given geometry matching the specified segment length fraction and offset
  distance