code: public static Geometry fromJts(com.vividsolutions.jts.geom.Geometry geometry) throws JtsConversionException {
  		if (geometry == null) {
  			throw new  JtsConversionException("Cannot convert null argument");
  		}
  		int srid = geometry.getSRID();
  		int precision = -1;
  		PrecisionModel precisionmodel = geometry.getPrecisionModel();
  		if (!precisionmodel.isFloating()) {
  			precision = (int) Math.log10(precisionmodel.getScale());
  		}
  		String geometryType = getGeometryType(geometry);
  		Geometry dto = new Geometry(geometryType, srid, precision);
  		if (geometry.isEmpty()) {
  			// nothing to do
  		} else if (geometry instanceof Point) {
  			dto.setCoordinates(convertCoordinates(geometry));
  		} else if (geometry instanceof LinearRing) {
  			dto.setCoordinates(convertCoordinates(geometry));
  		} else if (geometry instanceof LineString) {
  			dto.setCoordinates(convertCoordinates(geometry));
  		} else if (geometry instanceof Polygon) {
  			Polygon polygon = (Polygon) geometry;
  			Geometry[] geometries = new Geometry[polygon.getNumInteriorRing() + 1];
  			for (int i = 0; i < geometries.length; i++) {
  				if (i == 0) {
  					geometries[i] = fromJts(polygon.getExteriorRing());
  				} else {
  					geometries[i] = fromJts(polygon.getInteriorRingN(i - 1));
  				}
  			}
  			dto.setGeometries(geometries);
  		} else if (geometry instanceof MultiPoint) {
  			dto.setGeometries(convertGeometries(geometry));
  		} else if (geometry instanceof MultiLineString) {
  			dto.setGeometries(convertGeometries(geometry));
  		} else if (geometry instanceof MultiPolygon) {
  			dto.setGeometries(convertGeometries(geometry));
  		} else {
  			throw new JtsConversionException("Cannot convert geometry: Unsupported type.");
  		}
  		return dto;
  	}
docs: Convert a JTS geometry to a Geomajas geometry.
  @param geometry JTS geometry
  @return Geomajas geometry
  @throws JtsConversionException conversion failed